# CVE-2023-27584: Dragonfly2 vulnerable to hard coded cyptographic key

> Hardcoded JWT secret in Dragonfly2 allows attackers to bypass authentication and gain admin privileges.

- **Severity:** Critical 9.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 19 Sep 2024
- **Updated:** 26 Sep 2024
- **Also known as:** GHSA-hpc8-7wpm-889w, GO-2024-3136

## What is CVE-2023-27584?

CVE-2023-27584 is a critical vulnerability in dragonflyoss Dragonfly2, published on 19 Sep 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Dragonfly is an open source P2P-based file distribution and image acceleration system. It is hosted by the Cloud Native Computing Foundation (CNCF) as an Incubating Level Project. Dragonfly uses JWT to verify user. However, the secret key for JWT, "Secret Key", is hard coded, which leads to authentication bypass. An attacker can perform any action as a user with admin privileges. This issue has been addressed in release version 2.0.9. All users are advised to upgrade. There are no known workarounds for this vulnerability.

Weakness: CWE-798 (Use of Hard-coded Credentials), CWE-321 (Use of Hard-coded Cryptographic Key)

## Which versions are affected by CVE-2023-27584?

5 open source packages ship an affected version, including d7y.io/dragonfly/v2. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `d7y.io/dragonfly/v2` | Go | All versions | 2.0.9-rc.2 |
| `d7y.io/dragonfly/v2` | Go | All versions | 2.0.9-rc.2 |
| `d7y.io/dragonfly/v2` | Go | All versions | 2.1.0-beta.1 |
| `d7y.io/dragonfly/v2` | Go | From 2.1.0-alpha.0 | 2.1.0-beta.1 |
| `d7y.io/dragonfly/v2` | Go | From 2.1.0-alpha.0 | 2.1.0-beta.1 |

Products: Linuxfoundation Dragonfly.

## How do I fix CVE-2023-27584?

Upgrade d7y.io/dragonfly/v2 to a fixed version for your release line: 2.0.9-rc.2 or 2.1.0-beta.1.

## Is CVE-2023-27584 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-27584 exists.

Public exploit code:

- Dragonfly2 < 2.1.0-beta.1 - Hardcoded JWT Secret (nuclei): http/cves/2023/CVE-2023-27584.yaml

## Other vulnerabilities in dragonflyoss Dragonfly2

- [CVE-2026-24124](https://insights.sbomify.com/CVE-2026-24124/): Dragonfly Manager Job API Allows Unauthenticated Access (high 8.9)
- [CVE-2025-59345](https://insights.sbomify.com/CVE-2025-59345/): Dragonfly did not enable authentication for some Manager’s endpoints (high 7.7)
- [CVE-2025-59353](https://insights.sbomify.com/CVE-2025-59353/): Manager generates mTLS certificates for arbitrary IP addresses (high 7.7)
- [CVE-2025-59352](https://insights.sbomify.com/CVE-2025-59352/): Dragonfly allows arbitrary file read and write on a peer machine (medium 6.9)
- [CVE-2025-59346](https://insights.sbomify.com/CVE-2025-59346/): Dragonfly server-side request forgery vulnerability (medium 5.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-27584 and fix it if it is affected.

What it is: CVE-2023-27584 is a critical vulnerability in dragonflyoss Dragonfly2, published on 19 Sep 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-27584 exists.

Affected packages and fixed versions:
- d7y.io/dragonfly/v2 (Go): affected all versions; fixed in 2.0.9-rc.2
- d7y.io/dragonfly/v2 (Go): affected all versions; fixed in 2.0.9-rc.2
- d7y.io/dragonfly/v2 (Go): affected all versions; fixed in 2.1.0-beta.1
- d7y.io/dragonfly/v2 (Go): affected from 2.1.0-alpha.0; fixed in 2.1.0-beta.1
- d7y.io/dragonfly/v2 (Go): affected from 2.1.0-alpha.0; fixed in 2.1.0-beta.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-27584/ (Markdown: https://insights.sbomify.com/CVE-2023-27584/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-27584
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-27584
- OSV: https://osv.dev/vulnerability/CVE-2023-27584

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-27584/
Summaries are generated and may contain mistakes; the official description above is the record.
