CVE-2026-48152: Budibase Remote Code Execution Vulnerability
HIGHCVE-2026-48152 is a HIGH (CVSS 8.1) remote code execution vulnerability (CWE-863: Incorrect Authorization) affecting Budibase libraries in the npm ecosystem. The issue involves basic app users can exfiltrate stored rest datasource auth by rewriting datasource base url. Remediation is available by upgrading affected packages to version 3.39.0.
CVE-2026-48152 at a Glance
Security Impact
CVSS: 8.1
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:U/C:H/I:H/A:N).
How to Fix CVE-2026-48152
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/server@3.39.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @budibase/server
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-48152, inspect your project dependencies using npm:
npm ls @budibase/server
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.39.0), your application is affected.
Note: The npm ls @budibase/server 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-863: Incorrect Authorization, where the product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. 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-48152 Affected Budibase Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@budibase/server
|
npm |
< 3.39.0
|
3.39.0
|
References
Frequently Asked Questions
What is CVE-2026-48152?
Which Budibase versions are affected?
What version fixes CVE-2026-48152?
Is @budibase/server affected?
What is the CVSS score of CVE-2026-48152?
What CWE is associated with CVE-2026-48152?
How can I check npm dependencies for CVE-2026-48152?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3gp5-q4jw-3v94",
"modified" : "2026-06-12T18:28:40Z",
"published" : "2026-06-12T18:28:40Z",
"aliases" : [ "CVE-2026-48152" ],
"summary" : "Budibase: Basic app users can exfiltrate stored REST datasource auth by rewriting datasource base URL",
"details" : "### Summary\nBudibase stores external REST datasource credentials server-side and documents that database credentials are applied server-side and are not exposed in the UI. The REST datasource implementation redacts stored Basic/Bearer/OAuth2 auth secrets before returning datasource data to clients. However, the single-datasource `GET` and `PUT` routes are guarded by generic `TABLE READ`, not by Builder/Admin permission or datasource-specific ownership/resource checks.\n\nThe built-in Basic app user role maps to the `WRITE` permission set, which includes table read/write and query write. A Basic user can therefore read an existing REST datasource, receive redacted `authConfigs` values, submit an update that changes only `config.url` while keeping the redacted placeholders, and trigger an existing saved relative-path REST query. During update, `mergeConfigs()` restores the old stored secret when it sees the redaction placeholder. During query execution, Budibase prefixes the attacker-controlled datasource `config.url` to the relative query path and applies the resolved stored auth headers. The result is server-side disclosure of the builder-configured REST Authorization secret to an attacker-controlled listener.\n\n### Source evidence\n- `packages/server/src/api/routes/datasource.ts`: datasource list/create/delete routes are on `builderRoutes`, but `GET /api/datasources/:datasourceId` and `PUT /api/datasources/:datasourceId` are in `authorizedRoutes` guarded only by `PermissionType.TABLE` and `PermissionLevel.READ`.\n- `packages/server/src/api/routes/datasource.ts`: the `:datasourceId` routes do not attach datasource-specific resource authorization.\n- `packages/backend-core/src/security/roles.ts`: built-in Basic user maps to `BuiltinPermissionID.WRITE`.\n- `packages/backend-core/src/security/permissions.ts`: `WRITE` grants `READ`/`EXECUTE` levels and includes `QUERY WRITE` and `TABLE WRITE`.\n- `packages/server/src/api/controllers/datasource.ts`: `datasourceController.update` reads the stored datasource, merges `ctx.request.body` into it, writes the result back, and returns a redacted copy.\n- `packages/server/src/sdk/workspace/datasources/datasources.ts`: `removeSecrets()` redacts REST Basic/Bearer/OAuth2 secrets to `PASSWORD_REPLACEMENT`.\n- `packages/server/src/sdk/workspace/datasources/datasources.ts`: `mergeConfigs()` restores the old stored auth-secret field when the update body sends the redaction placeholder for the same auth config.\n- `packages/server/src/integrations/rest.ts`: relative REST query paths are prefixed with datasource `config.url`.\n- `packages/server/src/integrations/rest.ts`: REST execution resolves the selected auth config and applies the resulting auth headers to the outbound request.\n- `packages/server/src/api/routes/query.ts`: saved query execution `POST /api/v2/queries/:queryId` is guarded by `QUERY WRITE`, which the Basic role has through the `WRITE` permission set.\n\n### Reproduction outline\nNo production systems were tested. This is source-backed and has a local static verifier plus a proof helper for an already-running authorized instance.\n\n1. Deploy a current Budibase instance.\n2. As a builder/admin, create and publish an app.\n3. As the builder/admin, create a REST datasource with:\n - `config.url` set to a benign legitimate API base URL.\n - a stored REST auth config containing a sentinel secret, such as a Bearer token `BUDIBASE_REST_TOKEN_SENTINEL`.\n4. As the builder/admin, create a saved REST query that uses a relative path and that auth config.\n5. Add a non-builder Basic app user.\n6. As the Basic user, confirm negative controls:\n - Builder-only datasource list/create/preview routes are denied.\n - The user is not a builder/admin.\n7. As the Basic user, call `GET /api/datasources/{datasourceId}`. The response returns the datasource and redacted auth placeholders, not the raw secret.\n8. As the Basic user, call `PUT /api/datasources/{datasourceId}` with the same redacted datasource body but with `config.url` changed to an attacker-controlled HTTP listener.\n9. As the Basic user, execute the saved query with `POST /api/v2/queries/{queryId}`.\n10. Expected vulnerable result: the attacker listener receives the server-side REST request with the preserved stored Authorization material, even though the Basic user never knew the raw secret and should not be able to administer datasource credentials.\n\nLocal source verifier:\n\n```bash\npython3 docker-proofs/s60/verify_budibase_basic_user_datasource_source_path.py\n```\n\nExpected success line:\n\n```text\nSOURCE_PATH_VERIFIED budibase_basic_user_datasource_rest_secret_exfil\n```\n\nObserved May 1, 2026:\n\n- `origin/master` was `8e6bf89acf1f602f3334592c4c8cd14e79f5362a`.\n- Latest release was `3.37.2` from Apr 30, 2026.\n- The source verifier passed and confirmed the route, role, redaction, merge, URL-prefixing, auth-header, and saved-query execution conditions.\n\nProof-assist helper:\n\n```bash\npython3 docker-proofs/s60/proof_budibase_basic_user_datasource_update_rest_secret_exfil.py \\\n --base-url http://127.0.0.1:10000 \\\n --app-id <published-app-id> \\\n --datasource-id <rest-datasource-id> \\\n --query-id <saved-relative-rest-query-id> \\\n --cookie '<basic-user-session-cookie>' \\\n --expected-secret BUDIBASE_REST_TOKEN_SENTINEL\n```\n\nThe helper does not start, stop, or delete containers/resources. It targets an authorized already-running instance, rewrites only `config.url`, captures the outbound Authorization material, and restores the original datasource by default.\n\n### Impact\nThis breaks the intended application-user versus builder/admin boundary for external REST datasource credentials. A Basic app user should be able to use published app functionality, but should not be able to administer datasource connection settings or extract builder-configured REST auth secrets. In a realistic internal-tool deployment, REST datasource auth configs often contain bearer tokens, API keys, Basic credentials, OAuth client secrets, service account tokens, or integration credentials for ticketing, CRM, ERP, security, and operational systems.\n\nAn attacker with only Basic app-user access to an app that uses an authenticated REST datasource can redirect future query traffic to an attacker-controlled endpoint and collect the preserved server-side Authorization header. This is distinct from public REST datasource SSRF issues because the core impact is stored credential disclosure across the role boundary, and it works with an external attacker-controlled URL rather than depending on internal-network reachability.\n\n### Remediation ideas\n- Move `GET`/`PUT /api/datasources/:datasourceId` behind Builder/Admin datasource permissions, or add datasource-specific resource authorization.\n- Do not allow non-builder app users to update datasource `config`, `authConfigs`, base URL, default headers, or plugin connection settings.\n- Split non-sensitive datasource metadata reads from credential-bearing/admin datasource reads.\n- Treat redaction placeholders as valid only in trusted builder/admin update flows.\n- Consider rotating REST datasource auth secrets for affected deployments after patching.\n\n### Duplicate/nearby public issue notes\nPublic triage found known Budibase REST datasource SSRF and protected-endpoint auth-bypass CVEs, but no obvious public duplicate for this specific Basic app-user `PUT /api/datasources/:id` role-boundary issue combined with preserved REST `authConfigs` secret exfiltration through a changed datasource base URL.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@budibase/server"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.39.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/Budibase/budibase/security/advisories/GHSA-3gp5-q4jw-3v94"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-48152"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/Budibase/budibase"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-863" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-06-12T18:28:40Z",
"nvd_published_at" : "2026-05-27T18:16:27Z"
}
}