GO-2026-5837: Dgraph Vulnerable to DQL Injection via checkUserPassword GraphQL Query
Dgraph is an open source distributed GraphQL database. Prior to version 25.3.4, the checkUserPassword GraphQL query in Dgraph is vulnerable to DQL (Dgraph Query Language) injection. User-supplied password values are interpolated directly into a DQL checkpwd() query via fmt.Sprintf without any escaping or parameterization. An attacker can inject a password containing a double-quote character to break out of the DQL string literal and append arbitrary DQL query blocks. Version 25.3.4 patches the issue.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Dgraphto a version that resolves this vulnerability.Fixed in 25.3.4
Event History
Frequently Asked Questions
Who can exploit this issue?
An unauthenticated remote attacker can exploit it by supplying a crafted password value to the checkUserPassword GraphQL query. The attacker does not need user interaction or prior privileges.
What input is required for exploitation?
The password value must contain a double-quote character that terminates the DQL string literal, allowing the attacker to append arbitrary DQL query blocks.
Which versions are affected and what fixes it?
Dgraph versions prior to 25.3.4 are affected. Upgrade to version 25.3.4 to apply the patch.