{"id":"CVE-2026-41328","published":"2026-04-24T18:25:43Z","modified":"2026-04-24T19:57:59Z","title":"Dgraph: Pre-Auth Full Database Exfiltration via DQL Injection in NQuad Lang Field","vendor":"dgraph-io","product":"dgraph","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.1,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00431,"percentile":0.38092,"provenance":"source"},"cwes":[{"id":"CWE-943","name":"Improper Neutralization of Special Elements in Data Query Logic"}],"references":[{"url":"https://github.com/dgraph-io/dgraph/security/advisories/GHSA-x92x-px7w-4gx4","tags":["x_refsource_CONFIRM"]}],"priority":{"score":14.0,"factors":[{"name":"EPSS percentile","points":7.62},{"name":"CVSS severity","points":6.37}]},"vendorSlug":"dgraph-io","affectedVersions":[{"vendor":"dgraph-io","product":"dgraph","versions":["< 25.3.3"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"total","timestamp":"2026-04-24T19:57:33.326072Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Go","package":"github.com/dgraph-io/dgraph/v25","vulnerableRanges":["<25.3.3"],"patched":["25.3.3"],"from":["GHSA-x92x-px7w-4gx4","GO-2026-5749"],"provenance":"source"},{"ecosystem":"Go","package":"github.com/dgraph-io/dgraph/v24","vulnerableRanges":["<=24.1.8"],"patched":[],"from":["GHSA-x92x-px7w-4gx4"],"provenance":"source"},{"ecosystem":"Go","package":"github.com/dgraph-io/dgraph","vulnerableRanges":["<=1.2.8","all versions"],"patched":[],"from":["GHSA-x92x-px7w-4gx4","GO-2026-5749"],"provenance":"source"},{"ecosystem":"Go","package":"github.com/hypermodeinc/dgraph/v24","vulnerableRanges":["<24.1.9"],"patched":["24.1.9"],"from":["GO-2026-5749"],"provenance":"source"}],"summary":{"text":"Dgraph, the open source distributed GraphQL database, has a DQL injection flaw in its mutation handling: the language tag portion of a JSON mutation key is passed unsanitised into queries built by the addQueryIfUnique function in edgraph/server.go. An unauthenticated attacker with network access to port 8080 can exploit this by first creating a schema predicate via /alter and then sending a crafted mutation to /mutate, with no authentication required in the default configuration where ACLs are not enabled, to run injected queries and read the database contents returned in the HTTP response.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:36:28Z"},"euvd":{"id":"EUVD-2026-25595","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2026-34976","published":"2026-04-06","fixed":"24.1.6","kev":false},{"cve":"CVE-2026-41327","published":"2026-04-24","fixed":"24.1.8","kev":false,"link":{"from":"CVE-2026-41327","to":"CVE-2026-41328","relation":"successor","confidence":"medium","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"Go:github.com/hypermodeinc/dgraph/v24","fromFixed":"24.1.8","toFixed":"24.1.9","daysApart":0},{"kind":"similar","provenance":"machine","score":0.38,"basis":"same product + CWE + description similarity"}]}},{"cve":"CVE-2026-40173","published":"2026-04-15","fixed":"24.1.9","kev":false,"link":{"from":"CVE-2026-40173","to":"CVE-2026-41328","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Go:github.com/dgraph-io/dgraph/v25","fromFixed":"25.3.2","toFixed":"25.3.3","daysApart":9}]}},{"cve":"CVE-2026-41328","published":"2026-04-24","fixed":"24.1.9","kev":false},{"cve":"CVE-2026-41492","published":"2026-04-24","fixed":"24.1.9","kev":false}],"package":"Go:github.com/hypermodeinc/dgraph/v24"}}