# CVE-2026-54350: Budibase: Anonymous NoSQL operator injection via published-app query templates

> Unauthenticated attackers can inject NoSQL operators into published app queries to read or modify all documents in the backing database.

- **Severity:** Critical 10.0 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 26 Jun 2026
- **Updated:** 30 Jun 2026
- **Also known as:** GHSA-8qv3-p479-cj62

## What is CVE-2026-54350?

CVE-2026-54350 is a critical code injection vulnerability in budibase, published on 26 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Budibase is an open-source low-code platform. Prior to 3.39.12,  an unauthenticated visitor of any published Budibase app reads every document of the backing MongoDB, CouchDB, Elasticsearch, DynamoDB-PartiQL, or REST-with-JSON-body collection and, where the builder has published a PUBLIC write query, modifies every document of that collection with one HTTP request. enrichContext at packages/server/src/sdk/workspace/queries/queries.ts:121-138 substitutes parameter values into the raw JSON body of a query, then JSON.parses the result. The validator validateQueryInputs at packages/server/src/api/controllers/query/index.ts:61-71 rejects only Handlebars markers ({{, }}) in user input and does not escape JSON metacharacters (", \, }). A parameter value containing a closing quote and additional keys lifts attacker-controlled fields into the parsed filter object. For Mongo find, the parsed filter passes directly to collection.find() (packages/server/src/integrations/mongodb.ts:506-510). Duplicate-key JSON parsing overrides the builder's {name: "..."} with {name: {$exists: true}} and returns every document. The same primitive against an updateMany query (mongodb.ts:577-585) widens the filter scope to the full collection while the builder-controlled $set body runs against every matched document. The authorized middleware at packages/server/src/middleware/authorized.ts:141-148 short-circuits when the query's role is PUBLIC. CSRF is not enforced on this path. POST /api/v2/queries/:queryId (packages/server/src/api/routes/query.ts:63) accepts the call with no session, only an x-budibase-app-id header that is public from the published-app URL. This vulnerability is fixed in 3.39.12.

Weakness: CWE-943 (Improper Neutralization of Special Elements in Data Query Logic), CWE-89 (Improper Neutralization of Special Elements used in an SQL Command)

## Which versions are affected by CVE-2026-54350?

2 open source packages ship an affected version, including @budibase/server. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@budibase/server` | npm | All versions | 3.39.12 |
| `@budibase/server` | npm | All versions | 3.39.12 |

Products: Budibase Budibase.

## How do I fix CVE-2026-54350?

Upgrade @budibase/server to 3.39.12 or later.

## Is CVE-2026-54350 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-54350 exists.

Public exploit code:

- PoC for CVE-2026-54350 — Budibase unauthenticated NoSQL operator injection (CVSS 10.0). Read/mass-write any document collection via a PUBLIC query. (github_poc): https://github.com/BiiTts/CVE-2026-54350-Budibase-NoSQL-Injection

## Other vulnerabilities in budibase

- [CVE-2026-27702](https://insights.sbomify.com/CVE-2026-27702/): Budibase Vulnerable to Remote Code Execution via Unsafe eval() in View Filter Map Function (Budibase Cloud) (critical 9.9)
- [CVE-2026-54352](https://insights.sbomify.com/CVE-2026-54352/): Budibase: Arbitrary file read by workspace-builder via PWA-zip symlink upload (critical 9.6)
- [CVE-2026-31818](https://insights.sbomify.com/CVE-2026-31818/): Budibase: Server-Side Request Forgery via REST Connector with Empty Default Blacklist (critical 9.6)
- [CVE-2026-30240](https://insights.sbomify.com/CVE-2026-30240/): Budibase PWA ZIP Upload Path Traversal Allows Reading Arbitrary Server Files Including All Environment Secrets (critical 9.6)
- [CVE-2026-41428](https://insights.sbomify.com/CVE-2026-41428/): Budibase: Authentication Bypass via Unanchored Regex in Public Endpoint Matcher — Unauthenticated Access to Protected Endpoints (critical 9.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-54350 and fix it if it is affected.

What it is: CVE-2026-54350 is a critical code injection vulnerability in budibase, published on 26 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-54350 exists.

Affected packages and fixed versions:
- @budibase/server (npm): affected all versions; fixed in 3.39.12
- @budibase/server (npm): affected all versions; fixed in 3.39.12

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-54350/ (Markdown: https://insights.sbomify.com/CVE-2026-54350/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-54350
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-54350
- OSV: https://osv.dev/vulnerability/CVE-2026-54350

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-54350/
Summaries are generated and may contain mistakes; the official description above is the record.
