CVE-2026-82639
Received Received - Intake

Improper URL Validation in NextChat Exposes OpenAI API Key

Vulnerability report for CVE-2026-82639, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-08-30

Last updated on: 2026-08-30

Assigner: VulnCheck

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-08-30
Last Modified
2026-08-30
Generated
2026-08-30
AI Q&A
2026-08-30
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 2 associated CPEs
Vendor Product Version / Range
chatgptnextweb nextchat From 2.15.8 (inc) to 2.16.1 (inc)
chatgptnextweb nextchat 2.16.1

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-20 The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability affects NextChat versions 2.15.8 through 2.16.1. It involves improper URL validation in the proxy endpoint where the x-base-url header is checked using substring matching instead of proper hostname parsing. Attackers can craft URLs containing 'api.openai.com' to bypass validation and receive the server's OpenAI API key in the Authorization header.

Detection Guidance

Check NextChat proxy logs for requests containing 'api.openai.com' in the x-base-url header. Inspect network traffic for outbound requests with Authorization headers sent to unexpected hosts. Review server configurations for improper URL validation in proxy endpoints.

Impact Analysis

An attacker can steal the server's OpenAI API key by sending a crafted x-base-url header. The stolen key can then be used to make arbitrary OpenAI API calls, potentially incurring costs or accessing sensitive data at the owner's expense. No authentication is required for this attack.

Compliance Impact

This vulnerability could lead to non-compliance with GDPR and HIPAA due to unauthorized exposure of OpenAI API keys. Under GDPR, unauthorized access to credentials may constitute a data breach if personal data is involved. HIPAA requires protection of sensitive data, and API key exposure could enable unauthorized AI processing of protected health information.

Mitigation Strategies

Upgrade NextChat to a patched version beyond 2.16.1. Implement strict hostname validation for the x-base-url header by parsing the URL and comparing the exact hostname. Disable proxy endpoints if not required. Rotate any exposed OpenAI API keys immediately.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-82639. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart