Server: Budibase: NoSQL Injection via JSON Parameter Interpolation in MongoDB Query Execution
Budibase server versions up to 3.38.1 contain a NoSQL injection vulnerability in the MongoDB query execution endpoint POST /api/v2/queries/:queryId. The vulnerability arises from unsafe interpolation of user-supplied parameters into JSON query templates without proper escaping or sanitization of JSON structural characters. This allows authenticated app users with query write permissions to manipulate query filters, enabling unauthorized reading, modification, or deletion of arbitrary MongoDB documents. The endpoint lacks strict schema validation and restricts only Handlebars syntax but not JSON metacharacters, facilitating injection attacks.
AI Analysis
Technical Summary
Budibase's MongoDB query execution endpoint is vulnerable to NoSQL injection due to unsafe interpolation of user parameters into JSON query templates using Handlebars with escaping disabled. The validateQueryInputs() function blocks Handlebars bindings but does not sanitize JSON structural characters such as quotes or braces. This allows attackers to inject JSON metacharacters into parameters, altering the structure of MongoDB queries after JSON.parse(), bypassing intended filters. The resulting manipulated queries are executed directly against MongoDB collections, enabling attackers with query write permissions to read, modify, or delete arbitrary documents. The endpoint requires only PermissionType.QUERY with PermissionLevel.WRITE, accessible to regular app users, and does not enforce Joi schema validation on the request body, increasing risk.
Potential Impact
An attacker with authenticated access as a regular app user and query write permissions can exploit this vulnerability to bypass intended query filters. This enables unauthorized data exfiltration by reading all documents in a MongoDB collection, including sensitive user or tenant data. Additionally, attackers can perform bulk modifications or deletions of documents by injecting broadened filters into updateMany or deleteMany queries. This can lead to significant data loss or unauthorized data manipulation within the affected Budibase instance.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, restrict query write permissions to trusted users only and avoid exposing the vulnerable query execution endpoint to untrusted users. Review and sanitize all user-supplied parameters to prevent injection of JSON metacharacters. Implement strict schema validation on the request body to reject malicious inputs. Monitor vendor communications for official patches or updates addressing this vulnerability.
Server: Budibase: NoSQL Injection via JSON Parameter Interpolation in MongoDB Query Execution
Description
Budibase server versions up to 3.38.1 contain a NoSQL injection vulnerability in the MongoDB query execution endpoint POST /api/v2/queries/:queryId. The vulnerability arises from unsafe interpolation of user-supplied parameters into JSON query templates without proper escaping or sanitization of JSON structural characters. This allows authenticated app users with query write permissions to manipulate query filters, enabling unauthorized reading, modification, or deletion of arbitrary MongoDB documents. The endpoint lacks strict schema validation and restricts only Handlebars syntax but not JSON metacharacters, facilitating injection attacks.
CVSS v3.1
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Budibase's MongoDB query execution endpoint is vulnerable to NoSQL injection due to unsafe interpolation of user parameters into JSON query templates using Handlebars with escaping disabled. The validateQueryInputs() function blocks Handlebars bindings but does not sanitize JSON structural characters such as quotes or braces. This allows attackers to inject JSON metacharacters into parameters, altering the structure of MongoDB queries after JSON.parse(), bypassing intended filters. The resulting manipulated queries are executed directly against MongoDB collections, enabling attackers with query write permissions to read, modify, or delete arbitrary documents. The endpoint requires only PermissionType.QUERY with PermissionLevel.WRITE, accessible to regular app users, and does not enforce Joi schema validation on the request body, increasing risk.
Potential Impact
An attacker with authenticated access as a regular app user and query write permissions can exploit this vulnerability to bypass intended query filters. This enables unauthorized data exfiltration by reading all documents in a MongoDB collection, including sensitive user or tenant data. Additionally, attackers can perform bulk modifications or deletions of documents by injecting broadened filters into updateMany or deleteMany queries. This can lead to significant data loss or unauthorized data manipulation within the affected Budibase instance.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, restrict query write permissions to trusted users only and avoid exposing the vulnerable query execution endpoint to untrusted users. Review and sanitize all user-supplied parameters to prevent injection of JSON metacharacters. Implement strict schema validation on the request body to reject malicious inputs. Monitor vendor communications for official patches or updates addressing this vulnerability.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-qw6m-8fw2-2v64
- Osv Schema Version
- 1.4.0
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- HIGH
- Cvss Version
- 3.1
Threat ID: 6a65422c9c2644c7f808a48c
Added to database: 07/25/2026, 23:09:32 UTC
Last enriched: 07/25/2026, 23:56:23 UTC
Last updated: 07/26/2026, 03:46:04 UTC
Views: 6
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.
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.