{"id":"CVE-2026-41492","aliases":["CVE-2026-41492","GHSA-vvf7-6rmr-m29q","GO-2026-5675"],"related":[],"kind":"vulnerability","state":"published","title":"Unauthenticated Admin Token Disclosure Leading to Authentication Bypass via /debug/vars in Dgraph","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Summary\nDgraph `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.\n\nThis 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.\n\n### Details\nAlpha still exposes Go's default HTTP mux:\n\n- `x/metrics.go`\n  - imports `expvar`\n  - initializes `Conf = expvar.NewMap(\"dgraph_config\")`\n- Go's `expvar` package automatically registers `/debug/vars`\n- `expvar` publishes:\n  - `cmdline = os.Args`\n  - `memstats = runtime.Memstats`\n\nAlpha's HTTP handler explicitly blocks only the old CVE path:\n\n- `dgraph/cmd/alpha/run.go`\n  - checks `if r.URL.Path == \"/debug/pprof/cmdline\"` and returns `404`\n  - otherwise falls through to `http.DefaultServeMux.ServeHTTP(w, r)`\n\nAdmin endpoints still trust the leaked token:\n\n- `dgraph/cmd/alpha/admin.go`\n  - reads `X-Dgraph-AuthToken`\n  - compares it to `worker.Config.AuthToken`\n### PoC\n1. Send an unauthenticated request to Alpha:\n\n```http\nGET /debug/vars HTTP/1.1\nHost: target:8080\n```\n\n2. Parse the JSON response and read the `cmdline` field.\n\n3. Extract the admin token from the startup arguments, for example:\n\n```text\n--security token=debug-vars-secret;\n```\n\n4. Replay the token to an admin-only endpoint:\n\n```http\nGET /admin/config/cache_mb HTTP/1.1\nHost: target:8080\nX-Dgraph-AuthToken: debug-vars-secret\n```\n\n5. The request is accepted as an authorized admin request.\n\nThis was reproduced against `dgraph/dgraph:v25.3.2` in Docker.\n\nObserved behavior:\n\n- unauthenticated `/debug/vars` leaked the configured token\n- replaying the leaked token in `X-Dgraph-AuthToken` successfully accessed `/admin/config/cache_mb`\n- response body was:\n\n```text\n4096\n```\n\nIt was verified that the old CVE path appears specifically patched in the same version:\n\n- `/debug/pprof/cmdline` returned `404 Not Found`\n- `/debug/pprof/` remained reachable\n\n### Impact\nUnauthenticated attackers can obtain the Alpha admin token and gain unauthorized administrative access.\n\nThis enables privileged admin operations such as:\n\n- reading privileged admin configuration\n- mutating admin configuration\n- performing operational control actions gated by `X-Dgraph-AuthToken`\n\nIn deployments where the Alpha HTTP port is reachable by untrusted parties, this is a practical authentication bypass to admin functionality.","format":"markdown","source":"ghsa"},{"lang":"en","text":"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.","format":"markdown","source":"go"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2026-04-24T16:15:28.000Z","modified":"2026-10-25T23:10:00.167Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"}],"cwes":["CWE-200"],"affected":[{"ranges":[{"version":"< 25.3.3","status":"affected"}],"vendor":"dgraph-io","product":"dgraph","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"25.3.3"}],"ecosystem":"Go","package":"github.com/dgraph-io/dgraph/v25","purl":"pkg:golang/github.com/dgraph-io/dgraph/v25","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","lastAffected":"24.1.8"}],"ecosystem":"Go","package":"github.com/dgraph-io/dgraph/v24","purl":"pkg:golang/github.com/dgraph-io/dgraph/v24","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","lastAffected":"1.2.8"}],"ecosystem":"Go","package":"github.com/dgraph-io/dgraph","purl":"pkg:golang/github.com/dgraph-io/dgraph","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"github.com/dgraph-io/dgraph","purl":"pkg:golang/github.com/dgraph-io/dgraph","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"25.3.3"}],"ecosystem":"Go","package":"github.com/dgraph-io/dgraph/v25","purl":"pkg:golang/github.com/dgraph-io/dgraph/v25","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"24.1.9"}],"ecosystem":"Go","package":"github.com/hypermodeinc/dgraph/v24","purl":"pkg:golang/github.com/hypermodeinc/dgraph/v24","source":"go"},{"ranges":[{"status":"affected","fixed":"25.3.3"}],"vendor":"dgraph","product":"dgraph","cpe":"cpe:2.3:a:dgraph:dgraph:*:*:*:*:*:go:*:*","source":"nvd"}],"references":[{"url":"https://github.com/dgraph-io/dgraph/security/advisories/GHSA-vvf7-6rmr-m29q","tags":["advisory","exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/dgraph-io/dgraph/releases/tag/v25.3.3","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-41492","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/dgraph-io/dgraph","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"total","date":"2026-04-24T19:12:18.464Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-41492","url":"https://www.cve.org/CVERecord?id=CVE-2026-41492","licence":"CVE Terms of Use","modified":"2026-04-24T19:13:03.267Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-vvf7-6rmr-m29q","url":"https://github.com/advisories/GHSA-vvf7-6rmr-m29q","licence":"CC-BY-4.0","modified":"2026-09-10T03:51:03.463Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5675","url":"https://pkg.go.dev/vuln/GO-2026-5675","licence":"CC-BY-4.0","modified":"2026-07-23T17:45:22.485Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-41492","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-41492","licence":"Public domain","modified":"2026-10-25T23:10:00.167Z"}],"updatedAt":"2026-11-25T22:59:19.576Z","epss":{"score":0.03082,"percentile":0.88039,"date":"2026-12-01T12:00:22.000Z"}}