CVE-2026-41328: GO-2026-5749 - DQL injection via unsanitized NQuad Lang field in github.com/dgraph-io/dgraph

CVE-2026-41328 · Severity: critical · CVSS 9.1 · Published 2026-04-24

Dgraph is an open source distributed GraphQL database. Prior to 25.3.3, a vulnerability has been found in Dgraph that gives an unauthenticated attacker full read access to every piece of data in the database. This affects Dgraph's default configuration where ACL is not enabled. The attack requires two HTTP POSTs to port 8080. The first sets up a schema predicate with @unique @index(exact) @lang via /alter (also unauthenticated in default config). The second sends a crafted JSON mutation to /mutate?commitNow=true where a JSON key contains the predicate name followed by @ and a DQL injection payload in the language tag position. The injection exploits the addQueryIfUnique function in edgraph/server.go, which constructs DQL queries using fmt.Sprintf with unsanitized predicateName that includes the raw pred.Lang value. The Lang field is extracted from JSON mutation keys by x.PredicateLang(), which splits on @, and is never validated by any function in the codebase. The attacker injects a closing parenthesis to escape the eq() function, adds an arbitrary named query block, and uses a # comment to neutralize trailing template syntax. The injected query executes server-side and its results are returned in the HTTP response. This vulnerability is fixed in 25.3.3.

Technologies: Dgraph, github.com/dgraph-io/dgraph (Go), github.com/dgraph-io/dgraph/v24 (Go), github.com/dgraph-io/dgraph/v25 (Go), github.com/hypermodeinc/dgraph/v24 (Go). Vendors: Dgraph, Go.

Quick answers

Is CVE-2026-41328 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-41328 being exploited in the wild.
How severe is CVE-2026-41328?
Critical severity, with a CVSS score of 9.1, published 24 April 2026.
Which products and versions are affected?
github.com/dgraph-io/dgraph (Go) SEMVER:introduced=0, SEMVER:introduced=0,last_affected=1.2.8; github.com/dgraph-io/dgraph/v24 (Go) SEMVER:introduced=0,last_affected=24.1.8; github.com/dgraph-io/dgraph/v25 (Go) SEMVER:introduced=0,fixed=25.3.3; github.com/hypermodeinc/dgraph/v24 (Go) SEMVER:introduced=0,fixed=24.1.9.
Is there a fix for CVE-2026-41328?
Yes. github.com/dgraph-io/dgraph/v25 (Go): upgrade to 25.3.3 or later; github.com/hypermodeinc/dgraph/v24 (Go): upgrade to 24.1.9 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
Am I affected by CVE-2026-41328?
Check whether you run Dgraph, github.com/dgraph-io/dgraph (Go), github.com/dgraph-io/dgraph/v24 (Go) or one of the others listed at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • github.com/dgraph-io/dgraph/v25 (Go): upgrade to 25.3.3 or later
    go get github.com/dgraph-io/dgraph/v25@v25.3.3
  • github.com/hypermodeinc/dgraph/v24 (Go): upgrade to 24.1.9 or later
    go get github.com/hypermodeinc/dgraph/v24@v24.1.9

Affected products

  • Dgraph
  • github.com/dgraph-io/dgraph (Go) SEMVER:introduced=0, SEMVER:introduced=0,last_affected=1.2.8
  • github.com/dgraph-io/dgraph/v24 (Go) SEMVER:introduced=0,last_affected=24.1.8
  • github.com/dgraph-io/dgraph/v25 (Go) SEMVER:introduced=0,fixed=25.3.3
  • github.com/hypermodeinc/dgraph/v24 (Go) SEMVER:introduced=0,fixed=24.1.9

Identifiers

  • CVE-2026-41328
  • GHSA-x92x-px7w-4gx4
  • GO-2026-5749

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.