ADVISORIES

Go Vulnerability Database

GO-2026-5749

DQL injection via unsanitized NQuad Lang field in github.com/dgraph-io/dgraph

Details

A vulnerability in Dgraph allows an unauthenticated attacker full read access to data in the database when ACL is not enabled.

The injection exploits the addQueryIfUnique function, which constructs DQL queries using fmt.Sprintf with an unsanitized predicate name that includes the raw Lang value from a JSON mutation key. An attacker can escape the function and inject arbitrary named query blocks, which execute server-side and return results in the HTTP response.

Affected packages

EcosystemPackageAffected versions
Gogithub.com/dgraph-io/dgraph
All versions, no fix listed
Gogithub.com/dgraph-io/dgraph/v25
All versions before 25.3.3 (fixed in 25.3.3)
Gogithub.com/hypermodeinc/dgraph/v24
All versions before 24.1.9 (fixed in 24.1.9)

References