CVE-2026-41328: CWE-943: Improper Neutralization of Special Elements in Data Query Logic in dgraph-io dgraph
Dgraph is an open source distributed GraphQL database. Prior to 25.3.3, 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 requires two HTTP POSTs to port 8080. The first sets up a schema predicate with @unique @index(exact) @lang via /alter (also unauthenticated in default config). The second sends a crafted JSON mutation to /mutate?commitNow=true where a JSON key contains the predicate name followed by @ and a DQL injection payload in the language tag position. The injection exploits the addQueryIfUnique function in edgraph/server.go, which constructs DQL queries using fmt.Sprintf with unsanitized predicateName that includes the raw pred.Lang value. The Lang field is extracted from JSON mutation keys by x.PredicateLang(), which splits on @, and is never validated by any function in the codebase. The attacker injects a closing parenthesis to escape the eq() function, adds an arbitrary named query block, and uses a # comment to neutralize trailing template syntax. The injected query executes server-side and its results are returned in the HTTP response. This vulnerability is fixed in 25.3.3.
AI Analysis
Technical Summary
CVE-2026-41328 affects Dgraph, an open source distributed GraphQL database, in versions before 25.3.3. The vulnerability arises from improper sanitization of the 'Lang' field extracted from JSON mutation keys, which is used unsafely in constructing DQL queries via fmt.Sprintf in the addQueryIfUnique function. An attacker can perform two unauthenticated HTTP POST requests to port 8080: first to set up a schema predicate with specific attributes via /alter, then to send a crafted JSON mutation to /mutate?commitNow=true containing a DQL injection payload in the language tag position. This injection allows execution of arbitrary DQL queries server-side, exposing all database data. The issue is due to lack of validation of the Lang field and unsafe query construction. The vulnerability is resolved in Dgraph version 25.3.3.
Potential Impact
An unauthenticated attacker can exploit this vulnerability to execute arbitrary DQL queries, resulting in full read access to all data stored in the affected Dgraph database instances configured with default settings (ACL disabled). This compromises confidentiality but does not affect integrity or availability. The CVSS 3.1 score is 9.1 (critical), reflecting network attack vector, no privileges or user interaction required, and high impact on confidentiality and integrity.
Mitigation Recommendations
A fix is available in Dgraph version 25.3.3. Users should upgrade to version 25.3.3 or later to remediate this vulnerability. Until upgraded, enabling Access Control Lists (ACL) can mitigate the risk by preventing unauthenticated access. Patch status is not explicitly stated in vendor advisory content, but the description confirms the vulnerability is fixed in 25.3.3.
CVE-2026-41328: CWE-943: Improper Neutralization of Special Elements in Data Query Logic in dgraph-io dgraph
Description
Dgraph is an open source distributed GraphQL database. Prior to 25.3.3, 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 requires two HTTP POSTs to port 8080. The first sets up a schema predicate with @unique @index(exact) @lang via /alter (also unauthenticated in default config). The second sends a crafted JSON mutation to /mutate?commitNow=true where a JSON key contains the predicate name followed by @ and a DQL injection payload in the language tag position. The injection exploits the addQueryIfUnique function in edgraph/server.go, which constructs DQL queries using fmt.Sprintf with unsanitized predicateName that includes the raw pred.Lang value. The Lang field is extracted from JSON mutation keys by x.PredicateLang(), which splits on @, and is never validated by any function in the codebase. The attacker injects a closing parenthesis to escape the eq() function, adds an arbitrary named query block, and uses a # comment to neutralize trailing template syntax. The injected query executes server-side and its results are returned in the HTTP response. This vulnerability is fixed in 25.3.3.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-41328 affects Dgraph, an open source distributed GraphQL database, in versions before 25.3.3. The vulnerability arises from improper sanitization of the 'Lang' field extracted from JSON mutation keys, which is used unsafely in constructing DQL queries via fmt.Sprintf in the addQueryIfUnique function. An attacker can perform two unauthenticated HTTP POST requests to port 8080: first to set up a schema predicate with specific attributes via /alter, then to send a crafted JSON mutation to /mutate?commitNow=true containing a DQL injection payload in the language tag position. This injection allows execution of arbitrary DQL queries server-side, exposing all database data. The issue is due to lack of validation of the Lang field and unsafe query construction. The vulnerability is resolved in Dgraph version 25.3.3.
Potential Impact
An unauthenticated attacker can exploit this vulnerability to execute arbitrary DQL queries, resulting in full read access to all data stored in the affected Dgraph database instances configured with default settings (ACL disabled). This compromises confidentiality but does not affect integrity or availability. The CVSS 3.1 score is 9.1 (critical), reflecting network attack vector, no privileges or user interaction required, and high impact on confidentiality and integrity.
Mitigation Recommendations
A fix is available in Dgraph version 25.3.3. Users should upgrade to version 25.3.3 or later to remediate this vulnerability. Until upgraded, enabling Access Control Lists (ACL) can mitigate the risk by preventing unauthenticated access. Patch status is not explicitly stated in vendor advisory content, but the description confirms the vulnerability is fixed in 25.3.3.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-20T14:01:46.672Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69ebb81d87115cfb68646f73
Added to database: 4/24/2026, 6:36:13 PM
Last enriched: 4/24/2026, 6:51:12 PM
Last updated: 4/25/2026, 5:41:16 AM
Views: 10
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.