Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ CVE-2026-41327 — dgraph

🔴 CVSS 9.5 — Critical ⚠️ Exploit Public CWE-943 NVD
9.5
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

Dgraph: Pre-Auth Full Database Exfiltration via DQL Injection in Upsert Condition Field

1. Executive Summary

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 is a single HTTP POST to /mutate?commitNow=true containing a crafted cond field in an upsert mutation. The cond value is concatenated directly into a DQL query string via strings.Builder.WriteString after only a cosmetic strings.Replace transformation. No escaping, parameterization, or structural validation is applied. An attacker injects an additional DQL query block into the cond string, which the DQL parser accepts as a syntactically valid named query block. The injected query executes server-side and its results are returned in the HTTP response.

There are no credentials involved. When ACL is disabled (the default), the /mutate endpoint requires no authentication. The authorizeQuery and authorizeMutation functions both return nil immediately when AclSecretKey is not configured. Even when ACL is enabled, a user with mutation-only permission can inject read queries that bypass per-predicate ACL authorization, because the injected query block is not subject to the normal authorization flow.

POC clip:

https://github.com/user-attachments/assets/edf43615-b0d5-46cd-abd9-2cb9423790d2

2. CVSS Score

CVSS 3.1: 9.1 (Critical)

```

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

```

| Metric | Value | Rationale |

| ------------------- | --------- | ---------------------------------------------------------------------------------- |

| Attack Vector | Network | HTTP POST to port 8080 |

| Attack Complexity | Low | Single request, no special conditions beyond default config |

| Privileges Required | None | No authentication when ACL is disabled (default) |

| User Interaction | None | Fully automated |

| Scope | Unchanged | Stays within the Dgraph data layer |

| Confidentiality | High | Full database exfiltration: all nodes, all predicates, all values |

| Integrity | High | The injection can also be used to manipulate upsert conditions, bypassing uniqueness constraints and conditional mutation logic |

| Availability | None | No denial of service |

3. Vulnerability Summary

| Field | Value |

| --------- | ------------------------------------------------------------------------------------------ |

| Title | Pre-Auth DQL Injection via Unsanitized Cond Field in Upsert Mutations |

| Type | Injection |

| CWE | CWE-943 (Improper Neutralization of Special Elements in Data Query Logic) |

| CVSS | 9.8 |

4. Target Information

| Field | Value |

| -------------------- | ---------------------------------------------------------------------------------------------- |

| Project | Dgraph |

| Repository | https://github.com/dgraph-io/dgraph |

| Tested version | v25.3.0 |

| HTTP handler | dgraph/cmd/alpha/http.go line 345 (mutationHandler) |

| Cond extraction | dgraph/cmd/alpha/http.go line 413 (strconv.Unquote) |

| Cond passthrough | edgraph/server.go line 2011 (ParseMutationObject, copies mu.Cond verbatim) |

| Injection sink | edgraph/server.go line 750 (upsertQB.WriteString(cond)) |

| Only transformation | edgraph/server.go line 730 (strings.Replace(gmu.Cond, "@if", "@filter", 1)) |

| Auth bypass (query) | edgraph/access.go line 958 (authorizeQuery returns nil when AclSecretKey == nil) |

| Auth bypass (mutate) | edgraph/access.go line 788 (authorizeMutation returns nil when AclSecretKey == nil) |

| Response exfiltration| `dgr

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality high, integrity high, availability none.

CVSS metrics in full

The score comes from this vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

  • Attack vector: Network — reachable from anywhere that can route to the service.
  • Attack complexity: Low — the attack works reliably, with no preparation.
  • Privileges required: None — an unauthenticated stranger can try it.
  • User interaction: None — nobody has to be tricked into anything.
  • Scope: Unchanged — the damage stays inside the vulnerable component.
  • Confidentiality impact: High — total loss, or loss the attacker controls.
  • Integrity impact: High — total loss, or loss the attacker controls.
  • Availability impact: None.

Weakness class

CVE-2026-41327 is classified as CWE-943: Improper Neutralization of Special Elements in Data Query Logic. The product generates a query intended to access or manipulate data in a data store such as a database, but it does not neutralize or incorrectly neutralizes special elements that can modify the intended logic of the query.

Affected software

CVE-2026-41327 is recorded against 5 packages.

  • dgraph (fixed in 25.3.3)
  • github.com/dgraph-io/dgraph
  • github.com/dgraph-io/dgraph/v24
  • github.com/dgraph-io/dgraph/v25
  • github.com/hypermodeinc/dgraph/v24

Timeline and source

Published on 24 April 2026 and last revised on 17 June 2026. A public exploit is known to exist, which raises the urgency of patching considerably. Record sourced from NVD.

References

github.com
github.com
github.com

Other advisories for this package

dgraph has other advisories on record. If you are patching this one, these are worth checking on the same host:

Same weakness in other software

These advisories are the same class of weakness (CWE-943: Improper Neutralization of Special Elements in Data Query Logic) in other software:

Details

Severity CRITICAL
CVSS Score 9.5
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
CWE CWE-943
Public Exploit ⚠️ Yes
Source NVD
Published 2026-04-24
Updated 2026-08-20
Modified 2026-06-17
Fix URL N/A

Affected Packages

Software From version Fixed in
dgraph — 25.3.3
github.com/dgraph-io/dgraph — —
github.com/dgraph-io/dgraph/v24 — —
github.com/dgraph-io/dgraph/v25 — —
github.com/hypermodeinc/dgraph/v24 — —

Similar Threats

Exploit Protection

Are you running dgraph?

CVE-2026-41327 carries CVSS 9.5 Critical rating and a public exploit already exists. BotEraser checks your installation against this and other known CVE records, and blocks IPs associated with exploit activity.

Check My Site For CVE-2026-41327 →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2026
✓