Breaking AI Platforms: How an SSRF in Open WebUI Enabled Internal
The URL validation function in Open WebUI checked the initial destination but the HTTP clients used by several features followed redirects by default, so an authenticated user could supply a URL that passed validation and then redirected the server to an internal address. This allowed server-side requests to internal services and, in the worst case, retrieval of cloud instance credentials.
Published on medium.com
SSRF defenses often focus on validating user input. But what happens when the destination changes after the validation step?
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The code validated the URL once, but the HTTP client libraries used afterwards followed redirects by default without re-validating the new destination.
Impact
An authenticated user could make the server send requests to internal services, and in a common cloud deployment this could expose temporary AWS credentials; some sinks returned the response body directly while others were blind or semi-blind.
What the attacker needed
Authenticated user account; attacker-controlled public redirector; default configuration
The fix
The immediate fix was to disable redirects at each vulnerable call site, and the recommended durable fix was a single safe_fetch helper that validates, fetches without redirects, and re-validates any redirect target.
How it was found
- Set up a small HTTP server on an internet-reachable host that responds with a 302 redirect to the internal target.
- Submit the redirector's URL to a reachable Open WebUI endpoint, such as the RAG web ingestion endpoint.
- Observe the Open WebUI server's IP in the redirector's access log, followed by a request from that server to the internal target.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
When you give a website a link to fetch, the server first checks that the link points to a public address. But if that public address replies with a redirect, the server's HTTP client follows it automatically to a new address that was never checked. An attacker can use this to make the server visit internal systems that are normally unreachable from the internet.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.