Unauthenticated Remote Data Replacement in Dgraph Alpha
An unauthenticated remote attacker can leverage the Dgraph Alpha gRPC interface to clear or replace internal database group stores, potentially leading to unauthorized data modification and privilege escalation.
CVE search metadata
CVE search record: CVE-2026-54061. Severity: critical. CVSS: 9.1. EPSS: 0.39%. KEV: no. Product: Dgraph. Brief: Unauthenticated Remote Data Replacement in Dgraph Alpha. Brief link: https://feed.craftedsignal.io/briefs/2026-08-dgraph-snapshot-unauth/
Dgraph Alpha versions 25.3.4 and earlier are vulnerable to an unauthenticated remote code execution and data manipulation flaw due to improper access control in its public gRPC interface (port :9080). The service exposes the StreamExtSnapshot method without requiring authentication, authorization, or mTLS. Because the server-side implementation calls StreamWriter.Prepare() before processing incoming data streams, an unauthenticated client can trigger the immediate deletion of an existing database group store. Attackers can leverage this to clear production data or replace the group store with arbitrary Badger stream data. This vulnerability is particularly dangerous when targeting Group 1, which houses internal ACL and predicate information, as the ability to inject custom data here facilitates unauthorized privilege escalation within the Dgraph cluster.
Attack Chain
- Attacker identifies a Dgraph Alpha instance reachable over the network on port :9080.
- Attacker establishes a standard gRPC connection to the target without providing a JWT, ACL token, or auth-token metadata.
- Attacker invokes the
Dgraph.StreamExtSnapshotRPC method against a specific group ID (e.g., Group 1). - The Dgraph server fails to validate the requester's authorization context, accepting the stream request.
- The server-side logic triggers
worker.runLocalSubscriberand subsequently callspstore.NewStreamWriter().Prepare(). - The target group's database is purged by the Dgraph engine as part of the
Prepare()operation. - Attacker sends a stream packet with a
Doneflag, or alternatively, streams valid Badger data chunks to overwrite the store. - Final objective achieved: targeted database contents are replaced with attacker-controlled data, causing potential privilege escalation or service disruption.
Impact
Successful exploitation allows for the complete removal of existing data or the substitution of database contents with malicious payloads. By overwriting the database group responsible for access control (Group 1), an attacker can inject rogue administrative accounts or modify ACL settings to grant themselves elevated privileges, compromising the integrity and security of the entire Dgraph cluster.
Recommendation
- Immediately restrict network access to Dgraph gRPC port :9080, ensuring it is not exposed to the public internet or untrusted networks.
- Upgrade all Dgraph Alpha instances to a patched version beyond 25.3.4 once available from the vendor.
- Enforce mTLS for all gRPC communications to ensure only authorized clients can interact with the Alpha service.
- Review database group 1 for unauthorized changes or unexpected ACL modifications that may indicate exploitation of this vulnerability.
Immediate actions
Block inbound traffic to Dgraph gRPC port :9080 from untrusted network segments.
Threat Hunt
Identify unauthorized gRPC connections to Dgraph Alpha instances targeting the StreamExtSnapshot method.
Data: Network flow logs or gRPC application logs
Mitigations
Enforce mTLS and network-level authentication for all gRPC services.
CVE-2026-54061