Miggo Logo

CVE-2023-27584: Dragonfly2 has hard coded cyptographic key

9.8

CVSS Score
3.1

Basic Information

EPSS Score
0.9809%
Published
9/19/2024
Updated
9/25/2024
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
d7y.io/dragonfly/v2go< 2.1.0-beta.12.1.0-beta.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from the JWT middleware configuration in jwt.go where the Key parameter was explicitly set to []byte("Secret Key"). This static value allowed anyone to generate valid JWTs using the known secret. The commit diff shows the fix involved moving the key to a configurable parameter (cfg.JWTConfig.Key), confirming the hard-coded value was the root cause. The PoC demonstrates how this static key enables token forgery, and the CWE mappings (CWE-321/CWE-798) directly align with this hard-coded credential pattern.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### Summ*ry **llo *r**on*ly m*int*in*r t**m, I woul* lik* to r*port * s**urity issu* *on**rnin* your JWT ***tur*. ### **t*ils *r**on*ly us*s [JWT](*ttps://*it*u*.*om/*r**on*lyoss/*r**on*ly*/*lo*/****************************************/m*n***r/mi*

Reasoning

T** vuln*r**ility st*ms *rom t** `JWT` mi**l*w*r* *on*i*ur*tion in `jwt.*o` w**r* t** K*y p*r*m*t*r w*s *xpli*itly s*t to []*yt*("S**r*t K*y"). T*is st*ti* v*lu* *llow** *nyon* to **n*r*t* v*li* `JWT`s usin* t** known s**r*t. T** *ommit *i** s*ows t*