Skip to main content

NextChat CVE-2026-82639

| EUVDEUVD-2026-68215 HIGH
Improper Input Validation (CWE-20)
2026-08-30 VulnCheck GHSA-87fx-h8m6-gxwv
8.7
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify exposed NextChat proxy endpoint
  2. Delivery
    Craft x-base-url header with attacker host embedding 'api.openai.com' substring
  3. Exploit
    Send unauthenticated request to proxy
  4. Execution
    Substring validation passes, NextChat forwards request
  5. Persist
    Attacker server captures OpenAI API key from Authorization header
  6. Impact
    Abuse 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAI

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

NextChat 2.15.8 ≤2.16.1

Affected Packages

euvd nextchat no fix

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

Vendor (VulnCheck) PRIMARY 8.7 HIGH
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
vuln.today AI 7.5 HIGH

Network-reachable, no privileges or interaction needed; only the server-held API key (confidentiality) is compromised, no integrity or availability impact.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

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

EPSS Score
0.3%
Top 78% exploitable
Prevalence
Medium
popular self-hosted AI chat interface, strong GitHub following
Social Media
2
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment CIRCL GitHub VulDB

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.3%
Patch available No
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy