Summary
A server-side request forgery (SSRF) flaw in Open WebUI's SafePlaywrightURLLoader allows attackers to bypass IP-based URL validation by abusing HTTP redirects.
By supplying a seemingly safe URL that redirects to internal hosts, an attacker can cause the application to reach internal services, even when local web fetching is disabled.
Affected context
The vulnerability occurs in Open WebUI deployments that use the SafePlaywrightURLLoader for RAG or web content fetching.
Validation is applied only to the initially supplied URL, relying on IP checks to block internal addresses.
In environments where Playwright follows HTTP redirects automatically, a chain from a public URL to an internal endpoint can bypass the initial validation and grant unintended access to internal services.
Exploit preconditions
- Attack surface: URL input used by the SafePlaywrightURLLoader when fetching external content for AI/RAG features.
- Required access: Ability to provide or influence a URL processed by the loader (e.g., through a prompt, configuration, or API call).
- Trigger point: The loader fetches the initial URL, accepts the redirect response, and automatically follows it to a secondary location.
- Why exploitation is possible: The validate_url routine checks only the first URL; subsequent redirect targets are not revalidated, allowing redirects to internal IPs or sensitive metadata services.
Why this happens
The underlying issue is a partial and context-agnostic validation of user-provided URLs that fails to account for redirect behavior.
The SafePlaywrightURLLoader verifies the IP address of the initial URL to prevent SSRF but does not enforce the same constraints on each hop of the redirect chain.
This pattern aligns with CWE-918: Server-Side Request Forgery, where a server-side component makes network requests based on user-influenced input without robustly constraining reachable destinations, especially across redirects.
Potential impact
- Unauthorized access to internal HTTP services (e.g., localhost, Docker networks).
- Exposure of sensitive cloud instance metadata or configuration endpoints.
- Discovery of internal network structure and service behavior.
- Potential pivoting to other internal vulnerabilities if responses are processed or logged.
- Data leakage that can inform further targeted attacks or model poisoning.
General mitigation guidance
Effective mitigation focuses on hardening server-side URL handling and constraining outbound requests.
General defensive patterns include:
- Validating every redirect hop, not just the initial URL, and enforcing strict allowlists or blocklists for hosts and IP ranges.
- Disabling automatic redirect following, or tightly controlling which status codes and locations can be followed.
- Limiting reachable address spaces by default (e.g., blocking private, loopback, and metadata service ranges).
- Segregating outbound HTTP fetch functionality into a low-privilege, isolated component with restricted network access.
- Treating user-supplied URLs and web content as untrusted, minimizing the amount of parsing, rendering, or integration performed on fetched data.
How teams detect issues like this
Detection typically involves examining how URL input flows into outbound network calls and how redirects are handled.
Useful approaches include:
- Static analysis rules that flag HTTP client configurations with unrestricted redirect following combined with user-controlled URLs.
- Code review checklists that require validation of redirect chains, not just the initial URL, and confirmation of IP/host restrictions.
- Policy enforcement that limits access from application containers to internal network ranges and metadata services.
- Runtime monitoring of outbound traffic for patterns such as requests to private IP blocks or metadata endpoints originating from user-influenced workflows.

