Dgraph Vulnerable to DQL Injection via checkUserPassword GraphQL Query
dgraph-io dgraph
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| github.com/dgraph-io/dgraph/v25 Go |
|
|
| github.com/dgraph-io/dgraph Go |
| No fix yet |
| github.com/hypermodeinc/dgraph/v24 Go |
|
dgraph-io dgraph
| Product | Affected | Fixed in |
|---|---|---|
| github.com/dgraph-io/dgraph/v25 Go |
|
|
| github.com/dgraph-io/dgraph Go |
| No fix yet |
| github.com/hypermodeinc/dgraph/v24 Go |
|
| No fix yet |
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.
From the CVE record · GitHub_M
Dgraph's `checkUserPassword` GraphQL query interpolates user-supplied passwords into a DQL query without escaping or parameterization. An attacker who can submit a password to this query can use a double quote to append arbitrary DQL query blocks. The input does not specify whether authentication or other user interaction is required.
Check deployments using `github.com/dgraph-io/dgraph/v25` before 25.3.4, or any version of `github.com/dgraph-io/dgraph` or `github.com/hypermodeinc/dgraph/v24`.