Details
# vllm/entrypoints/utils.py
def sanitize_message(message: str) -> str:
# Strip any standalone hex address; downstream observers don't need them.
return re.sub(r"\b0x[0-9a-fA-F]{6,}\b", "0x?", message)
3. Future-proofing: consider a response middleware
Both the route-local exception handling pattern (Anthropic router) and the WebSocket path bypass FastAPI's exception handler chain. A response-level middleware that always invokes sanitize_message on outgoing error bodies would prevent this class of regression entirely.
Affected versions
- All vLLM versions containing
vllm/entrypoints/anthropic/api_router.py(introduced 2026-01-15 in PR #32369). - All vLLM versions containing
vllm/entrypoints/speech_to_text/realtime/connection.py(introduced 2026-05-12 in PR #42370). - Confirmed present in
mainHEAD771e1e48b(2026-05-26).
References
- Parent advisory: https://github.com/vllm-project/vllm/security/advisories/GHSA-4r2x-xpjr-7cvv (CVE-2026-22778)
- Fix PRs to model the patch on: #31987, #32319, #32668
vllm/entrypoints/utils.py:sanitize_message: https://github.com/vllm-project/vllm/blob/771e1e48b/vllm/entrypoints/utils.py#L323-L326vllm/entrypoints/anthropic/api_router.pyleak site: https://github.com/vllm-project/vllm/blob/771e1e48b/vllm/entrypoints/anthropic/api_router.py#L78
Steps to reproduce
- Clone the target:
git clone --depth 1 https://github.com/vllm-project/vllm - Run the proof of concept (
PoC.py) against the cloned source. - Observe the result shown under *Verified result* below.
Credit
Kai Aizen — SnailSploit (@SnailSploit). Adversarial & Offensive Security Research.
Fix
A fix for this vulnerability was added here: https://github.com/vllm-project/vllm/pull/45119