9.8critical
Unauthenticated Admin Token Disclosure Leading to Authentication Bypass via /debug/vars in Dgraph
- Severity
- 9.8critical CVSS:3.1 by GitHub_M
- Exploit likelihood
- 3.08% (higher than 88% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-vvf7-6rmr-m29qGO-2026-5675
Description
Dgraph is an open source distributed GraphQL database. Prior to 25.3.3, Dgraphl 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. This vulnerability is fixed in 25.3.3.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| dgraph-io dgraph | < 25.3.3 | CVE List |
| github.com/dgraph-io/dgraph/v25 (Go) | before 25.3.3 | GitHub Advisory Database, Go Vulnerability Database |
| github.com/dgraph-io/dgraph/v24 (Go) | up to 24.1.8 | GitHub Advisory Database |
| github.com/dgraph-io/dgraph (Go) | up to 1.2.8, all versions | GitHub Advisory Database, Go Vulnerability Database |
| github.com/hypermodeinc/dgraph/v24 (Go) | before 24.1.9 | Go Vulnerability Database |
| dgraph dgraph | before 25.3.3 | NVD |
All scores
| GitHub_M | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total.
What each source says
CVE List
Dgraph is an open source distributed GraphQL database. Prior to 25.3.3, Dgraphl 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. This vulnerability is fixed in 25.3.3.
GitHub Advisory Database
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")
- imports
- 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)
- checks
Admin endpoints still trust the leaked token:
dgraph/cmd/alpha/admin.go- reads
X-Dgraph-AuthToken - compares it to
worker.Config.AuthToken
- reads
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:
4096
It 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.
Go Vulnerability Database
The /debug/vars endpoint in Dgraph Alpha discloses the administrator's authentication token without requiring authentication. This allows an unauthenticated remote attacker to obtain the token and gain full administrative access to the Dgraph cluster.
NVD (es)
Dgraph es una base de datos GraphQL distribuida de código abierto. Antes de la versión 25.3.3, Dgraph expone la línea de comandos del proceso a través del endpoint /debug/vars no autenticado en Alpha. Dado que el token de administrador se suele suministrar a través del flag de inicio --security ’token=...’, un atacante no autenticado puede recuperar ese token y reutilizarlo en el encabezado X-Dgraph-AuthToken para acceder a endpoints solo para administradores. Esta es una variante del problema /debug/pprof/cmdline previamente corregido, pero la solución actual es incompleta porque solo bloquea /debug/pprof/cmdline y aún sirve http.DefaultServeMux, que incluye el gestor /debug/vars de expvar. Esta vulnerabilidad se corrige en la versión 25.3.3.
References
| https://github.com/dgraph-io/dgraph/security/advisories/GHSA-vvf7-6rmr-m29q | advisory, exploit, vendor-advisory, web | |
| https://github.com/dgraph-io/dgraph/releases/tag/v25.3.3 | release-notes, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-41492 | advisory | |
| https://github.com/dgraph-io/dgraph | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-41492 changed 2026-04-24 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-vvf7-6rmr-m29q changed 2026-09-10 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2026-5675 changed 2026-07-23 | CC-BY-4.0 |
| NVD | CVE-2026-41492 changed 2026-10-25 | Public domain |