CVE-2025-50735
NextChat vulnerability analysis and mitigation

Overview

CVE-2025-50735 is a directory traversal vulnerability in NextChat (also known as ChatGPT-Next-Web) affecting all versions through 2.16.0. The flaw exists in the application's WebDAV proxy, which fails to canonicalize or reject dot path segments (e.g., ../) in its catch-all route (/api/webdav/[...path]/route.ts), enabling attackers to access sensitive files outside the intended directory. It was published on November 3, 2025, with a proof-of-concept released the same day. The vulnerability carries a CVSS v3.1 base score of 7.5 (High) (Feedly, PoC Repo).

Technical details

The root cause is CWE-22 (Improper Limitation of a Pathname to a Restricted Directory), where the WebDAV proxy route in app/api/webdav/[...path]/route.ts joins path segments from the URL directly using params.path.join("/") and appends them to the configured endpoint without normalizing or rejecting dot segments such as ... The path validation logic only checks whether the final constructed targetPath ends with an expected filename (e.g., backup.json) or folder name, but this check can be bypassed by crafting a path that traverses upward and then back to a string ending with the expected suffix. Exploitation requires no authentication (anonymous WebDAV endpoints are also affected) and no user interaction, making it remotely exploitable with low attack complexity (NextChat Source, PoC Repo).

Impact

Successful exploitation allows an attacker to read arbitrary files accessible to the NextChat server process by traversing outside the intended WebDAV storage directory. The primary impact is a high confidentiality breach — sensitive files such as configuration files, credentials, or other application data could be exposed. Integrity and availability are not directly impacted by this vulnerability, but exposed credentials could enable further compromise or lateral movement (Feedly).

Exploitability

A public proof-of-concept exploit was published on November 5, 2025, by researcher fai1424 on GitHub, with a detailed write-up linked from the PoC repository. The vulnerability requires no authentication and no user interaction, significantly lowering the barrier to exploitation. As of the disclosure date, the developer had not yet patched the vulnerability or responded to the researcher's report. There is no evidence of in-the-wild exploitation at this time, and the EPSS score is 0.00319 (approximately 0.32%), indicating a currently low but non-negligible probability of exploitation. CVE-2025-50735 is not listed in the CISA KEV catalog (PoC Repo, Feedly).

Exploitation steps

  1. Reconnaissance: Identify publicly accessible NextChat instances (version ≤ 2.16.0) using search engines like Shodan or Censys, or by browsing known self-hosted deployments.
  2. Identify WebDAV endpoint: Confirm the /api/webdav/ route is accessible and determine the configured WebDAV endpoint parameter (often visible in client-side configuration or network traffic).
  3. Craft traversal path: Construct a URL targeting the catch-all route with dot-segment path traversal, e.g., GET /api/webdav/../../etc/passwd/backup.json?endpoint=https://allowed-webdav-host.com/ — the path is joined without normalization, so .. segments are passed through to the upstream WebDAV server or used to resolve file paths.
  4. Bypass suffix check: Ensure the crafted path ends with the expected filename suffix (e.g., backup.json) after traversal, satisfying the targetPath.endsWith(fileName) check in the route handler.
  5. Retrieve sensitive data: Send the crafted GET request; the proxy forwards it to the target endpoint with the traversed path, potentially returning the contents of files outside the intended directory (PoC Repo, NextChat Source).

Indicators of compromise

  • Network: Unusual GET requests to /api/webdav/ containing ../ or URL-encoded dot-segment sequences (e.g., %2e%2e%2f) in the path portion of the URL.
  • Logs: Web server or Next.js access logs showing requests to /api/webdav/ with path components containing multiple segments traversing upward (e.g., ../../), especially those ending with backup.json.
  • Logs: Console output entries tagged [Any Proxy] (from the route handler's logging) showing unexpected targetUrl values that include traversal sequences or paths outside the intended WebDAV storage directory.
  • Network: Outbound requests from the NextChat server to the configured WebDAV endpoint with anomalous path structures not matching the expected <STORAGE_KEY>/backup.json pattern.

Mitigation and workarounds

The primary remediation is to upgrade NextChat to a version beyond 2.16.0 once a patched release is available. As an interim workaround, administrators should disable WebDAV sync functionality if it is not actively required. Network-level controls such as firewall rules restricting access to the /api/webdav/ route to trusted IP ranges can reduce exposure. Additionally, implementing strict server-side path normalization (e.g., using path.resolve() or equivalent and verifying the result stays within the intended base directory) in app/api/webdav/[...path]/route.ts would address the root cause (Feedly, PoC Repo).

Community reactions

The researcher fai1424 noted in the PoC repository that as of the CVE publication date (November 3, 2025), the NextChat developer had not fixed the vulnerability nor responded to the disclosure report, also noting a companion XSS vulnerability (CVE-2025-50733) was similarly unaddressed. The CVE received automated coverage across vulnerability tracking platforms including VulnDB, CVEFeed, and CIRCL shortly after publication, but no significant vendor statement or broader security community commentary has been identified (PoC Repo).

Additional resources


SourceThis report was generated using AI

Related NextChat vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-50735HIGH7.5
  • NextChat logoNextChat
  • cpe:2.3:a:nextchat:nextchat
NoYesNov 03, 2025
CVE-2026-7644MEDIUM5.5
  • NextChat logoNextChat
  • cpe:2.3:a:nextchat:nextchat
NoNoMay 02, 2026
CVE-2026-7178MEDIUM5.5
  • NextChat logoNextChat
  • cpe:2.3:a:nextchat:nextchat
NoNoApr 27, 2026
CVE-2026-7177MEDIUM5.5
  • NextChat logoNextChat
  • cpe:2.3:a:nextchat:nextchat
NoNoApr 27, 2026
CVE-2026-7643LOW2.1
  • NextChat logoNextChat
  • cpe:2.3:a:nextchat:nextchat
NoNoMay 02, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management