CVE-2026-54236: vLLM Memory Address Disclosure via Anthropic API Error Messages
vLLM, a popular open-source engine for running and serving large language models, has a vulnerability that leaks sensitive memory addresses to clients. The issue stems from an incomplete fix to a prior vulnerability: while one code path was patched to hide memory addresses from error messages, several other code paths still expose this information. An attacker can exploit this by sending specially crafted image data through vLLM's Anthropic API endpoints, triggering an error that includes a memory address in the response. This leak could help an attacker defeat memory layout randomization (ASLR), a common defense against exploitation. The vulnerability affects vLLM versions before 0.23.1rc0 and requires no authentication to exploit.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 5.3 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
- Weaknesses (CWE)
- CWE-532
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-06-22 / 2026-06-24
NVD description (verbatim)
vLLM is an inference and serving engine for large language models (LLMs). Prior to 0.23.1rc0, the fix for CVE-2026-22778, which introduced a sanitize_message helper that strips object-repr memory addresses from error messages before they reach the client, is incomplete: several response paths echo str(exc) directly to clients without calling sanitize_message. The unsanitized sites include the Anthropic API router in vllm/entrypoints/anthropic/api_router.py (the POST /v1/messages and POST /v1/messages/count_tokens handlers), the Server-Sent Events streaming converter in vllm/entrypoints/anthropic/serving.py, and the realtime speech-to-text WebSocket in vllm/entrypoints/speech_to_text/realtime/connection.py. These paths catch the exception inside the route coroutine and construct the JSONResponse themselves, bypassing the sanitizing global FastAPI exception handler, and WebSocket frames do not traverse that handler chain at all. Using the same primitive as the parent issue, an unauthenticated attacker can send malformed image bytes through the Anthropic Messages API image content parts so that PIL.Image.open raises an UnidentifiedImageError whose message contains the BytesIO object repr, leaking the heap memory address verbatim in the error.message field of the response body. This vulnerability is fixed in 0.23.1rc0.
4 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-54236 is an information disclosure vulnerability in vLLM's exception handling across multiple API endpoints. The core issue is that CVE-2026-22778 introduced a sanitize_message helper to strip object repr addresses from error messages, but this sanitization is not consistently applied. Specifically, three code paths construct and return JSONResponse objects directly without invoking the sanitizing global FastAPI exception handler: (1) the Anthropic API router's POST /v1/messages and POST /v1/messages/count_tokens handlers in vllm/entrypoints/anthropic/api_router.py, (2) the Server-Sent Events streaming converter in vllm/entrypoints/anthropic/serving.py, and (3) the realtime speech-to-text WebSocket handler in vllm/entrypoints/speech_to_text/realtime/connection.py. When PIL.Image.open raises an UnidentifiedImageError in response to malformed image bytes, the exception message contains the BytesIO object repr, which includes a heap memory address. This address is returned verbatim in the error.message field of the response body, bypassing the sanitization layer. WebSocket frames do not traverse the FastAPI exception handler chain, making the WebSocket endpoint particularly vulnerable.
Business impact
This vulnerability poses a moderate but meaningful risk to organizations running vLLM-based inference services. Memory address disclosure alone is not immediately exploitable, but it undermines a fundamental defense-in-depth control: Address Space Layout Randomization (ASLR). An attacker who can repeatedly leak heap addresses gains valuable reconnaissance for launching more complex attacks—either against the vLLM process itself or potentially against the host system. In production environments where vLLM is exposed to untrusted users or integrated into public-facing APIs, this information leak could be chained with other vulnerabilities to achieve remote code execution. The ease of exploitation (no authentication required, simple malformed image upload) increases the risk. Organizations should prioritize patching, especially if their vLLM instance is accessible over networks or the internet.
Affected systems
vLLM versions prior to 0.23.1rc0 are affected. The vulnerability is present in all installations that expose the Anthropic API-compatible endpoints (/v1/messages, /v1/messages/count_tokens) or the realtime speech-to-text WebSocket endpoint. Open-source users running self-hosted vLLM instances are the primary audience. The scope is not limited to a specific model or deployment configuration; any vLLM instance with these endpoints enabled can be exploited. Users running version 0.23.1rc0 or later are not affected.
Exploitability
Exploitation is straightforward and requires no authentication. An attacker sends a POST request to the Anthropic Messages API endpoint with an image content part containing malformed image bytes (e.g., random binary data that PIL cannot decode). vLLM attempts to open the image, encounters an UnidentifiedImageError, and returns the error message containing the leaked heap address. The CVSS score of 5.3 reflects the low complexity (Low) and lack of privilege requirements (None), but acknowledges that the impact is information disclosure only (Confidentiality: Low) with no direct impact on integrity or availability. The network-accessible attack surface and ease of triggering the error make this a practical concern, though not an immediate critical risk.
Remediation
Upgrade to vLLM version 0.23.1rc0 or later. This release includes a complete fix that ensures all exception paths—including the Anthropic API router, SSE streaming converter, and WebSocket handlers—apply the sanitize_message helper before returning error responses to clients. Users unable to upgrade immediately should consider network-based mitigations: restrict API access to trusted clients, implement rate limiting on error-prone endpoints, and monitor for repeated malformed image submission attempts that could indicate reconnaissance activity.
Patch guidance
Verify compatibility with your deployment before upgrading. Review vLLM's release notes for version 0.23.1rc0 to confirm any breaking changes or dependency updates. If you are running a release build rather than a release candidate, wait for the stable 0.23.1 release. For containerized deployments, rebuild your images with the patched vLLM version. Test the patched version in a staging environment to ensure model serving performance and correctness remain unaffected. If you cannot upgrade immediately, consider disabling the Anthropic API endpoints or the speech-to-text WebSocket if they are not actively used in your service.
Detection guidance
Monitor access logs for repeated POST requests to /v1/messages or /v1/messages/count_tokens endpoints with image content parts, especially those receiving error responses. Look for patterns of malformed or random binary data in image submissions. Log analysis should flag any error.message fields in API responses that contain hexadecimal patterns consistent with memory addresses (e.g., '0x7f...'). Additionally, monitor WebSocket connections to the speech-to-text endpoint for abrupt disconnections or error frames that might indicate an attacker probing for errors. Alert on any unauthenticated API requests from unusual sources if your vLLM instance is meant to be internal-only.
Why prioritize this
While the CVSS score is 5.3 (Medium), this vulnerability should be prioritized for patching because: (1) exploitation is trivial and requires no authentication, (2) the attacker surface is broad (multiple API endpoints), (3) information disclosure about memory layout can enable follow-on attacks, and (4) a fix is readily available. Organizations with public-facing or network-exposed vLLM instances should patch within 1–2 weeks. Internal deployments with restricted network access can afford a longer timeline but should still plan an upgrade cycle.
Risk score, explained
The CVSS 3.1 score of 5.3 (MEDIUM) reflects: Attack Vector: Network (AV:N)—the vulnerability is exploitable remotely; Attack Complexity: Low (AC:L)—no special conditions are needed; Privileges Required: None (PR:N)—unauthenticated users can trigger it; User Interaction: None (UI:N)—no victim action is required; Scope: Unchanged (S:U)—the impact is limited to the vulnerable component; Confidentiality: Low (C:L)—memory addresses are disclosed but do not directly expose user data or model weights; Integrity: None (I:N)—data is not modified; Availability: None (A:N)—service continuity is unaffected. The 'Low' confidentiality impact reflects that address leaks are a stepping stone rather than a complete information compromise. However, in contexts where ASLR defeats are a known precursor to RCE, practitioners may rate business risk higher than the numeric score suggests.
Frequently asked questions
How does an attacker exploit this vulnerability?
An attacker sends a POST request to vLLM's Anthropic API /v1/messages endpoint with a message containing an image content part. The image bytes are deliberately malformed (e.g., random binary data). When vLLM tries to parse the image using PIL, it raises an UnidentifiedImageError whose message includes a BytesIO object repr containing a heap address. Because the exception is caught and returned directly without sanitization, the address leaks back to the client in the error response.
Is the vulnerability in vLLM's core or only in the Anthropic API wrapper?
The vulnerability exists in both the Anthropic API router (vllm/entrypoints/anthropic/api_router.py), the SSE streaming converter (vllm/entrypoints/anthropic/serving.py), and the realtime WebSocket handler (vllm/entrypoints/speech_to_text/realtime/connection.py). The root cause is an incomplete fix to CVE-2026-22778: the sanitize_message helper was added to the global FastAPI exception handler, but several custom exception handlers in these endpoints bypass that global handler by constructing their own responses.
What is the relationship between this CVE and CVE-2026-22778?
CVE-2026-22778 was the initial address disclosure vulnerability in vLLM. A partial fix was applied via the sanitize_message helper, but it was not applied uniformly across all code paths. CVE-2026-54236 documents the incomplete nature of that fix. Both vulnerabilities allow address disclosure; this CVE shows that the patch for the first was insufficient.
Will upgrading to 0.23.1rc0 be necessary, or should I wait for a stable release?
The fix is available in 0.23.1rc0 (release candidate). If your organization has a policy against running release candidates in production, monitor vLLM's release timeline for the stable 0.23.1 release. However, if address leak mitigations are a priority, 0.23.1rc0 can be tested in staging to verify it resolves the issue while you await the stable release.
This analysis is provided for informational purposes and reflects the details in the CVE record and vendor advisory as of the publication date. Exploit code is not provided. Organizations should verify patch applicability and compatibility with their specific vLLM deployment before upgrading. This vulnerability is not currently listed on the CISA Known Exploited Vulnerabilities (KEV) catalog, but that status may change. Always consult the vLLM GitHub repository and official security advisories for the most current guidance. SEC.co makes no warranty regarding the completeness or accuracy of this analysis and recommends independent verification of all claims. Source: NVD (public-domain), retrieved 2026-07-28. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2025-46313MEDIUMmacOS Tahoe Logging Data Redaction Flaw
- CVE-2026-0267MEDIUMPalo Alto GlobalProtect macOS Passcode Exposure Vulnerability
- CVE-2026-41184MEDIUMCalico ServiceAccount Token Exposure in CNI Logs
- CVE-2026-41185MEDIUMCalico Azure IPAM Plaintext Credential Logging Vulnerability
- CVE-2026-45581MEDIUMHyperledger Fabric Java Chaincode TLS Password Exposure in Logs
- CVE-2026-45679MEDIUMOpenTelemetry eBPF Instrumentation Data Exfiltration via Redis Error Messages
- CVE-2026-9735MEDIUMMongoDB Credential Disclosure in SASL Authentication Logging
- CVE-2026-9751MEDIUMMongoDB LDAP Password Plaintext Logging Vulnerability