github.com/dgraph-io/dgraph/v25

CVE-2026-40173

CVE-2026-40173 is a critical-severity security vulnerability in github.com/dgraph-io/dgraph/v25 (go), affecting versions < 25.3.2. It is fixed in 25.3.2.

Key facts
CVSS score
9.4
Critical
Attack vector
Network
Issuing authority
GitHub Advisory Database
Affected package
github.com/dgraph-io/dgraph/v25
Fixed in
25.3.2
Disclosed
2026

Summary

Summary An unauthenticated debug endpoint in Dgraph Alpha exposes the full process command line, including the configured admin token from --security "token=...". This does not break token validation logic directly; instead, it discloses the credential and enables unauthorized admin-level access by reusing the leaked token in X-Dgraph-AuthToken. Details The behavior occurs entirely within core Alpha HTTP routing and does not require any external proxy, plugin, or non-core integration. The core issue is not that admin token protection is absent, but that the protected secret is exposed in cleartext through an unauthenticated core debug endpoint. Relevant code paths: dgraph/cmd/alpha/run.go:17 imports net/http/pprof, which registers /debug/pprof/ handlers on the default mux. dgraph/cmd/alpha/run.go:533 uses http.Handle("/", audit.AuditRequestHttp(baseMux)), so default-mux handlers remain reachable. dgraph/cmd/alpha/admin.go:52 enforces admin token checks in adminAuthHandler for admin endpoints. dgraph/cmd/alpha/admin.go:74 shows /admin/config/cachemb behind adminAuthHandler. Credential-exposure chain: /debug/pprof/cmdline is reachable without authentication. Its output includes the configured admin token from process arguments. The disclosed token is accepted by adminAuthHandler when sent as X-Dgraph-AuthToken. An attacker gains unauthorized access to admin-only functionality. Observed local evidence (safe validation): Request: GET /admin/config/cachemb without token Status: 200 (request rejected at application layer) Body contains error: Invalid X-Dgraph-AuthToken The endpoint returns HTTP 200 but indicates authentication failure in the response body. Request: GET /debug/pprof/cmdline without token Status: 200 Body excerpt includes: --security=token=TopSecretToken123; Request: GET /admin/config/cachemb with X-Dgraph-AuthToken: TopSecretToken123 Status: 200 Body: 4096 Important policy/triage clarification: This issue persists even when the admin-token security feature is enabled: the token itself is exposed via an unauthenticated core debug endpoint, making this more than a misconfiguration-only concern. Network restrictions (bind/whitelist/firewall) may reduce exposure, but they do not remediate the underlying credential disclosure behavior. PoC Branch: main Commit: b15c87e93 Describe: v25.3.1 Preconditions: Alpha HTTP port is reachable by attacker traffic. Admin token is configured via supported startup flag: --security "token=...". /debug/pprof/ is exposed on the same Alpha HTTP listener. This behavior occurs with documented startup flags and without any non-default or unsupported configuration. Reproduction steps: Start Zero and Alpha (example local setup): dgraph zero --my=127.0.0.1:5280 --portoffset=200 --bindall=false --wal=./zw dgraph alpha --my=127.0.0.1:7280 --zero=127.0.0.1:5280 --portoffset=200 --bindall=false --security "token=TopSecretToken123;" --postings=./p --wal=./w --tmp=./t Verify admin endpoint rejects unauthenticated request: curl -i http://127.0.0.1:8280/admin/config/cachemb Expected body includes Invalid X-Dgraph-AuthToken. Read token from unauthenticated debug endpoint: curl -s http://127.0.0.1:8280/debug/pprof/cmdline Expected output includes --security=token=TopSecretToken123;. Reuse leaked token against admin endpoint: curl -i -H "X-Dgraph-AuthToken: TopSecretToken123" http://127.0.0.1:8280/admin/config/cache_mb Expected: successful response (example observed: 4096). Note: The PoC uses 127.0.0.1 only for safe local validation. The vulnerable condition is unauthenticated reachability of /debug/pprof/cmdline; in any deployment where Alpha HTTP is reachable by untrusted parties, the same token disclosure and subsequent unauthorized admin access apply. Impact Unauthenticated disclosure of a sensitive admin credential via debug endpoint, enabling unauthorized privileged administrative access through token reuse Operators running Dgraph Alpha with admin token configured, where Alpha HTTP/debug routes are reachable by untrusted users or networks. The attack requires network reachability to the Alpha HTTP port. In deployments where this interface is exposed beyond trusted boundaries, the issue is remotely exploitable without authentication. Depending on exposed admin functionality in deployment policy, this may allow configuration changes, operational control actions, and other privileged administrative operations exposed through /admin/*.

Impact

Severity and exposure

CVE-2026-40173 has a CVSS score of 9.4 (Critical). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment.

A fixed version is available (25.3.2). Upgrading removes the vulnerable code path.

Affected versions

go

  • github.com/dgraph-io/dgraph/v25 (< 25.3.2)
  • github.com/dgraph-io/dgraph/v24 (<= 24.1.7)
  • github.com/dgraph-io/dgraph (<= 1.2.8)

Security releases

  • github.com/dgraph-io/dgraph/v25 → 25.3.2 (go)
Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter instead of chasing every advisory.

Kodem's runtime-powered SCA identifies whether CVE-2026-40173 is reachable in your applications. Explore open-source security for your team.

See if CVE-2026-40173 is reachable in your applications. Get a demo

Already deployed Kodem? See CVE-2026-40173 in your environment

Remediation advice

Upgrade github.com/dgraph-io/dgraph/v25 to 25.3.2 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently asked questions about CVE-2026-40173

What is CVE-2026-40173?

CVE-2026-40173 is a critical-severity security vulnerability in github.com/dgraph-io/dgraph/v25 (go), affecting versions < 25.3.2. It is fixed in 25.3.2.

How severe is CVE-2026-40173?

CVE-2026-40173 has a CVSS score of 9.4 (Critical). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.

Which packages are affected by CVE-2026-40173?
  • github.com/dgraph-io/dgraph/v25 (go) (versions < 25.3.2)
  • github.com/dgraph-io/dgraph/v24 (go) (versions <= 24.1.7)
  • github.com/dgraph-io/dgraph (go) (versions <= 1.2.8)
Is there a fix for CVE-2026-40173?

Yes. CVE-2026-40173 is fixed in 25.3.2. Upgrade to this version or later.

Is CVE-2026-40173 exploitable, and should I be worried?

Whether CVE-2026-40173 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo

What actually determines whether CVE-2026-40173 is exploitable, and how bad it is?

Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.

How do I fix CVE-2026-40173?

Upgrade github.com/dgraph-io/dgraph/v25 to 25.3.2 or later.

Stop the waste.
Protect your environment with Kodem.