Summary
A flawed URL validation mechanism in Budibase's plugin upload endpoint allows attacker-controlled URLs to be fetched by the server as long as they contain the substring .tar.gz anywhere in the string.
When combined with an SSRF blacklist bypass or HTTP redirects, this broken validation can enable server-side request forgery (SSRF) against internal services or other protected network targets.
Affected context
This vulnerability affects Budibase deployments that expose the plugin upload API (POST /api/plugin) and rely on its URL validation to constrain where the server can make outbound HTTP requests.
The issue arises because the validation layer only checks that the submitted URL string includes .tar.gz, without constraining protocol, host, or path.
Where the SSRF blacklist is disabled, misconfigured, or bypassed (including through HTTP redirects that land on internal hosts), the application may issue requests into internal or otherwise sensitive network locations.
Exploit preconditions
- Attack surface: The
POST /api/pluginendpoint that accepts aurlparameter to download plugin bundles. - Required access: Ability to invoke the plugin upload API with arbitrary URLs (typically authenticated application or admin-level access, depending on deployment configuration).
- Trigger point: Submitting a URL that contains
.tar.gzanywhere in the string so it passes the minimal substring validation and is passed tofetchWithBlacklist(). - Why exploitation is possible:
- The URL validator does not restrict scheme (e.g.,
http://,https://), host (internal vs. external), port, or path. - The SSRF blacklist can be bypassed or disabled (e.g., via an empty blacklist or redirect chains).
- The underlying HTTP client follows redirects by default (
redirect: 'follow'), allowing an attacker to start from an allowed external URL and ultimately land on an internal target.
Why this happens
The core issue is a broken validation design that attempts to restrict downloads using a trivial substring check (url.includes(".tar.gz")) instead of robust URL parsing and allowlisting.
This leads to CWE-918: Server-Side Request Forgery (SSRF) because the server performs attacker-controlled outbound HTTP requests without enforcing clear network boundaries or validating the ultimate request target.
Conceptually, the bug pattern is:
- Treat the URL as an opaque string rather than parsing and verifying host, scheme, and path.
- Rely on a blacklist-based control that can be cleared, bypassed, or circumvented via redirects.
- Delegate network access to an HTTP client configured to follow redirects automatically, extending the attacker's control to secondary locations.
Potential impact
- Attackers may coerce the server into issuing HTTP requests to internal services (e.g., databases, admin panels, metadata endpoints).
- Internal HTTP-based APIs could be probed or enumerated from the application's network context.
- Sensitive information accessible via HTTP (such as cloud instance metadata or internal diagnostic endpoints) could be exfiltrated.
- SSRF could be chained with other vulnerabilities (e.g., internal admin APIs or misconfigured services) to achieve further compromise.
General mitigation guidance
Effective mitigation focuses on constraining server-initiated HTTP requests and enforcing strict, positive validation:
- Prefer an allowlist-based model for outbound hosts and schemes (e.g., only HTTPS to a fixed set of plugin repositories).
- Parse URLs using a robust URL parsing API, then validate discrete components (scheme, hostname, port, path) rather than applying substring checks.
- Disable or carefully restrict automatic HTTP redirect following, or re-validate each redirect target against the same allowlist.
- Apply defense in depth by retaining a network-layer egress policy (e.g., firewall rules, service mesh) that prevents access to internal or sensitive address ranges from the application process.
- Ensure plugin and resource download mechanisms are secure-by-default and require explicit configuration to relax restrictions, with clear documentation of the risks.
How teams detect issues like this
To detect similar SSRF risks and broken URL validation:
- Use static analysis to flag:
- Direct use of attacker-controlled strings in HTTP client calls.
- URL validation routines that rely on substring checks instead of parsed components.
- HTTP client configurations that follow redirects without target re-validation.
- During code review, look for:
- Download or plugin mechanisms that accept user-supplied URLs.
- Blacklist-based validation of hosts or IPs rather than strict allowlists.
- Absence of checks on internal IP ranges, loopback addresses, or link-local metadata endpoints.
- Implement security testing:
- Add automated tests that attempt SSRF-like URLs (e.g., internal hostnames, localhost, cloud metadata URLs) against endpoints that fetch remote resources.
- Integrate DAST or API security tools that specifically probe for SSRF behaviors.
- Consider deploying runtime monitoring:
- Network egress monitoring or service mesh policies that log and selectively block outbound requests to non-approved destinations from the application.

