CVE-2026-82639

NextChat 2.15.8 through 2.16.1 OpenAI API Key Disclosure

Published Aug 30, 2026 CVSS 4.0 · 8.7 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

NextChat versions 2.15.8 through 2.16.1 have an improper URL validation flaw in the proxy endpoint. The x-base-url header is validated by substring matching rather than proper hostname parsing, so any URL containing the string "api.openai.com" is accepted. The server then forwards its Authorization header, which holds the OpenAI API key, back to the requestor. The result is a direct leakage of the server’s OpenAI key, enabling an attacker to perform authorized requests, incur costs, or exfiltrate data. This vulnerability is an example of CWE‑20, Improper Input Validation.

Affected Systems

The affected system is the ChatGPTNextWeb:NextChat application, specifically versions 2.15.8 through 2.16.1. These releases expose a proxy endpoint that accepts the x‑base‑url header and is vulnerable to the described validation error.

Risk and Exploitability

The CVSS score of 8.7 classifies this flaw as high severity; the EPSS score is not available, and it is not listed in the CISA KEV catalog. Remote attackers can exploit the flaw by sending a crafted request to the proxy endpoint with a malicious x‑base‑url header. No privileges or user interaction are required on the target system. Once the key is exposed, an attacker can impersonate the server’s OpenAI account, potentially causing financial loss and data leakage.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade NextChat to 2.16.2 or a later patched version where the URL validation bug is fixed.
  • If an upgrade is not immediately possible, temporarily remove or disable the proxy endpoint that accepts the x-base-url header, or reconfigure the server to reject any x-base-url that contains the substring "api.openai.com" and enforce strict hostname parsing before authorizing the request.
  • Set up firewall rules or intrusion‑detection alerts to block or log unauthorized proxy requests and audit OpenAI key usage to detect anomalous activity.

Generated by OpenCVE AI on August 30, 2026 at 15:37 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Chatgptnextweb
Chatgptnextweb nextchat
Vendors & Products Chatgptnextweb
Chatgptnextweb nextchat
Type Values Removed Values Added
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.
Title NextChat 2.15.8 through 2.16.1 OpenAI API Key Disclosure
First Time appeared Nextchat
Nextchat nextchat
Weaknesses CWE-20
CPEs cpe:2.3:a:nextchat:nextchat:*:*:*:*:*:*:*:*
Vendors & Products Nextchat
Nextchat nextchat
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N'}

cvssV4_0

{'score': 8.7, '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'}

Weaknesses
  • CWE-20

    Improper Input Validation

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Sep 24, 2026, 2:20 PM
Reserved
Aug 30, 2026, 1:06 PM
Status
Deferred
Published
Aug 30, 2026, 2:17 PM
Modified
Sep 10, 2026, 3:53 PM