GO-2026-5516
Pre-Auth DQL injection in upsert condition field in github.com/dgraph-io/dgraph
Quick fix
GO-2026-5516 — github.com/dgraph-io/dgraph/v25: upgrade to the fixed version with the command below.
go get github.com/dgraph-io/dgraph/v25@v25.3.3Details
A DQL injection vulnerability in Dgraph allows an unauthenticated remote attacker to exfiltrate data from the database.
The injection occurs via the "cond" field in upsert mutations. The buildUpsertQuery function fails to properly validate the condition string, allowing an attacker to craft a payload that closes the intended @if clause and appends arbitrary DQL query blocks. These injected blocks execute with the privileges of the Dgraph process, potentially leading to full database exfiltration.
Are you affected?
Enter the version of the package you're using.
Affected packages
0No fixed version published yet for github.com/dgraph-io/dgraph (go modules). Pin to a known-safe version or switch to an alternative.
0Fixed in: 25.3.3go get github.com/dgraph-io/dgraph/v25@v25.3.30Fixed in: 24.1.8go get github.com/hypermodeinc/dgraph/v24@v24.1.8