Hackers Actively Scan LiteLLM AI Servers for Critical Flaws Enabling RCE Attacks
What happened?
Attackers are now scanning the internet for exposed LiteLLM servers. They want to chain two flaws that give them remote code execution (RCE) without a login. The scans target a test endpoint in the LiteLLM AI gateway and abuse a weak spot in the Starlette web framework that it relies on. LiteLLM sits between apps and AI model providers, so one compromised gateway can expose many secrets. Because it often holds provider API keys, a successful hit can give attackers a strong foothold in a company’s AI setup. The two flaws are tracked as CVE-2026-42271 and CVE-2026-48710.
Key details
- Attackers are scanning for exposed LiteLLM servers to chain two flaws for unauthenticated remote code execution.
- The first flaw in LiteLLM MCP test endpoints accepts full server configuration and runs supplied commands on the host.
- Attackers use odd Host header values such as localhost] and [localhost to evade filters based on public proof-of-concept code.
- CISA added CVE-2026-42271 to its Known Exploited Vulnerabilities catalog on June 8, 2026, and exploitation was reported as early as July.
What is affected?
- LiteLLM versions 1.74.2 up to but not including 1.83.7
- Starlette versions before 1.0.1
How do I fix or mitigate it?
- Upgrade LiteLLM to version 1.83.7 or later and Starlette to version 1.0.1 or later.
- Rotate the master key and every provider key held by any vulnerable server that was exposed.
- Build WAF rules that flag any character that should never appear in a hostname or allow only known hostnames.
What should defenders look for?
- URL path /mcp-rest/test/tools/list targeted by scans
- Host header values: localhost], [localhost, 127.0.0.1], litellm.proxy
- Authorization header: Bearer nothing
- User-Agent: Python/3.14 aiohttp/3.14.5
- Payload with server transport stdio and command id
Summarised by SecOraLens from Cyber Security News. Always read the original source before acting. How SecOraLens verifies advisories.
What to do next
Brief your board. Brief your team.
Executive risk briefs for governance, technical kill-chains for the SOC — delivered as advisories publish. Critical alerts within 1 hour. No spam, unsubscribe anytime.
