CVE-2023-27584: Dragonfly2 has hard coded cyptographic key
9.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.9809%
CWE
Published
9/19/2024
Updated
9/25/2024
KEV Status
No
Technology
Go
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| d7y.io/dragonfly/v2 | go | < 2.1.0-beta.1 | 2.1.0-beta.1 |
Vulnerability Intelligence
Miggo AI
Root 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.