CVE-2026-82639: NextChat 2.15.8 through 2.16.1 OpenAI API Key Disclosure
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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
Update the proxy endpoint logic that validates the x-base-url header to perform proper hostname parsing/validation (reject URLs that merely contain the string 'api.openai.com' via substring matching) so the server cannot send its OpenAI API key in the Authorization header based on lax URL validation.
NextChat proxy endpoint x-base-url validation = Use hostname parsing instead of substring matching for 'api.openai.com'
Event History
Frequently Asked Questions
Which deployments are exposed?
NextChat versions 2.15.8 through 2.16.1 are affected where the proxy endpoint uses a server-side OpenAI API key.
Does an attacker need an account or user interaction to exploit this?
No. The CVSS vector indicates network exploitation with low attack complexity, no privileges required, and no user interaction required.
What is the expected impact if exploitation succeeds?
An attacker can obtain the server's OpenAI API key from the Authorization header. The listed CVSS impacts indicate high confidentiality impact, with no stated integrity or availability impact.