Summary
Open WebUI contains a DNS rebinding vulnerability in its SafePlaywrightURLLoader, where a hostname is validated once and resolved again by the browser under potentially different DNS results. An authenticated user who controls authoritative DNS may cause web search or URL ingestion to access internal services or cloud metadata.
Affected context
The issue occurs in Open WebUI deployments that use the affected URL-loading and browser-based retrieval paths. It becomes risky when an authenticated user can submit a hostname for web search or URL ingestion and influence authoritative DNS responses between application-level validation and Playwright's subsequent connection. Environments with reachable internal services or cloud metadata endpoints may have greater exposure.
Exploit preconditions
- Attack surface: Web search or URL ingestion functionality using SafePlaywrightURLLoader
- Required access: An authenticated account capable of submitting or controlling a target URL
- Additional condition: Ability to control authoritative DNS responses for the target hostname
- Trigger point: The hostname is validated by Python and later resolved again by the Playwright request interceptor
- Why exploitation is possible: The validation and browser connection may use different DNS results, allowing a public address to pass validation while a later resolution targets an internal address
Why this happens
The vulnerability is a time-of-check/time-of-use condition involving DNS resolution. The application checks a user-controlled hostname in one execution context, but the browser independently resolves that hostname again when making the request. Because DNS answers can change between these operations, the validated destination is not necessarily the destination that receives the request. This maps primarily to CWE-367: Time-of-Check Time-of-Use Race Condition, with behavior also associated with CWE-918: Server-Side Request Forgery.
Potential impact
- Internal service responses may be exposed to an authenticated attacker
- Cloud instance metadata or temporary credentials could be accessed
- Requests may reach administrative interfaces that were not intended to be public
- Internal network topology and service information could be disclosed
- Follow-on compromise may be possible if exposed services accept sensitive operations
General mitigation guidance
Mitigation generally focuses on making destination validation and connection enforcement use the same trusted resolution and networking controls.
Common defensive patterns include:
- Resolve and validate destinations through a controlled resolver, then enforce the approved IP at connection time
- Prevent browser redirects or subsequent resolutions from bypassing destination policy
- Apply explicit allowlists for permitted external hosts and schemes
- Block private, loopback, link-local, reserved, and cloud metadata address ranges at the egress layer
- Isolate retrieval workers from sensitive internal networks and metadata endpoints
- Run retrieval components with least-privilege network permissions
- Avoid relying solely on hostname validation performed before a separate browser request
How teams detect issues like this
Organizations can identify this class of issue through:
- Static analysis and code review searches for hostname validation followed by independent browser or HTTP resolution
- Review of URL-fetching code for DNS rebinding, redirect, and IP-range validation weaknesses
- Tests using controlled DNS responses that change between validation and connection
- Egress policies and network telemetry that flag retrieval workers connecting to private, link-local, loopback, or metadata addresses
- Monitoring for unusual requests from web retrieval components to internal service ports
- Automated security review tools that identify potential SSRF and time-of-check/time-of-use patterns

