Actively exploited vulnerability
BerriAI LiteLLM: code execution flaw under attack
CVE-2026-42271 · BerriAI LiteLLM Command Injection Vulnerability
What is affected
BerriAI LiteLLM is mostly run by companies, schools and public bodies, not on home computers. You are unlikely to have it yourself, but organisations that hold your data may. Breaches that start with flaws like this one are how personal data ends up leaked.
BerriAI LiteLLM contains a command injection vulnerability that could allow any authenticated user, including holders of low-privilege internal-user keys, to run arbitrary commands on the host.
What an attacker can do
This is a code execution flaw. It lets an attacker run their own commands or programs on the affected system. In practice that usually means taking it over: installing malware, stealing data or using it to reach other devices on the same network.
- How it is reached
- Over the internet or network
- Access the attacker needs
- A basic user account
- Does the victim have to do something?
- No, works without the victim doing anything
What to do
- At home: nothing to install. Keep your own devices updated and use a different password for every service, so that a breach at one organisation does not open your other accounts.
- If you administer BerriAI LiteLLM at work: apply the vendor's fix or mitigation now and review logs for signs of compromise, because the flaw was being exploited before it was listed.
- If the product is past its support date and no fix exists, take it off the internet or retire it.
Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.
Vendor advisories and fixes
- github.comgithub.com/BerriAI/litellm/security/advisories/GHSA-v4p8-mg3p-g94g
- github.comgithub.com/BerriAI/litellm/releases/tag/v1.83.7-stable
How urgent is it
CISA added this vulnerability to its Known Exploited Vulnerabilities catalogue on June 8, 2026, which means there is reliable evidence of attacks in the wild. US federal agencies must fix it by June 22, 2026, a deadline that has already passed. That deadline does not bind anyone else, but it shows how seriously the agency rates it.
The EPSS model estimates a 93% probability that this flaw will be exploited somewhere in the next 30 days. That is higher than 99.8% of all scored vulnerabilities.
Its CVSS severity score is 8.7 out of 10 (high), as recorded in the US National Vulnerability Database.
Technical description
LiteLLM is a proxy server (AI Gateway) to call LLM APIs in OpenAI (or native) format. From version 1.74.2 to before version 1.83.7, two endpoints used to preview an MCP server before saving it — POST /mcp-rest/test/connection and POST /mcp-rest/test/tools/list — accepted a full server configuration in the request body, including the command, args, and env fields used by the stdio transport. When called with a stdio configuration, the endpoints attempted to connect, which spawned the supplied command as a subprocess on the proxy host with the privileges of the proxy process. The endpoints were gated only by a valid proxy API key, with no role check. Any authenticated user — including holders of low-privilege internal-user keys — could therefore run arbitrary commands on the host. This issue has been patched in version 1.83.7.