/

CVE-2026-31818

Severity:

CRITICAL RISK

(9.6)

SSRF in Budibase REST Datasource Connector

CVE-2026-31818

Analyzed

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918, CWE-1188

Impact:

Network Pivoting and Access to Internal Services via SSRF

Severity:

CRITICAL RISK

(9.6)

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

A server-side request forgery (SSRF) flaw in Budibase's REST datasource connector allows arbitrary outbound HTTP requests from the server because the IP blacklist protection is effectively disabled by default.

When the BLACKLIST_IPS environment variable is unset, the blacklist check always permits all destinations, enabling attackers who control or influence REST datasource URLs to reach internal or otherwise restricted network resources.

Affected context

This vulnerability affects Budibase deployments using the REST datasource connector where:

  • The application is allowed to make outbound HTTP/HTTPS requests from the server,
  • The BLACKLIST_IPS environment variable is not explicitly configured (the default in official deployment manifests),
  • Internal or sensitive services are reachable from the Budibase server's network environment.

In such setups, the intended SSRF protection mechanism is effectively inactive, so any REST datasource configuration can potentially target internal IP ranges or metadata endpoints.

Exploit preconditions

  • Attack surface: Budibase REST datasource connector, exposed via the web UI or API where users can define or modify datasource URLs.
  • Required access: Ability to create or edit a REST datasource configuration or otherwise control the target URL for outbound requests (e.g., authenticated low-privilege user, compromised workspace account, or misconfigured public instance).
  • Trigger point: Execution of an HTTP request by the REST datasource connector to the attacker-specified or influenced URL.
  • Why exploitation is possible: The SSRF protection relies on an IP blacklist driven by the BLACKLIST_IPS environment variable. In official configurations this variable is unset, causing the blacklist evaluation function to short-circuit and allow all destinations, including internal IPs and sensitive endpoints.

Why this happens

The core issue stems from relying on an environment-controlled blacklist for SSRF mitigation without defining a secure default behavior.

The blacklist logic assumes BLACKLIST_IPS will be populated, but when it is empty or unset, the check unconditionally returns "not blacklisted," effectively disabling the protection.

This aligns with CWE-918 (Server-Side Request Forgery) because user-controlled URLs can drive server-initiated network requests, and CWE-1188 (Incomplete or Inconsistent Design) as the security mechanism is present in code but misconfigured by default, leading to a design gap between intended and actual behavior.

Potential impact

  • Access to internal HTTP services that are not exposed to the public internet.
  • Interaction with cloud provider metadata services, which may expose credentials or instance information.
  • Enumeration and potential abuse of internal APIs, admin panels, or management interfaces reachable from the Budibase server.
  • Use of the server as a pivot or proxy to scan internal networks (limited port scanning via HTTP-based probes).
  • Facilitation of further compromise if internal services lack strong authentication or input validation.

General mitigation guidance

Effective mitigation focuses on enforcing strict, secure-by-default outbound request policies and reducing trust in URL inputs:

  • Prefer a default-deny outbound network policy at the infrastructure level (e.g., firewall rules, cloud security groups, container network policies) so the Budibase server cannot freely reach internal or sensitive addresses.
  • Configure allowlists for destinations the REST datasource connector is permitted to contact, rather than relying solely on blacklists of disallowed IP ranges.
  • Ensure security-sensitive configuration like IP filtering behaves safely when environment variables are missing, defaulting to "blocked" or "validation failed" rather than "allow all."
  • Separate application roles and workspaces so that untrusted or low-privilege users cannot define arbitrary external integrations that drive server-originating requests.
  • Regularly review outbound connectivity requirements and remove unnecessary network permissions following least-privilege principles.

How teams detect issues like this

Detection can combine application-layer and infrastructure-level monitoring:

  • Static analysis / configuration review:
  • Look for security controls that depend on environment variables without safe defaults, particularly for request filtering or SSRF defenses.
  • Flag code paths where SSRF protections short-circuit when configuration is empty or missing (e.g., "if blacklist empty then allow" patterns).
  • Runtime and log analysis:
  • Monitor Budibase and reverse proxy logs for requests to unusual internal RFC1918 ranges, link-local addresses, or metadata endpoints originating from the application.
  • Set alerts for REST datasource configurations that target IP literals, localhost/127.0.0.1, or known internal domains.
  • Network and policy enforcement:
  • Use network security tooling to detect and block outbound requests to non-approved destinations from the Budibase server.
  • Periodically run security tests to validate that SSRF protections are active (e.g., attempting to reach internal probe endpoints from user-controlled URLs in a controlled test environment).
  • Automated security scanning and policy-as-code systems can help flag missing environment-based security configurations across deployment manifests.

Sources

SourceLink
github.comgithub.com/Budibase/budibase/commit/5b0fe83d4ece52696b62589cba89ef50cc009732
github.comgithub.com/Budibase/budibase/pull/18236
github.comgithub.com/Budibase/budibase/releases/tag/3.33.4
github.comgithub.com/Budibase/budibase/security/advisories/GHSA-7r9j-r86q-7g45

Frequently asked

questions

Yes, if a Budibase instance is exposed and an attacker can obtain access to a workspace or account that permits creating or editing REST datasources. In that case, they can supply arbitrary target URLs and leverage the server to reach internal resources.

Typically, an attacker needs at least authenticated access that allows them to define or modify REST datasource connectors, or the ability to influence those URLs indirectly. The exact access level depends on how roles and workspaces are configured in the particular deployment.

The safest pattern is to design outbound network access with a default-deny stance: restrict the server to a small, explicit allowlist of destinations and ensure SSRF defenses do not depend solely on optional configuration. Security-sensitive features should behave securely when configuration is absent, failing closed rather than open.

Prevention involves combining secure design and operational controls: implement strict validation and allowlists for user-controlled URLs, design SSRF protections to fail closed when configuration is missing, enforce least-privilege outbound network permissions at the infrastructure layer, and include checks for insecure defaults in code review, threat modeling, and automated security testing processes.

Find out what's already
exploitable in your codebase.