Summary
Budibase contains server-side request forgery vulnerabilities in OpenAPI query import and REST query execution that can let authenticated builder-level users reach internal HTTP services. The issue becomes risky when DNS rebinding causes a hostname to pass public-address validation but resolve to a loopback or private address during the actual request.
Affected context
The vulnerability affects Budibase deployments that expose OpenAPI query import or REST query execution to authenticated builder-level users. It occurs when hostname validation relies on DNS results that can change between validation and connection, allowing requests intended for public destinations to reach loopback or private network addresses.
Exploit preconditions
- Attack surface: OpenAPI query import and REST query execution
- Required access: An authenticated account with builder-level permissions
- Trigger point: Validation and subsequent connection to an attacker-controlled hostname
- Why exploitation is possible: DNS rebinding can return a public address during validation and a loopback or private address when the server establishes the request
Why this happens
The underlying bug is a server-side request forgery condition caused by relying on hostname resolution as a stable security boundary. When address validation and network connection occur at different times, an attacker-controlled DNS response can change between those operations, bypassing DNS pinning protections and redirecting the server to internal destinations. This maps to CWE-918: Server-Side Request Forgery, where server-side network functionality can be influenced to access unintended resources.
Potential impact
- Internal HTTP services may be accessed without their intended network exposure
- Sensitive metadata or service responses could be disclosed
- Internal administrative endpoints may be reached
- Network segmentation controls could be weakened
- Follow-on compromise may occur if an accessible internal service is vulnerable
General mitigation guidance
Mitigation generally focuses on making destination validation authoritative for the complete request lifecycle rather than trusting a single DNS lookup.
Common defensive patterns include:
- Resolve and validate destination addresses using a trusted, controlled resolver
- Prevent connections to loopback, private, link-local, multicast, and other restricted ranges after resolution
- Bind the validated address to the actual connection where supported
- Revalidate redirects and every resolved destination
- Restrict query-building features to trusted users and approved network destinations
- Apply outbound network policies and least-privilege service permissions
- Use allowlists for integrations where practical instead of accepting arbitrary hostnames
How teams detect issues like this
Organizations can look for SSRF risks through:
- Static analysis of URL-fetching code and hostname validation logic
- Code review signals such as separate DNS validation and connection steps
- Tests covering DNS changes, redirects, IPv4 and IPv6 representations, and private address ranges
- Monitoring for outbound requests from application services to loopback, cloud metadata, and internal network addresses
- Policy enforcement that limits application egress to approved destinations
- Automated security review tools that identify user-controlled URLs and unsafe network access patterns

