Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify exposed NextChat proxy endpoint
-
DeliveryCraft x-base-url header with attacker host embedding 'api.openai.com' substring
-
ExploitSend unauthenticated request to proxy
-
ExecutionSubstring validation passes, NextChat forwards request
-
PersistAttacker server captures OpenAI API key from Authorization header
-
ImpactAbuse key for unauthorized inference billing
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation, allowlisting
|
| Exploitation Conditions | The NextChat instance must have a server-side OpenAI API key configured (as opposed to requiring users to provide their own keys). The proxy endpoint must be network-accessible to the attacker - this is a typical deployment pattern for self-hosted NextChat instances exposed to the internet. No authentication, special account, or user interaction is required; the CVSS vector (PR:N, UI:N) confirms unauthenticated remote exploitation. What limits exploitation: instances that require end users to input their own API keys (no server-held credential) are not vulnerable to key exfiltration even if the URL bypass succeeds. Deployments where the proxy endpoint is restricted to an internal network or behind authentication middleware are also not directly exposed. The vulnerability is version-bounded to 2.15.8-2.16.1. |
| Impact | The CVSS 4.0 score of 8.7 (AV:N/AC:L/AT:N/PR:N/UI:N) accurately reflects the severity: the attack is remotely executable, requires no privileges or user interaction, and yields high confidentiality impact through API key exfiltration. The impact is specifically limited to theft of the configured OpenAI API key - there is no integrity or availability impact on the NextChat host itself, nor on downstream systems (SC/SI/SA all N). EPSS data is not present in the provided intelligence, so exploitation probability cannot be quantified probabilistically. The vulnerability is not in CISA KEV, and no weaponized exploit has been confirmed. However, the flaw is mechanically simple: a single HTTP request with a crafted header is sufficient, and the GitHub issue publicly documents the vulnerability, lowering the bar for discovery. For any self-hosted NextChat deployment that exposes the proxy endpoint to the internet and stores a funded OpenAI API key, this represents an immediate financial risk - stolen keys can be abused to run large inference workloads at the victim's expense. The absence of authentication requirements makes mass scanning feasible. |
| Exploit ScenarioDerived | An attacker discovers a publicly accessible NextChat instance via a search engine or targeted scan. The attacker sends a single HTTP request to the proxy endpoint with the header x-base-url set to 'https://attacker-controlled-server.com/capture/api.openai.com', which passes the substring validation. NextChat forwards the request to the attacker's server with the OpenAI API key in the Authorization header, which the attacker logs and immediately uses to make inference API calls billed to the victim. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAI
Credential exfiltration in NextChat 2.15.8-2.16.1 allows unauthenticated network attackers to steal the server's OpenAI API key by exploiting flawed URL validation in the proxy endpoint. The x-base-url header is checked using substring matching rather than hostname parsing, so any URL containing the string 'api.openai.com' - including attacker-controlled domains like 'evil.attacker.com/api.openai.com' - passes validation and causes NextChat to forward the OpenAI API key in the Authorization header to the attacker's server. No public exploit identified at time of analysis, though a GitHub issue documenting the flaw is publicly accessible.
RemediationAI
No vendor-released patch identified at time of analysis - the references point to the vulnerable source code at v2.16.1 with no mention of a fixed release. Operators should monitor the upstream repository at https://github.com/ChatGPTNextWeb/NextChat for a patched release and apply it as soon as available. Until a fix is released, the most effective compensating control is to restrict access to the proxy endpoint at the network perimeter - block inbound requests to the proxy route from untrusted networks using a WAF, reverse proxy ACL, or firewall rule, limiting access to authenticated users or internal networks only. Operators can also consider temporarily disabling the server-side API key configuration and requiring end users to supply their own keys via the client-side settings, eliminating the server-held credential that the attacker targets; this trade-off reduces operational convenience but removes the exploitable asset. Rotating any OpenAI API key currently configured in potentially exposed instances is strongly recommended regardless of whether exploitation is confirmed.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
NextChat (CPE: cpe:2.3:a:chatgptnextweb:nextchat:*:*:*:*:*:*:*:*) is a self-hosted, open-source ChatGPT web interface that acts as a proxy between the browser client and the OpenAI API, forwarding the server's stored API key. The proxy endpoint (app/api/proxy.ts in v2.16.1) validates the caller-supplied x-base-url header to ensure requests are directed only to api.openai.com. However, the validation relies on a substring check (.includes('api.openai.com') or equivalent) rather than proper URL parsing and hostname isolation. CWE-20 (Improper Input Validation) captures this root cause: the software accepts input it should restrict, failing to canonicalize and parse the URL before comparing the host component. This pattern is a well-known bypass - any URL whose path, subdomain, or query string contains the target string will satisfy the check while routing traffic to an unintended destination.
Know when Nextchat gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Network-reachable, no privileges or interaction needed; only the server-held API key (confidentiality) is compromised, no integrity or availability impact.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Server-side request forgery (CWE-918) in ChatGPTNextWeb NextChat up to and including 2.16.1 lets an unauthenticated, rem
Server-side request forgery in ChatGPTNextWeb NextChat 2.16.0-2.16.1 allows unauthenticated remote attackers to manipula
Server-side request forgery in ChatGPTNextWeb NextChat through version 2.16.1 allows remote unauthenticated attackers to
Directory traversal vulnerability in NextChat thru 2.16.0 due to the WebDAV proxy failing to canonicalize or reject dot
EUVD-2026-68215
GHSA-87fx-h8m6-gxwv
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB