Skip to main content

Dgraph CVE-2026-44840

| EUVDEUVD-2026-42237 HIGH
Improper Neutralization of Special Elements in Data Query Logic (CWE-943)
2026-06-29 https://github.com/dgraph-io/dgraph GHSA-q2m9-6jp9-c6mc
7.5
CVSS 3.1 · Vendor: https://github.com/dgraph-io/dgraph
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Reach exposed /graphql endpoint
  2. Delivery
    Send checkUserPassword with quote in password
  3. Exploit
    Break out of checkpwd string literal
  4. Execution
    Append injected DQL query blocks
  5. Persist
    Server parses and executes injection
  6. Impact
    Enumerate schema/data via touched_uids

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Query language parameterization
Exploitation Conditions

Exploitation requires that the target Dgraph deployment expose the GraphQL endpoint (default port 8080, /graphql) with GraphQL support enabled and a schema using the @secret directive, which is what surfaces the unauthenticated checkUserPassword query and the vulnerable checkpwd() rewrite path. No authentication and no user interaction are required (PR:N/UI:N per the CVSS vector), and a single crafted HTTP request suffices (AC:L). Limiting factors: the database schema must define a type with an @secret password field so checkUserPassword exists; the endpoint must be network-reachable by the attacker; and full data disclosure (versus mere existence/metrics inference via touched_uids and server logs) depends on Dgraph configuration such as debug mode or custom extensions - in default configurations injected results may be filtered from the response even though they execute server-side.

Impact

The supplied CVSS 3.1 vector AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N (7.5 High) indicates a network-reachable, low-complexity, unauthenticated attack with high confidentiality impact and no integrity or availability impact. A functional PoC exists, raising practical risk, but there is no CISA KEV listing and no EPSS score in the provided data, so widespread or automated exploitation cannot be confirmed from the inputs. There is internal tension worth noting: the vendor-rated vector scores C:H/I:N/A:N, yet the description's own impact analysis stresses data enumeration via touched_uids/server logs and resource exhaustion (DoS) - the tag set even lists 'Denial Of Service'. That suggests real-world confidentiality disclosure may be partial/side-channel (often only via metrics unless debug mode leaks results), while an availability impact is plausible but was scored as N - verify the scope of data leakage and DoS with the vendor advisory. Net: a credible, easy-to-trigger injection against an unauthenticated endpoint with a public PoC and an available patch; treat as a real priority for any internet-exposed Dgraph GraphQL endpoint, while recognizing the headline C:H may overstate guaranteed data disclosure.

Exploit ScenarioDerived

An attacker locates an internet-exposed Dgraph Alpha GraphQL endpoint and sends a single crafted HTTP POST to /graphql calling checkUserPassword with a password value containing a double-quote followed by additional DQL blocks (e.g., a has(User.name) block and a schema{} probe). The injected blocks execute server-side; the attacker confirms success by observing elevated touched_uids in the response extensions and enumerates predicates, types, and node existence, or submits expensive recursive/aggregation queries to exhaust server resources. A working PoC curl command is published in the advisory, lowering the barrier to reproduction.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 29, 2026

DQL (Dgraph Query Language) injection in Dgraph's GraphQL-to-DQL query rewriter (versions <= v25.3.3) lets remote unauthenticated attackers inject arbitrary query blocks through the unauthenticated checkUserPassword GraphQL query. User-supplied password values are interpolated into a checkpwd() DQL call via fmt.Sprintf without escaping, so a double-quote breaks out of the string literal and appends attacker-controlled DQL. A working PoC exists (publicly available exploit code exists); the issue is not in CISA KEV and no active exploitation is reported, but server-side execution of injected blocks is confirmed, enabling schema/data enumeration and resource exhaustion.

RemediationAI

Vendor-released patch: upgrade to Dgraph v25.3.4 (https://github.com/dgraph-io/dgraph/releases/tag/v25.3.4), which contains commit cee702c93f141eeb0c96a81f70830ec9e459efac escaping/parameterizing the checkpwd() password value; see advisory GHSA-q2m9-6jp9-c6mc for details. If you cannot upgrade immediately, restrict network exposure of the Alpha GraphQL endpoint (default :8080/graphql) so it is not internet-reachable - place it behind authentication, a reverse proxy, or a network ACL, accepting that this breaks legitimate external GraphQL clients. Where the @secret directive / checkUserPassword feature is not needed, remove it from the schema to eliminate the vulnerable path, at the cost of disabling password-check functionality. As an interim WAF/proxy control, reject GraphQL request bodies whose password argument contains double-quote or backslash characters, understanding this may block legitimate passwords containing those characters and can be bypassed via encoding, so it is a stopgap rather than a fix.

Affected VersionsENISA

dgraph < 25.3.4

Affected Packages

go github.com/dgraph-io/dgraph no fix
go github.com/dgraph-io/dgraph/v24 no fix
go github.com/dgraph-io/dgraph/v25 fix: 25.3.4
go github.com/hypermodeinc/dgraph/v24 no fix
euvd dgraph fix: 25.3.4

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 5 packages in go, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Dgraph is a distributed, native GraphQL graph database that compiles incoming GraphQL operations into its internal Dgraph Query Language (DQL). The flaw is rooted in CWE-943 (Improper Neutralization of Special Elements in Data Query Logic). In the rewriting layer, query_rewriter.go (~line 364) builds the password check as fmt.Sprintf(checkpwd(User.password, "%s"), password), and graphquery.go later serializes that attribute verbatim via b.WriteString(query.Attr) into the DQL string handed to the query engine. Because the raw password is concatenated rather than parameterized or escaped, a quote character terminates the literal and trailing text is parsed as additional DQL blocks. The affected component is the Go module github.com/dgraph-io/dgraph (CPE pkg:go/github.com_dgraph-io_dgraph_v25), specifically deployments that include GraphQL support with the @secret directive enabling checkUserPassword. This is a distinct code path from CVE-2026-41328 and CVE-2026-41327, which fixed DQL injection in the mutation path (edgraph/server.go) and did not cover the query rewriter.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/dgraph-io/dgraph) PRIMARY 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
vuln.today AI 6.5 MEDIUM

Unauthenticated single-request injection (AV:N/AC:L/PR:N/UI:N); confidentiality scored Low since disclosure is largely metric/config-dependent, and Availability Low reflects the documented resource-exhaustion vector.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N
SUSE HIGH

Primary rating from Vendor (https://github.com/dgraph-io/dgraph).

CVSS VectorVendor: https://github.com/dgraph-io/dgraph

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

DescriptionCVE.org

Summary

The checkUserPassword GraphQL query in Dgraph is vulnerable to DQL (Dgraph Query Language) injection. User-supplied password values are interpolated directly into a DQL checkpwd() query via fmt.Sprintf without any escaping or parameterization. An attacker can inject a password containing a double-quote character to break out of the DQL string literal and append arbitrary DQL query blocks.

Details

Vulnerable Code Path

The vulnerability exists in the GraphQL-to-DQL query rewriting layer:

  1. query_rewriter.go (~line 364) - The checkpwd() DQL function is constructed using fmt.Sprintf:
go
   fmt.Sprintf(`checkpwd(User.password, "%s")`, password)

The raw password string from the GraphQL query input is embedded directly into the DQL query without escaping double quotes or other special characters.

  1. graphquery.go - The constructed query attribute is serialized into the final DQL string via b.WriteString(query.Attr), passing the unsanitized content directly to the Dgraph query engine.

Attack Mechanism

A password value containing a double-quote (") terminates the string literal in the checkpwd() function. Any content after the escaped quote is parsed as additional DQL, allowing the attacker to inject arbitrary query blocks.

Distinction from CVE-2026-41328 and CVE-2026-41327

CVE-2026-41328 and CVE-2026-41327 address DQL injection in edgraph/server.go, where GraphQL mutation inputs (upsert/delete) are embedded unsafely into DQL mutations. Those fixes sanitize the mutation path.

This vulnerability is in a completely different code path - the GraphQL query rewriter (query_rewriter.go → graphquery.go). The checkUserPassword GraphQL query triggers a DQL *query* via checkpwd(), and this query construction was not covered by the patches for CVE-2026-41328/CVE-2026-41327.

PoC

bash
curl -s -X POST http://TARGET:8080/graphql \
  -H "Content-Type: application/json" \
  -d '{ "query": "query { checkUserPassword(name: \"admin\", password: \"x\\\") { uid } injected(func: has(User.name)) { User.name User.email } dummy(func: eq(x, \\\"x\") { msg } }") { msg } }" }'

What to observe:

  • The touched_uids field in the extensions section of the response will be elevated (indicating the injected blocks executed)
  • Dgraph server logs (dgraph alpha output) will show the injected query blocks being parsed and executed
  • The response itself may be filtered by the GraphQL layer, but server-side execution is confirmed

Impact

  • Data enumeration: Injected query blocks execute server-side and can probe for the existence of predicates, types, and nodes via touched_uids metrics and server logs.
  • Schema discovery: An attacker can enumerate all predicates and types in the database by injecting schema {} blocks or has() queries.
  • Resource exhaustion: Expensive injected queries (recursive traversals, large aggregations) execute at the DQL layer, consuming server resources regardless of whether results are returned to the attacker.
  • Potential data disclosure: Depending on Dgraph configuration (e.g., debug mode, custom extensions), injected query results may leak into the response.

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

  • Network-accessible via any GraphQL endpoint
  • No authentication required (checkUserPassword is an unauthenticated query)
  • Low attack complexity (single crafted HTTP request)
  • High confidentiality impact (server-side query execution confirmed, data enumeration possible)

Affected Versions

All versions of Dgraph that include GraphQL support with the @secret directive are affected:

  • <= v25.3.3
  • Any version where query_rewriter.go constructs checkpwd() via string interpolation

Suggested Fix

Escape or parameterize the password value before embedding it in the DQL query. At minimum, double-quote characters in the password must be escaped:

go
// Before (vulnerable):
fmt.Sprintf(`checkpwd(User.password, "%s")`, password)

// After (escaped):
escaped := strings.ReplaceAll(password, `\`, `\\`)
escaped = strings.ReplaceAll(escaped, `"`, `\"`)
fmt.Sprintf(`checkpwd(User.password, "%s")`, escaped)

Ideally, Dgraph should implement parameterized query support for the checkpwd() function to avoid string interpolation entirely, consistent with best practices for injection prevention.

Credit

Kai Aizen (kai.aizen.dev@gmail.com)

Executive ViewAI

Why It Matters

Dgraph databases running version 25.3.3 or earlier contain an unauthenticated query injection vulnerability that allows remote attackers to enumerate database schemas and exhaust system resources. Organizations using Dgraph with exposed GraphQL endpoints face data discovery and service disruption risks requiring immediate patching.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.5%
Top 62% exploitable
Prevalence
Low
niche graph database, limited production footprint versus mainstream databases
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
5 sources
Confidence: Medium
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.5%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

58
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

NoSQL injection exploits databases that don't use traditional SQL syntax-like MongoDB, CouchDB, or Redis-by manipulating queries through unsanitized user input.

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SUSE Linux Enterprise Server 16.1 Affected
SUSE Linux Enterprise Server for SAP applications 16.1 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP5 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP6 Affected
openSUSE Leap 15.5 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy