CVE-2026-48746: vLLM: OpenAI auth bypass
Summary
A vulnerability in ASGI web servers and starlette's trust on those web servers enables an authentication bypass of the OpenAI API AuthenticationMiddleware, which was discovered during @x41sec's source code audit. It allows to use the API without providing the configured VLLMAPIKEY or --api-key.
Details
In https://github.com/vllm-project/vllm/blob/v0.14.0/vllm/entrypoints/openai/apiserver.py#L689-L692 the urlpath is taken from the URL, which is reconstructed by starlette based on the request scope.
py from starlette.datastructures import URL, Headers, MutableHeaders, State
...
urlpath = URL(scope=scope).path.removeprefix(rootpath) headers = Headers(scope=scope) if urlpath.startswith("/v1") and not self.verifytoken(headers): response = JSONResponse(content={"error": "Unauthorized"}, statuscode=401) return response(scope, receive, send) return self.app(scope, receive, send)
The request scope includes the request's Host: header and reconstructs the URL as shown below:
py f"{scheme}://{hostheader}{path}"
Neither starlette nor any of the ASGI servers (including uvicorn, which vllm uses) properly filter the Host: header for invalid characters. This allows an attacker to include special URL characters such as / or ? in the Host: header and thereby control the reconstructed URL and it's .path attribute.
FastAPI/starlette's routing uses the HTTP path and does not depend on the parsed url.path attribute, allowing attackers to reach an endpoint via a certain path while providing a different value in the .path.
Impact - Instances of vllm that use an API Key for the OpenAI API and expose the API to attackers. - Instances behind an RFC-conforming web server (such as nginx) are not affected.
Other sources
vLLM is an inference and serving engine for large language models (LLMs). From 0.3.0 until 0.22.0, a vulnerability in ASGI web servers and starlette's trust on those web servers enables an authentication bypass of the OpenAI API AuthenticationMiddleware. It allows to use the API without providing the configured VLLMAPIKEY or --api-key. This vulnerability is fixed in 0.22.0.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
pip/vllmto a version that resolves this vulnerability.Fixed in 0.22.0 - Upgrade
Upgrade
vllmto a version that resolves this vulnerability.Fixed in 0.22.0 - Compensating control
Ensure the vLLM OpenAI API is not exposed to attackers (e.g., place it behind a RFC-conforming web server reverse proxy such as nginx, since instances behind such servers are reported as not affected).
Event History
Frequently Asked Questions
What is the severity of CVE-2026-48746?
CVE-2026-48746 has a critical severity rating of 9.1.
How does CVE-2026-48746 affect ASGI web servers?
CVE-2026-48746 enables an authentication bypass in ASGI web servers using the OpenAI API's AuthenticationMiddleware.
What is the risk level associated with CVE-2026-48746?
CVE-2026-48746 has a risk level of 66, indicating significant security concerns.
How can I remediate CVE-2026-48746?
To mitigate CVE-2026-48746, ensure that the VLLM_API_KEY is always required and validate its presence within your application.
What could happen if CVE-2026-48746 is exploited?
Exploiting CVE-2026-48746 allows unauthorized access to the OpenAI API, potentially compromising sensitive data.