Hackers Actively Scan LiteLLM AI Servers for Critical Flaws Enabling RCE Attacks

Blog WriterCybersecurity News - Original News Source is cybersecuritynews.com


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. Analysts at the Internet Storm Center (ISC) noted the scanning after their honeypots began receiving odd requests over a weekend.

Johannes Ullrich of SANS reported that the requests hit the /mcp-rest/test/tools/list path and appeared to target both CVEs. Horizon3.ai had earlier published a write-up showing how the two bugs work together.

Hackers Actively Scan LiteLLM AI Servers

The first flaw, CVE-2026-42271, sits in LiteLLM’s MCP test endpoints. In versions from 1.74.2 up to, but not including, 1.83.7, these endpoints accept a full server configuration.

That configuration includes the command, arguments and environment fields. The proxy then runs the supplied command on the host with its own privileges. On its own, the bug needs a valid proxy API key. Even a low-privilege internal-user key was enough.

The second flaw, CVE-2026-48710, removes that barrier. Starlette versions before 1.0.1 do not check the Host header. This weakness is known as “BadHost”.

Starlette builds a full URL from that unchecked value and uses it for access control decisions. A crafted header can confuse the logic and let a request slip past the login check.

The traffic seen by ISC shows the idea clearly. The request used a fake bearer token and a body that asked the server to run the id command through the stdio transport.

That command is a common way to test whether code runs. The attacker also tried strange Host values, such as localhost] and [localhost. These likely aim to slip past filters built around the public proof-of-concept.

The problem is not new. Ullrich noted that exploitation was reported back in July, and attackers keep tweaking old exploits to dodge filters and find new victims.

CISA also lists CVE-2026-42271 in its Known Exploited Vulnerabilities catalog, where it was added on June 8, 2026. Teams that missed those early warnings may still be running exposed servers.

LiteLLM has been a repeat target this year. Earlier, attackers pushed a poisoned release through PyPI, as covered in this report on compromised LiteLLM packages from March. Another poisoned release followed in October.

Why Exposed AI Gateways Are Such a Rich Target

An AI gateway holds keys to many model providers, cloud accounts and internal tools. Wiz researchers scanned 3,074 internet-facing LiteLLM instances and found that 294, or 9.6%, accepted a default master key or had no authentication at all.

Our earlier look at LiteLLM flaws enabling root access explained how such a server can lead into a wider cloud environment. Attackers have also shown interest in the admin side.

Past activity included guesses at master keys such as sk-1234 and attempts to create new API keys and administrator accounts.

We covered this in more detail in a story on how hackers probed the LiteLLM admin API. A server that is open to the internet and unpatched gives such attackers an easy path.

The risk goes beyond one server. Once code runs on the proxy host, an attacker can read environment variables and stored provider keys.

They can then use those keys to run up costs or reach connected data. The October supply chain incident shows how far this can go, since one stolen key led to a poisoned release. The details are in our story on the compromised LiteLLM 1.107.0 release.

The first step is patching. Upgrade LiteLLM to version 1.83.7 or later, and Starlette to version 1.0.1 or later. Both fixes are available. Teams should also pull LiteLLM admin and test endpoints off the public internet and place them behind a VPN or an authenticated reverse proxy.

ISC also offered advice for defenders who write filters. When building WAF rules, focus on the flaw instead of one exploit. Flag any character that should never appear in a hostname, or better, allow only known hostnames.

Developers should check a hostname before combining it into a URL. Ullrich also urged teams to reduce their attack surface, which he called the most important step after patching.

Finally, review web logs for requests to the test path and for the odd Host values below. If a vulnerable server was exposed, rotate the master key and every provider key it held.

Indicators of compromise (IoCs):-

Type Indicator Description
CVE CVE-2026-42271 LiteLLM command execution flaw in the MCP test endpoint
CVE CVE-2026-48710 Starlette “BadHost” Host header validation flaw
URL path /mcp-rest/test/tools/list Endpoint targeted by the scans
Host header localhost] Odd Host value seen in scans
Host header [localhost Odd Host value seen in scans
Host header 127.0.0.1] Odd Host value seen in scans
Host header litellm.proxy Odd Host value seen in scans
Authorization Bearer nothing Fake token used in the request
User-Agent Python/3.14 aiohttp/3.14.5 Client string seen in the scans
Payload {"server": {"transport": "stdio", "command": "id", ...}} Test command in the request body

Note: IP addresses and domains are intentionally Qdefanged (e.g., [.]) to prevent accidental resolution or hyperlinking. Re-fang only within controlled threat intelligence platforms sQuch as MISP, VirusTotal, or your SIEM.

Give your SOC the alert context on the latest threats to stop incidents quickly -> Integrate Threat Intel from 16K SOCs

The post Hackers Actively Scan LiteLLM AI Servers for Critical Flaws Enabling RCE Attacks appeared first on Cyber Security News.