Description
NextChat versions from 2.15.8 through 2.16.1 contain an improper URL validation vulnerability in the proxy endpoint that allows attackers to obtain the server's OpenAI API key. The x-base-url header is validated using substring matching instead of hostname parsing, allowing any URL containing 'api.openai.com' to pass validation and receive the server's credentials in the Authorization header.
Severity (CVSS)
| Base score | 8.7 |
|---|---|
| Severity | High |
| Version | CVSS 4.0 |
| Vector | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N |
| Provided by | CNA |
Weaknesses
- CWE-20 — Improper Input Validation
Affected products
| Vendor | Product | Versions |
|---|---|---|
| ChatGPTNextWeb | NextChat | 2.15.8 to <=2.16.1 |
References
- https://github.com/ChatGPTNextWeb/NextChat/issues/6814 (issue-tracking)
- https://github.com/ChatGPTNextWeb/NextChat (product)
- https://github.com/ChatGPTNextWeb/NextChat/blob/v2.16.1/app/api/proxy.ts (technical-description)
- https://www.vulncheck.com/advisories/nextchat-2.15.8-through-2.16.1-openai-api-key-disclosure (third-party-advisory)
Generated from the official CVE List on 31 Aug 2026 07:02 UTC.