/

CVE-2026-33226

Severity:

HIGH RISK

(8.7)

SSRF in Budibase REST Datasource Query Preview

CVE-2026-33226

Analyzed

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Internal network access and cloud metadata compromise via SSRF

Severity:

HIGH RISK

(8.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 REST datasource query preview endpoint allows authenticated admins to supply arbitrary URLs that the server will request on their behalf, without sufficient validation.

This behavior can be abused to reach internal services and cloud metadata endpoints that are not exposed to the internet, enabling token theft, internal network enumeration, and broader cloud compromise depending on the environment.

Affected context

The vulnerability arises in Budibase deployments that:

  • Use versions 3.30.6 and prior
  • Expose the REST datasource query preview endpoint at POST /api/queries/preview
  • Allow authenticated admin users to configure REST queries that specify arbitrary URLs in fields.path
  • Run within an environment where internal services, cloud metadata endpoints, or internal network resources are reachable from the Budibase server

The risk is elevated in cloud deployments (AWS, GCP, Azure) where metadata endpoints can issue tokens with broad scopes.

Exploit preconditions

  • Attack surface: The Budibase HTTP API, specifically POST /api/queries/preview
  • Required access: Authenticated admin privileges in Budibase (or an account with equivalent access to REST datasource configuration and preview)
  • Trigger point: Submitting a query preview request that sets fields.path to an attacker-controlled URL, causing the server to perform an outbound HTTP request
  • Why exploitation is possible: The endpoint performs server-side HTTP requests directly to user-supplied URLs without enforcing network-level or host-level restrictions and without robust validation against internal IP ranges, metadata endpoints, or reserved hosts

Why this happens

This issue is a classic instance of Server-Side Request Forgery (SSRF), mapped to CWE-918.

The affected Budibase endpoint is designed to help admins preview REST queries by having the server send HTTP requests to configured URLs. However, the implementation trusts the user-supplied fields.path parameter and forwards requests to arbitrary URLs without:

  • Restricting destinations to a safe allowlist
  • Blocking access to internal IP ranges and cloud metadata addresses
  • Enforcing DNS or protocol-level safeguards to prevent pivoting into internal networks

By conflating user-controlled configuration with trusted server-side network access, the application exposes its privileged network position to authenticated users, allowing them to route traffic into otherwise unreachable internal or cloud control-plane services.

Potential impact

  • Access to cloud provider metadata services, including:
  • On GCP, theft of OAuth2 tokens with cloud-platform scope, which can allow broad or full access to GCP resources for that project or account
  • On AWS or Azure, retrieval of instance credentials or access tokens associated with the running workload
  • Enumeration and probing of internal network services (e.g., databases, message brokers, internal HTTP APIs, Kubernetes control-plane endpoints, or services bound only to private interfaces)
  • Interaction with internal Kubernetes APIs and in-cluster services, potentially leading to lateral movement within the cluster
  • Discovery of internal hostnames, IP ranges, ports, and service behaviors that can be combined with other vulnerabilities for further compromise
  • Indirect data exposure if internal HTTP services respond with sensitive configuration, secrets, or system metadata

General mitigation guidance

Mitigation generally focuses on constraining server-initiated HTTP requests and hardening the app's network trust boundaries rather than relying solely on user discipline.

Useful defensive patterns include:

  • Destination allowlisting: Restrict server-side HTTP requests to a managed set of approved domains or services that are required for Budibase functionality, and deny all others by default.
  • Blocklist for sensitive ranges: Add explicit checks to prevent requests to:
  • Cloud metadata endpoints (e.g., 169.254.169.254, GCP metadata hostnames)
  • Private IP ranges (RFC1918, link-local, loopback, and other non-routable addresses)
  • Internal-only hostnames, such as Kubernetes API cluster DNS names, unless explicitly required and tightly controlled.
  • Network-layer segmentation: Use firewall rules, security groups, service meshes, or egress proxies to prevent the Budibase server from directly reaching cloud metadata services and sensitive internal networks.
  • Privileged token hardening: In cloud environments, configure instance/service identities with the minimum necessary permissions so that any accessible metadata tokens are of limited value.
  • Safer preview mechanisms: Where possible, redesign query preview functionality so that:
  • Previews are simulated or constrained to known-safe backends
  • Admin-configurable URLs are not used for free-form server-side requests without prior validation
  • Administrative control discipline: Limit who holds Budibase admin roles and regularly review those assignments, recognizing that admins will have amplified impact if SSRF paths exist.

How teams detect issues like this

Detection efforts can look at both code-level patterns and runtime behavior:

  • Static analysis and code review:
  • Flag server-side HTTP client usage where URLs or hosts are derived from request parameters or admin-configured fields without validation.
  • Look for HTTP client calls inside API handlers like /api/queries/preview that directly use user-controlled values for host, URL, or path.
  • Review configurations around query preview or integration features that offer "test connection" or "preview" actions from the server's perspective.
  • Runtime monitoring and logging:
  • Log outbound HTTP requests made by the Budibase server, including destination host, IP, and path, and monitor for:
  • Requests to metadata addresses (e.g., 169.254.169.254, GCP metadata hostnames)
  • Unexpected internal IP ranges or non-standard ports
  • Correlate unusual outbound requests with admin actions or query preview invocations.
  • Network-level controls:
  • Use egress proxies or firewalls with logging enabled to detect attempts from the Budibase server to reach blocked destinations.
  • Implement anomaly detection rules for new or unusual destinations reached by the application.
  • Automated security tooling:
  • Incorporate API-focused security scanners or SSRF-focused testing into CI/CD to identify endpoints that accept user-controlled URLs and make server-side calls without enforcement of safe destinations.

Sources

SourceLink
github.comgithub.com/Budibase/budibase/security/advisories/GHSA-4647-wpjq-hh7f

Frequently asked

questions

It is exposed through Budibase's HTTP API, but exploitation requires authenticated admin-level access. External attackers would first need to compromise or obtain such an account; once they do, they can trigger SSRF through the query preview endpoint.

The attacker must have Budibase admin privileges (or equivalent access that allows configuring and previewing REST datasource queries). Normal end users without access to the /api/queries/preview functionality generally cannot directly exploit this behavior.

The broad fix pattern is to ensure that server-side HTTP requests are only made to vetted, necessary destinations via strict allowlists, and to block access to internal networks and metadata endpoints by design. Any "preview" or "test" features should enforce the same network restrictions as production traffic.

Treat any user- or admin-supplied URL, host, or path as untrusted input. Enforce centralized outbound-request policies (allowlists and blocklists), integrate SSRF checks into code review and automated testing, and segment network access so that application servers cannot directly reach cloud metadata or sensitive internal infrastructure by default.

Find out what's already
exploitable in your codebase.