Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ CVE-2026-49254 — dragonfly

🟢 CVSS 2.0 — Low ✅ No Known Exploit CWE-200 OSV
2.0
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

Dragonfly Manager OAuth provider client_secret disclosure via unauthenticated GET /api/v1/oauth

Summary

The Dragonfly Manager exposes GET /api/v1/oauth and GET /api/v1/oauth/:id to unauthenticated clients. The response body deserializes the entire manager/models.Oauth struct, which includes the client_secret field. Any network-reachable attacker can read the OAuth client secrets configured for github or google providers, defeating the confidentiality guarantee of those secrets and enabling subsequent abuse against the connected identity providers.

Affected versions

github.com/dragonflyoss/dragonfly <= v2.4.3 (and current main at commit 46a8f1e). The vulnerable wiring is present back to the introduction of OAuth GET handlers and was not addressed by GHSA-j8hf-cp34-g4j7 / CVE-2026-24124, whose remediation only added jwt + rbac middleware to the /jobs group.

Privilege required

Unauthenticated. The only precondition is that an administrator has registered at least one OAuth provider via POST /api/v1/oauth (a one-time setup for tenants that enable GitHub / Google sign-in).

Vulnerable code

[manager/router/router.go:134-140](https://github.com/dragonflyoss/dragonfly/blob/e1491bf6134fe307b09e82e11fa94b0587dcd323/manager/router/router.go#L134-L140) (v2.4.3) — the /oauth group registration:

```go

// Oauth.

oa := apiv1.Group("/oauth")

oa.POST("", jwt.MiddlewareFunc(), rbac, h.CreateOauth)

oa.DELETE(":id", jwt.MiddlewareFunc(), rbac, h.DestroyOauth)

oa.PATCH(":id", jwt.MiddlewareFunc(), rbac, h.UpdateOauth)

oa.GET(":id", h.GetOauth)

oa.GET("", h.GetOauths)

```

Note the asymmetry inside the same oa route group: POST, PATCH, and DELETE explicitly attach jwt.MiddlewareFunc(), rbac as per-route middleware, but the two GET handlers omit both. Compare with the sibling group three lines below at [manager/router/router.go:143-148](https://github.com/dragonflyoss/dragonfly/blob/e1491bf6134fe307b09e82e11fa94b0587dcd323/manager/router/router.go#L143-L148), the /clusters group:

```go

c := apiv1.Group("/clusters", jwt.MiddlewareFunc(), rbac)

c.POST("", h.CreateCluster)

c.DELETE(":id", h.DestroyCluster)

c.PATCH(":id", h.UpdateCluster)

c.GET(":id", h.GetCluster)

c.GET("", h.GetClusters)

```

Here the middleware pair is attached once at the group level, so every verb on /clusters is guarded. The OAuth GETs are an unguarded sibling of the same primitive that GHSA-j8hf-cp34-g4j7 (Jan 2026) patched on the /jobs group. This is sibling-method-dispatch-target of the AP-012 sub-shape lens: same module, same router file, same anchor primitive ("group lacking JWT + RBAC"), parallel GET methods missed.

The handler at [manager/handlers/oauth.go:127-141](https://github.com/dragonflyoss/dragonfly/blob/e1491bf6134fe307b09e82e11fa94b0587dcd323/manager/handlers/oauth.go#L127-L141) returns the model directly:

```go

func (h *Handlers) GetOauth(ctx *gin.Context) {

var params types.OauthParams

if err := ctx.ShouldBindUri(&params); err != nil {

ctx.JSON(http.StatusUnprocessableEntity, gin.H{"errors": err.Error()})

return

}

oauth, err := h.service.GetOauth(ctx.Request.Context(), params.ID)

if err != nil {

ctx.Error(err) // nolint: errcheck

return

}

ctx.JSON(http.StatusOK, oauth)

}

```

[manager/handlers/oauth.go:155-171](https://github.com/dragonflyoss/dragonfly/blob/e1491bf6134fe307b09e82e11fa94b0587dcd323/manager/handlers/oauth.go#L155-L171) has the parallel list handler:

```go

func (h *Handlers) GetOauths(ctx *gin.Context) {

var query types.GetOauthsQuery

if err := ctx.ShouldBindQuery(&query); err != nil {

ctx.JSON(http.StatusUnprocessableEntity, gin.H{"errors": err.Error()})

return

}

h.setPaginationDefault(&query.Page, &query.PerPage)

oauth, count, err := h.service.GetOauths(ctx.Request.Context(), query)

if err != nil {

ctx.Error(err) // nolint: errcheck

return

}

h.setPaginationLinkHeader(ctx, query.Page, query.PerPage, int(count))

ctx.JSON(http.StatusOK, oauth)

}

```

[manager/models/oauth.go:19-26](https://github.com/dragonflyoss/dragonfly/blob/e1491bf6134fe307b09e82e11fa94b0587dcd323/manager/models/oauth.go#L19-L26) declares ClientSecret with no json:"-" tag, so it is serialized into every response:

```go

type Oauth struct {

BaseModel

Name string gorm:"column:name;type:varchar(256);index:uk_oauth2_name,unique;not null;comment:oauth2 name" json:"name"

BIO string gorm:"column:bio;type:varchar(1024);comment:biography" json:"bio"

ClientID string gorm:"column:client_id;type:varchar(256);index:uk_oauth2_client_id,unique;not null;comment:client id for oauth2" json:"client_id"

ClientSecret string gorm:"column:client_secret;type:varchar(1024);not null;comment:client secret for oauth2" json:"client_secret"

RedirectURL string gorm:"column:redirect_url;type:varchar(1024);comment:authorization callback url" json:"redirect_url"

}

```

How an unauthenticated request reaches the OAuth client_secre

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. Rated impact: confidentiality low, integrity none, availability none.

CVSS metrics in full

The score comes from this vector: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:P

  • Attack vector: Network — reachable from anywhere that can route to the service.
  • Attack complexity: Low — the attack works reliably, with no preparation.
  • Attack requirements: Present — the target has to be in a particular state for the attack to work.
  • Privileges required: None — an unauthenticated stranger can try it.
  • User interaction: None — nobody has to be tricked into anything.
  • Confidentiality impact: Low — limited, and the attacker does not choose what is affected.
  • Integrity impact: None.
  • Availability impact: None.

Weakness class

CVE-2026-49254 is classified as CWE-200: Exposure of Sensitive Information. Information that should stay internal is disclosed to someone who is not authorised to see it.

Affected software

CVE-2026-49254 is recorded against 1 package.

  • d7y.io/dragonfly/v2

Timeline and source

Published on 7 July 2026. No public exploit is currently recorded for this entry. Record sourced from OSV.

References

github.com (Advisory)

Other advisories for this package

d7y.io/dragonfly/v2 has other advisories on record. If you are patching this one, these are worth checking on the same host:

Same weakness in other software

These advisories are the same class of weakness (CWE-200: Exposure of Sensitive Information) in other software:

Details

Severity LOW
CVSS Score 2.0
CVSS Vector CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:P
CWE CWE-200
Public Exploit ✅ No
Source OSV
Published 2026-07-07
Updated 2026-08-20
Modified 2026-07-07
Fix URL N/A

Affected Packages

Software From version Fixed in
d7y.io/dragonfly/v2 — —

Similar Threats

Free Vulnerability Check

Is your site affected by CVE-2026-49254?

BotEraser helps you identify potentially vulnerable plugins and themes by checking your installation against CVE-2026-49254 and other known CVE records.

Scan My Site Free →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2026
✓