# CVE-2023-49785: NextChat vulnerable to Server-Side Request Forgery and Cross-site Scripting

> Attackers can exploit SSRF and XSS in NextChat to access internal endpoints and modify data, requiring network isolation as mitigation.

- **Severity:** Critical 9.1 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 11 Mar 2024
- **Updated:** 19 Aug 2024
- **Also known as:** GHSA-qf3q-9f3h-cjp9

## What is CVE-2023-49785?

CVE-2023-49785 is a critical server-side request forgery vulnerability in ChatGPTNextWeb NextChat, published on 11 Mar 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

NextChat, also known as ChatGPT-Next-Web, is a cross-platform chat user interface for use with ChatGPT. Versions 2.11.2 and prior are vulnerable to server-side request forgery and cross-site scripting. This vulnerability enables read access to internal HTTP endpoints but also write access using HTTP POST, PUT, and other methods. Attackers can also use this vulnerability to mask their source IP by forwarding malicious traffic intended for other Internet targets through these open proxies. As of time of publication, no patch is available, but other mitigation strategies are available. Users may avoid exposing the application to the public internet or, if exposing the application to the internet, ensure it is an isolated network with no access to any other internal resources.

Weakness: CWE-918 (Server-Side Request Forgery), CWE-79 (Improper Neutralization of Input During Web Page Generation)

## Which versions are affected by CVE-2023-49785?

2 open source packages ship an affected version, including nextchat. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `nextchat` | npm | All versions to 2.11.2 | None |
| `nextchat` | npm | All versions to 2.11.2 | None |

Products: Nextchat Nextchat.

## How do I fix CVE-2023-49785?

No fix has been published for CVE-2023-49785 yet. Limit exposure of the affected software until one is available.

## Is CVE-2023-49785 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-49785 exists.

Public exploit code:

- https://github.com/hyunnna/NextChat_SSRF_CVE-2023-49785 (github_poc): https://github.com/hyunnna/NextChat_SSRF_CVE-2023-49785
- ChatGPT-Next-Web - SSRF/XSS (nuclei): http/cves/2023/CVE-2023-49785.yaml

## Other vulnerabilities in ChatGPTNextWeb NextChat

- [CVE-2025-50735](https://insights.sbomify.com/CVE-2025-50735/): Path traversal in n/a (high 7.5)
- [CVE-2026-7177](https://insights.sbomify.com/CVE-2026-7177/): ChatGPTNextWeb NextChat route.ts proxyHandler server-side request forgery (medium 6.9)
- [CVE-2026-7178](https://insights.sbomify.com/CVE-2026-7178/): ChatGPTNextWeb NextChat Artifacts Endpoint route.ts storeUrl server-side request forgery (medium 6.9)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-49785 and fix it if it is affected.

What it is: CVE-2023-49785 is a critical server-side request forgery vulnerability in ChatGPTNextWeb NextChat, published on 11 Mar 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-49785 exists.

Affected packages and fixed versions:
- nextchat (npm): affected all versions up to 2.11.2; no fix listed
- nextchat (npm): affected all versions up to 2.11.2; no fix listed

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-49785/ (Markdown: https://insights.sbomify.com/CVE-2023-49785/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-49785
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-49785
- OSV: https://osv.dev/vulnerability/CVE-2023-49785

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-49785/
Summaries are generated and may contain mistakes; the official description above is the record.
