Back to Newsroom

Threat intel5 min read

Attackers scan for LiteLLM gateways open to the Starlette BadHost chain

Since 14 November, honeypots have logged probes that chain LiteLLM CVE-2026-42271 with Starlette CVE-2026-48710 to run commands without a key. Both flaws are on CISA's KEV list and fixed in LiteLLM 1.83.7 and Starlette 1.0.1.

4Tify Team

Over the weekend of 14 and 15 November 2026, honeypot sensors started logging requests aimed at LiteLLM, the popular proxy that sits between applications and AI model providers. The requests try to chain two known flaws, CVE-2026-42271 in LiteLLM and CVE-2026-48710 in the Starlette web framework, to run commands on the gateway without logging in. Both bugs are already on CISA's list of exploited vulnerabilities, and fixes have been out since spring.

What happened

Each probe is a POST to /mcp-rest/test/tools/list, one of LiteLLM's endpoints for testing an MCP server before it is saved. The request carries a meaningless token (Authorization: Bearer nothing) and a JSON body that defines a server using the stdio transport with the command id. If that command runs, the attacker knows the host is open to remote code execution.

The interesting part is the Host header. The traffic used values such as localhost], [localhost, 127.0.0.1] and litellm.proxy. The public proof-of-concept relies on characters like /, ? and # in that header, so the brackets look like an attempt to get past filters written for the original exploit. Exploitation of this chain was already reported in July. This is the same attack, reworked to find servers that are still unpatched.

There is no public sign so far that any of these November probes succeeded.

Who is affected

  • LiteLLM from 1.74.2 up to, but not including, 1.83.7 (CVE-2026-42271). CVSS 8.8.
  • Starlette up to and including 1.0.0 (CVE-2026-48710, known as "BadHost"). CVSS 6.5. Starlette is also the base of FastAPI, so other Python services that make access decisions from the request URL can be exposed too.

The real risk is a LiteLLM proxy reachable from the internet that runs both vulnerable versions. CISA added CVE-2026-42271 to its Known Exploited Vulnerabilities catalog on 8 June 2026 and CVE-2026-48710 on 2 September 2026, noting that the two can be chained.

How the chain works

On its own, CVE-2026-42271 needs a valid LiteLLM key. The two MCP test endpoints accepted a full server definition, including the command, arguments and environment variables, and started that command as a subprocess with the proxy's own privileges. There was no role check, so even a low-privilege internal-user key was enough.

CVE-2026-48710 removes the need for a key. Older Starlette versions rebuilt the request URL from the unchecked Host header. A malformed value shifts where the path appears to start, so code that reads request.url.path sees a different path from the one the router actually served. An authentication check based on that path can be fooled, while the request still lands on the test endpoint.

A gateway is a valuable place to land. It usually holds API keys for several model providers and often links to internal tools, so code execution there tends to mean stolen credentials and a large bill.

What to do now

  1. Upgrade LiteLLM. 1.83.7 fixes CVE-2026-42271 by limiting both test endpoints to the PROXY_ADMIN role, as described in LiteLLM's advisory. Other LiteLLM bugs are also on the exploited list (CVE-2026-59822 fixed in 1.84.0, CVE-2026-40217 fixed in 1.83.10), so move to a current release rather than stopping at 1.83.7.
  2. Upgrade Starlette to 1.0.1 or later, which validates the Host header, per the Starlette advisory. Recent LiteLLM releases already require it, but check the version installed in your image or virtual environment with pip show starlette.
  3. If you can't patch today, block POST /mcp-rest/test/connection and POST /mcp-rest/test/tools/list at your reverse proxy. Configure that proxy to reject Host values with characters that can't appear in a hostname, or better, to accept only the hostnames you actually serve.
  4. Take the admin and test endpoints off the internet. Put them behind a VPN or an authenticated proxy.
  5. Check your logs for requests to the two test paths and for the odd Host values above. If a vulnerable gateway was exposed, assume its secrets are gone: rotate the master key, every virtual key and every provider key it held.

The CISA KEV entry lists the deadlines that US federal agencies had to meet.

AI gateways tend to get deployed quickly by a single team and then forgotten. Our Attack Surface Management service keeps an inventory of what you expose to the internet, including services like LiteLLM and their versions, so a forgotten proxy shows up before a scanner finds it.

NEWSLETTER

The week’s news,
every Friday.

A short email with what we published that week. You can unsubscribe from any of them.

FRIDAY DIGEST · SAMPLE4TIFY NEWSROOM

This week in security

  • 01Attackers exploit critical Cisco Expressway flaw to gain root on clustered nodes
  • 02SonicWall ends Gen 6 firewall patches, even for critical flaws
  • 03WhatsApp fixes three flaws, one possibly used to back up scam messages

+ 6 MORE IN THIS ISSUE · UNSUBSCRIBE IN ONE CLICK

ONE OFFER

More than one product?
Get one offer.

Tell us what you need to protect and your budget, monthly or yearly. We combine the products into one offer and one contract, sized to that budget, and we stay with you after it is signed.

Ask for an offer Just tell us how many assets you have and what you want to spend.
LiteLLM and Starlette BadHost RCE chain under active scanning | 4Tify