CVE-2026-41492: Dgraph: Unauthenticated Admin Token Disclosure Leading to Authentication Bypass via /debug/vars
Summary Dgraph v25.3.2 still exposes the process command line through the unauthenticated /debug/vars endpoint on Alpha. Because the admin token is commonly supplied via the --security "token=..." startup flag, an unauthenticated attacker can retrieve that token and replay it in the X-Dgraph-AuthToken header to access admin-only endpoints.
Published Apr 24, 2026 · Updated May 4, 2026
Affected packages
github.com/dgraph-io/dgraph/v25
- Ecosystem
- Go
- Affected
- < 25.3.3
- Fixed in
- 25.3.3
- Check
go list -m github.com/dgraph-io/dgraph/v25
github.com/dgraph-io/dgraph/v24
- Ecosystem
- Go
- Affected
- <= 24.1.8
- Fixed in
- No patched version yet
- Check
go list -m github.com/dgraph-io/dgraph/v24
github.com/dgraph-io/dgraph
- Ecosystem
- Go
- Affected
- <= 1.2.8
- Fixed in
- No patched version yet
- Check
go list -m github.com/dgraph-io/dgraph
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
Dgraph v25.3.2 still exposes the process command line through the unauthenticated /debug/vars endpoint on Alpha. Because the admin token is commonly supplied via the --security "token=..." startup flag, an unauthenticated attacker can retrieve that token and replay it in the X-Dgraph-AuthToken header to access admin-only endpoints.
This is a variant of the previously fixed /debug/pprof/cmdline issue, but the current fix is incomplete because it blocks only /debug/pprof/cmdline and still serves http.DefaultServeMux, which includes expvar's /debug/vars handler.
Details
Alpha still exposes Go's default HTTP mux:
x/metrics.go- imports
expvar - initializes
Conf = expvar.NewMap("dgraph_config") - Go's
expvarpackage automatically registers/debug/vars expvarpublishes:cmdline = os.Argsmemstats = runtime.Memstats
Alpha's HTTP handler explicitly blocks only the old CVE path:
dgraph/cmd/alpha/run.go- checks
if r.URL.Path == "/debug/pprof/cmdline"and returns404 - otherwise falls through to
http.DefaultServeMux.ServeHTTP(w, r)
Admin endpoints still trust the leaked token:
dgraph/cmd/alpha/admin.go- reads
X-Dgraph-AuthToken - compares it to
worker.Config.AuthToken
PoC
- Send an unauthenticated request to Alpha:
GET /debug/vars HTTP/1.1
Host: target:8080- Parse the JSON response and read the
cmdlinefield.
- Extract the admin token from the startup arguments, for example:
--security token=debug-vars-secret;- Replay the token to an admin-only endpoint:
GET /admin/config/cache_mb HTTP/1.1
Host: target:8080
X-Dgraph-AuthToken: debug-vars-secret- The request is accepted as an authorized admin request.
This was reproduced against dgraph/dgraph:v25.3.2 in Docker.
Observed behavior:
- unauthenticated
/debug/varsleaked the configured token - replaying the leaked token in
X-Dgraph-AuthTokensuccessfully accessed/admin/config/cache_mb - response body was:
4096It was verified that the old CVE path appears specifically patched in the same version:
/debug/pprof/cmdlinereturned404 Not Found/debug/pprof/remained reachable
Impact
Unauthenticated attackers can obtain the Alpha admin token and gain unauthorized administrative access.
This enables privileged admin operations such as:
- reading privileged admin configuration
- mutating admin configuration
- performing operational control actions gated by
X-Dgraph-AuthToken
In deployments where the Alpha HTTP port is reachable by untrusted parties, this is a practical authentication bypass to admin functionality.
Credited to MaherAzzouzi.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Go vulnerabilities
All Go entriesCVE-2026-102748
Dgraph: Zero Unauthenticated HTTP Admin removeNode Denial of Service
critical9.2Oct 15, 2026CVE-2026-54061
Dgraph Alpha group stores can be replaced via unauthenticated external snapshot import
critical9.1Aug 20, 2026CVE-2026-41327
Dgraph: Pre-Auth Full Database Exfiltration via DQL Injection in Upsert Condition Field
critical9.1No fixApr 24, 2026CVE-2026-41328
Dgraph: Pre-Auth Full Database Exfiltration via DQL Injection in NQuad Lang Field
critical9.1No fixApr 24, 2026CVE-2026-40173
Dgraph: Unauthenticated /debug/pprof/cmdline discloses admin auth token, enabling unauthorized access to protected Alpha admin endpoints
critical9.4No fixApr 16, 2026CVE-2026-34976
Dgraph: Pre-Auth Database Overwrite + SSRF + File Read via restoreTenant Missing Authorization
critical10.0No fixApr 2, 2026
