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.
Published: 2026-08-30
Score: 8.7 High
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

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.

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

Remediation

No vendor fix or workaround currently provided.

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 yet.

History

Sun, 30 Aug 2026 17:15:00 +0000

Type Values Removed Values Added
First Time appeared Chatgptnextweb
Chatgptnextweb nextchat
Vendors & Products Chatgptnextweb
Chatgptnextweb nextchat

Sun, 30 Aug 2026 13:30:00 +0000

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'}


Subscriptions

Chatgptnextweb Nextchat
Nextchat Nextchat
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-30T13:23:39.106Z

Reserved: 2026-08-30T13:06:02.366Z

Link: CVE-2026-82639

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-30T14:17:03.750

Modified: 2026-08-30T14:17:03.750

Link: CVE-2026-82639

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-30T17:15:04Z

Weaknesses
  • CWE-20

    Improper Input Validation