Vulnerability GO-2026-5516
Summary
Pre-Auth DQL injection in upsert condition field in github.com/dgraph-io/dgraph
Details
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.
References
Related Vulnerabilities
Other vulnerabilities affecting the same packages