Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/dgraph-io/dgraph
  4. ›
  5. CVE-2026-41327

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

April 24, 2026

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

FieldValue
TitlePre-Auth DQL Injection via Unsanitized Cond Field in Upsert Mutations
TypeInjection
CWECWE-943 (Improper Neutralization of Special Elements in Data Query Logic)
CVSS9.8

References

  • github.com/advisories/GHSA-mrxx-39g5-ph77
  • github.com/dgraph-io/dgraph
  • github.com/dgraph-io/dgraph/releases/tag/v25.3.3
  • github.com/dgraph-io/dgraph/security/advisories/GHSA-mrxx-39g5-ph77
  • nvd.nist.gov/vuln/detail/CVE-2026-41327

Code Behaviors & Features

Detect and mitigate CVE-2026-41327 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions up to 1.2.8

Solution

Unfortunately, there is no solution available yet.

Impact 9.1 CRITICAL

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

Learn more about CVSS

Weakness

  • CWE-943: Improper Neutralization of Special Elements in Data Query Logic

Source file

go/github.com/dgraph-io/dgraph/CVE-2026-41327.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 28 Apr 2026 12:20:40 +0000.