/

CVE-2026-41492

Severity:

CRITICAL RISK

(9.8)

Information Exposure in Dgraph Alpha vars

CVE-2026-41492

Analyzed

Vulnerability type

Category:

Information Exposure

CWE:

CWE-200

Impact:

Privilege Escalation to Admin-Level API Access

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

An information exposure vulnerability in Dgraph allows the unauthenticated /debug/vars endpoint on Alpha nodes to leak the process command line, including the admin token when it is supplied via the --security "token=..." startup flag.

An attacker who can reach this debug endpoint may retrieve the admin token and replay it in the X-Dgraph-AuthToken header to access admin-only endpoints and perform privileged operations on the database cluster.

Affected context

This issue affects Dgraph deployments where:

  • Alpha nodes expose the /debug/vars HTTP endpoint without authentication or network-level isolation
  • The admin token is provided via process command-line flags, such as --security "token=..."
  • The default Go HTTP multiplexer (http.DefaultServeMux) is still serving expvar's /debug/vars handler alongside other Dgraph debug handlers

In these conditions, debug instrumentation intended for diagnostics unintentionally returns sensitive runtime details, including security-critical CLI arguments.

Exploit preconditions

  • Attack surface: HTTP interface on Dgraph Alpha nodes, specifically the /debug/vars endpoint
  • Required access: Network reachability to the Alpha debug port; no prior authentication is needed if the endpoint is left open
  • Trigger point: A simple HTTP GET request to /debug/vars causing expvar to return process state, including the command line
  • Why exploitation is possible: The debug handler is served unauthenticated and includes the full command-line string where the admin token is often specified, allowing token disclosure and replay in the X-Dgraph-AuthToken header

Why this happens

The root cause lies in exposing diagnostic debug endpoints that return sensitive runtime information over an unauthenticated channel.

Specifically, the Alpha process relies on Go's default HTTP multiplexer, which includes expvar's /debug/vars handler, and that handler provides access to the process command line.

When operators pass security-sensitive secrets such as the admin token via CLI flags, these secrets become part of the observable process metadata.

This maps to CWE-200: Information Exposure, where a system unintentionally discloses confidential data (the admin token) through an auxiliary interface designed for diagnostics rather than secure operations.

Potential impact

  • An attacker may obtain the admin token and perform administrative operations via admin-only HTTP endpoints
  • An attacker could modify schema, data, or cluster configuration with full administrative privileges
  • An attacker can perform destructive actions such as dropping data, altering ACLs, or disrupting cluster availability
  • An attacker may use the disclosed token to maintain persistent unauthorized access or pivot to other components in the environment

General mitigation guidance

Effective mitigation focuses on restricting debug surfaces and avoiding exposure of secrets in runtime metadata:

  • Limit or disable unauthenticated debug endpoints in production, especially those under /debug/*, or place them behind strong authentication and network access controls
  • Avoid passing secrets such as tokens, passwords, or keys via command-line flags; favor environment variables, dedicated configuration mechanisms, or external secret stores that are not trivially exposed by diagnostics
  • Ensure that any diagnostic or profiling interfaces are bound to localhost or management networks, not to public or untrusted interfaces
  • Apply least-privilege principles to admin tokens, and rotate them promptly if there is any suspicion of exposure
  • Establish configuration baselines where debug handlers are off or locked down by default in production deployments

How teams detect issues like this

Detection commonly combines configuration inspection, network monitoring, and security testing:

  • Use configuration and infrastructure-as-code reviews to locate services exposing /debug/* endpoints, especially on externally reachable interfaces
  • Employ dynamic application security testing (DAST) and security scanning tools to probe for unauthenticated debug endpoints that disclose process metadata
  • Implement network monitoring to identify unexpected access patterns to debug paths such as /debug/vars, including from unknown or untrusted sources
  • Add static analysis or policy checks in CI/CD to flag uses of security-sensitive secrets passed as command-line flags and to enforce configuration policies around debug interfaces
  • Periodically run manual or automated penetration tests focused on management and diagnostics planes to catch similar exposure patterns

Sources

SourceLink
github.comgithub.com/dgraph-io/dgraph/releases/tag/v25.3.3
github.comgithub.com/dgraph-io/dgraph/security/advisories/GHSA-vvf7-6rmr-m29q

Frequently asked

questions

Yes, if the Dgraph Alpha node's debug interface is reachable from an untrusted network and /debug/vars is exposed without additional authentication, an attacker can remotely retrieve the admin token.

The attacker only needs network access to the Alpha node's HTTP debug endpoint; no prior authentication is required. Once the token is obtained, it can be replayed to gain admin-level API access.

The safest pattern is to avoid exposing debug and diagnostic endpoints in production or to strictly gate them behind strong authentication and network controls, while ensuring that secrets are never embedded in process command lines or other easily exposed runtime metadata.

Adopt a secure-by-default posture for observability and diagnostics: disable or harden debug endpoints, separate management traffic from public traffic, use proper secret management mechanisms instead of CLI flags, and incorporate configuration and security reviews that explicitly cover debug and admin interfaces.

Find out what's already
exploitable in your codebase.