/

CVE-2026-48146

Severity:

HIGH RISK

(7.7)

SSRF in Budibase OAuth2 Token Fetch

CVE-2026-48146

Deferred

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Exposure of internal services and sensitive data via server-side requests

Severity:

HIGH RISK

(7.7)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Budibase's OAuth2 token fetch flow previously issued outbound HTTP requests directly to user-supplied URLs without server-side request forgery (SSRF) protections.

A user with BUILDER role could configure the OAuth2 token endpoint to target internal services and exfiltrate sensitive data from otherwise non-public network locations.

Affected context

This vulnerability appears in Budibase's server-side OAuth2 integration logic, specifically in the function responsible for exchanging OAuth2 authorization data for tokens.

Instead of using the hardened HTTP client wrapper, this code path relied on a raw fetch(config.url) call that accepted arbitrary URLs configured by users with BUILDER permissions.

Any deployment where builders can add or modify OAuth2 connections and the application server can reach internal or metadata services is potentially exposed.

Exploit preconditions

  • Attack surface: Server-side OAuth2 token exchange endpoint, reachable through Budibase's builder interface.
  • Required access: BUILDER role (or equivalent) with permissions to configure OAuth2 connections or edit the OAuth2 token URL.
  • Trigger point: Saving or triggering an OAuth2 flow where the token endpoint URL is set to an internal or sensitive target (e.g., CouchDB, internal HTTP APIs, cloud metadata endpoints).
  • Why exploitation is possible: The OAuth2 token fetch function uses a raw HTTP request without SSRF controls such as allowlists, hostname/IP validation, or blocklists, allowing server-side requests to arbitrary URLs accessible from the Budibase server's network.

Why this happens

The core issue is an inconsistent application of SSRF defenses in outbound HTTP calls.

Budibase provides a dedicated wrapper (fetchWithBlacklist()) designed to enforce network-level restrictions and prevent access to sensitive internal addresses.

While most outbound calls (automation steps, plugin downloads, object store interactions) use this wrapper, the OAuth2 token fetch function bypassed it and called fetch(config.url) directly.

This pattern maps to CWE-918: Server-Side Request Forgery, where a server performs requests to user-controlled URLs without sufficient validation, effectively turning the server into a proxy into internal networks.

Potential impact

  • An authenticated builder may cause the server to query internal databases (e.g., CouchDB) and retrieve data not intended for exposure.
  • Internal HTTP APIs, admin dashboards, or management endpoints could be probed and have responses exfiltrated through the application.
  • Cloud metadata services (such as instance metadata endpoints) could be accessed, potentially leaking credentials, tokens, or instance configuration details.
  • Internal network topology and service behavior can be inferred, aiding further lateral movement or targeted attacks.
  • Sensitive configuration or environment data may be exposed indirectly via misconfigured internal endpoints.

General mitigation guidance

Mitigations center on enforcing consistent SSRF protections and restricting trust in user-configurable URLs:

  • Route all outbound HTTP requests through a centralized, hardened client wrapper that validates destinations against an allowlist or robust blocklist of sensitive ranges (e.g., link-local, loopback, private networks).
  • Apply strict validation to OAuth2 token endpoint URLs, favoring explicit allowlists of trusted identity providers over arbitrary endpoints.
  • Segregate application servers from highly sensitive network resources where possible and implement network-level egress controls for application tiers.
  • Reduce the privileges and accessible scope of service accounts and metadata services, limiting the value of any potential SSRF-based access.
  • Implement defense-in-depth by combining application-level validation with firewall rules and service mesh policies that constrain outbound traffic.

How teams detect issues like this

Detection efforts can focus on both code and runtime behavior:

  • Static analysis and code review:
  • Search for direct uses of generic HTTP clients (fetch, axios, etc.) that accept user-controlled URLs, ensuring they are replaced or wrapped with SSRF-aware utilities.
  • Flag any new outbound HTTP call sites that do not use the standardized secure wrapper (e.g., fetchWithBlacklist()).
  • Review OAuth2 integration paths to confirm they enforce URL validation and do not rely on arbitrary configuration input.
  • Runtime and operational monitoring:
  • Monitor outbound HTTP requests from the application, alerting on access to internal IP ranges, metadata endpoints, or unexpected domains.
  • Use egress firewall logs and service mesh telemetry to identify unusual patterns of requests originating from the Budibase server.
  • Policy enforcement:
  • Introduce CI/CD checks that block merges when new raw HTTP calls are introduced without security review.
  • Employ automated security testing tools that simulate SSRF patterns and validate that outbound requests are constrained.

Sources

SourceLink
github.comgithub.com/Budibase/budibase/security/advisories/GHSA-g6qx-g4pr-92v7

Frequently asked

questions

Exploitation requires an authenticated user with at least BUILDER-level access who can configure or modify OAuth2 connections. It is not exploitable by unauthenticated, anonymous users, but remote builders (for example, in multi-tenant or shared environments) may leverage it.

The attacker must hold a BUILDER role (or similar elevated configuration role) that allows editing OAuth2 token URLs. They do not need direct access to internal networks; the vulnerability relies on the server's own network access.

The most robust fix is to ensure that all outbound HTTP calls, including OAuth2 token requests, pass through a central SSRF-safe wrapper that enforces destination validation. Additionally, limit OAuth2 token endpoints to well-defined, trusted providers and avoid arbitrary, user-specified URLs.

Establish a standard, secure HTTP client for all server-side requests and enforce its use via code review and automated checks. Combine this with network egress controls, documented patterns for integrating external services, and clear constraints on user-configurable endpoints to minimize the risk of SSRF across the codebase.

Find out what's already
exploitable in your codebase.