/

CVE-2026-45338

Severity:

HIGH RISK

(7.7)

SSRF in Open WebUI OAuth Picture URL Handling

CVE-2026-45338

Analyzed

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Internal Network Access and Data Exfiltration via SSRF

Severity:

HIGH RISK

(7.7)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Open WebUI contains a Server-Side Request Forgery (SSRF) issue in its OAuth picture URL processing, where arbitrary URLs from OAuth claims are fetched without prior validation.

An attacker who controls or tampers with OAuth picture claims can coerce the server into making HTTP requests to internal or otherwise restricted resources and return the full response body.

Affected context

This vulnerability appears in Open WebUI deployments that:

  • Use OAuth authentication providers that supply a picture or avatar URL claim
  • Allow external or untrusted identity providers, or do not fully control claim contents
  • Run the backend with network access to internal services (e.g., metadata services, internal APIs, admin panels)

The risk is most pronounced when the Open WebUI server can reach internal-only addresses (such as 127.0.0.1, private RFC1918 ranges, or cloud provider metadata endpoints) and when responses from the fetched URLs are propagated back to the client or logged.

Exploit preconditions

  • Attack surface: The OAuth login / callback endpoint that processes user profile claims, specifically the picture URL claim.
  • Required access: Ability to register or use an OAuth identity whose picture claim can be set or influenced (e.g., via a custom IdP, compromised IdP, or misconfigured trust relationship).
  • Trigger point: The _process_picture_url() function in backend/open_webui/utils/oauth.py, which fetches the URL from the claim without applying validate_url().
  • Why exploitation is possible: The server blindly issues HTTP requests to attacker-specified URLs, treating the claim as trustworthy and not restricting hostnames, schemes, or IP ranges. The response body is then accessible to the attacker, enabling internal data exfiltration.

Why this happens

The core issue is a lack of validation and normalization of externally supplied URLs before the backend issues outbound HTTP requests.

In _process_picture_url(), the OAuth picture claim is consumed as if it were trusted configuration, and validate_url() is not applied before making a request. This maps to CWE-918: Server-Side Request Forgery, where a server-side component makes network requests based on unvalidated or insufficiently constrained user input. The bug class is an overly trusted remote resource reference—no enforcement of allowed hosts, protocols, or address ranges, combined with returning or processing the full response.

Potential impact

  • Access to internal HTTP services that are not directly exposed to users (e.g., admin interfaces, internal APIs).
  • Exfiltration of sensitive data returned by internal services, such as configuration pages, status endpoints, or service metadata.
  • Interaction with cloud metadata services, which may yield credentials, tokens, or configuration secrets.
  • Use of the server as a pivot point for network reconnaissance of internal infrastructure (port scanning via timing and error differences, service discovery).
  • Potential interaction with other internal vulnerabilities (e.g., hitting endpoints that perform state-changing actions) if combined with additional flaws.

General mitigation guidance

Mitigation typically focuses on constraining and sanitizing all outbound requests that originate from user-controllable input.

Common defensive patterns include:

  • Enforcing strict URL validation routines before performing any HTTP request, including:
  • Allowlisting acceptable schemes (e.g., https only).
  • Restricting hosts and domains to known, trusted image/CDN providers.
  • Resolving hostnames and rejecting private or loopback IP ranges, and blocking direct IP literals where appropriate.
  • Separating external and internal network access so that application components handling user-controlled URLs cannot reach internal-only services.
  • Using dedicated, limited-purpose HTTP clients (e.g., an image proxy) that enforce host and path restrictions by design.
  • Minimizing the data returned to the client from fetched resources and avoiding blindly returning full response bodies.
  • Applying least-privilege network policies (e.g., firewall rules, container network policies) to reduce reachable internal targets even if SSRF is present.

How teams detect issues like this

Detection can leverage both code-centric and operational perspectives:

  • Static analysis and code review:
  • Search for HTTP client calls (e.g., requests.get, httpx.get) that use URL variables derived from external inputs (OAuth claims, headers, query parameters).
  • Flag call sites where no validation, allowlist checking, or DNS/IP range filtering is applied before issuing the request.
  • Review authentication and identity integration code paths for any processing of profile URLs, avatars, or webhooks.
  • Security testing and monitoring:
  • Use security testing tools to supply crafted OAuth picture URLs pointing to internal ranges (when safe and allowed in a test environment) and observe whether responses are proxied back.
  • Monitor outbound traffic from the application to detect unexpected connections to internal address spaces or metadata services.
  • Policy enforcement:
  • Establish coding guidelines that forbid direct outbound requests to user-supplied URLs and mandate the use of vetted helper functions for remote resource access.
  • Integrate automated checks into CI to detect new instances of unvalidated URL fetches.

Sources

SourceLink
github.comgithub.com/open-webui/open-webui/security/advisories/GHSA-24c9-2m8q-qhmh

Frequently asked

questions

Exploitability depends on control over OAuth picture claims. If attackers can bring their own identity provider or manipulate claims in your OAuth setup, they can likely exploit the issue. In environments with strictly controlled IdPs and fixed claim values, practical exploitability is reduced.

Generally, yes. The attacker needs the ability to trigger OAuth login flows and supply a crafted picture URL via their identity. However, if the OAuth configuration trusts arbitrary or user-specified IdPs, even unprivileged users may be able to register accounts and provide malicious claims.

The safest pattern is to centralize outbound URL fetching through a hardened utility that enforces strict allowlists, scheme checks, and IP range restrictions. Additionally, ensure every path from user-controlled data to outbound HTTP requests passes through a shared validation routine rather than ad hoc checks.

Treat any external URL—even if it comes from an OAuth provider—as untrusted. Adopt coding standards that forbid direct use of user-supplied URLs in HTTP clients, apply strong output and network segmentation controls, and add automated reviews or static rules to detect URL-based SSRF patterns during development.

Find out what's already
exploitable in your codebase.