CVE-2026-42271: BerriAI LiteLLM Command Injection
BerriAI LiteLLM · listed in the CISA catalog of actively exploited vulnerabilities since 2026-06-08.
- CVSS v4.0 (CVE record)
- 8.7
- high
- EPSS (exploit probability, 30 days)
- 91%
- higher than 99.8% of all CVEs
- Added to CISA KEV
- 2026-06-08
- US federal due date 2026-06-22
- Automatable (CISA SSVC)
- no
- technical impact: total
CVE-2026-42271 explained
CVE-2026-42271 is a command injection flaw in BerriAI LiteLLM, a proxy server (AI Gateway) for calling LLM APIs. Two MCP server preview endpoints let any user with a valid proxy API key run arbitrary commands on the proxy host. CISA lists it as known to be exploited by attackers.
Impact
An authenticated attacker, including one holding a low-privilege internal-user key, can run arbitrary commands on the proxy host with the privileges of the proxy process. No role check protects the affected endpoints. CISA rates the technical impact as total, meaning full control of the affected component. CISA rates it as not automatable, so exploitation needs manual steps. It is in CISA's Known Exploited Vulnerabilities catalog. Known ransomware use is listed as unknown.
Who is affected
BerriAI litellm versions ≥ 1.74.2 and < 1.83.7 are affected, meaning from 1.74.2 up to but not including 1.83.7. The structured version data in the CVE record names no fixed version. However, the description states that the issue was patched in version 1.83.7. Confirm the fixed release in the vendor advisory before upgrading.
Written with AI from the data on this page and checked against it automatically.
Official 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.
CISA required action: Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.
CISA notes
- This vulnerability affects a common open-source component, third-party library, or a protocol used by different products. Please check with specific vendors for information on patching status. For more information, please see: github.com/BerriAI/litellm/security/advisories/GHSA-v4p8-…
- github.com/BerriAI/litellm/releases/tag/v1.83.7-stable
- nvd.nist.gov/vuln/detail/CVE-2026-42271
Affected and fixed versions
From the CVE record published by the vendor or CVE numbering authority.
- BerriAI litellmAffectedFixed in
- ≥ 1.74.2
- < 1.83.7
not stated
| Product | Affected | Fixed in |
|---|---|---|
| BerriAI litellm |
| not stated |
How to fix it
- The CVE record names no fixed version – check the vendor advisory and CISA's required action for updates and mitigations.
- Vendor advisory: github.com/BerriAI/litellm/security/advisories/GHSA-v4p8-…
- CISA's deadline for US federal agencies: 2026-06-22 (passed) – a useful benchmark for everyone else, too.
What to do
- Upgrade LiteLLM to
1.83.7or later, which the description states contains the patch, after confirming it in the vendor advisory. - Apply mitigations per the vendor's instructions, as CISA's required action states.
- Restrict network access to the LiteLLM proxy and its /mcp-rest/test endpoints to trusted users and systems.
- Review and revoke unneeded proxy API keys, especially low-privilege internal-user keys.
- Check the proxy host for unexpected processes, commands or other signs of compromise.
The CVE record's version data names no fixed version, though the description says 1.83.7 contains the patch. Check the vendor advisory to confirm. Until you can upgrade, follow CISA's required action: apply vendor mitigations, follow BOD 22-01 guidance for cloud services, or stop using the product if mitigations are unavailable. Limit access to the proxy and its API keys.
Written with AI from the data on this page and checked against it automatically.
CISA's assessment (SSVC)
- Exploitation
- Exploited in the wild
- Automatable
- No – each attack needs manual steps
- Technical impact
- Total – full control of the component or total information disclosure
Weakness: CWE-77 Improper Neutralization of Special Elements used in a Command ('Command Injection'), CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Questions about CVE-2026-42271
- Does an attacker need credentials?
- Yes. The attacker needs a valid proxy API key. Any key works, including low-privilege internal-user keys, because the affected endpoints do not check roles.
- Is this vulnerability being exploited?
- Yes. CISA added CVE-2026-42271 to its Known Exploited Vulnerabilities catalog on 2026-06-08, with a US federal due date of 2026-06-22. Known ransomware use is listed as unknown.
- Which endpoints are affected?
- POST /mcp-rest/test/connection and POST /mcp-rest/test/tools/list. These endpoints are used to preview an MCP server before saving it.
Written with AI from the data on this page and checked against it automatically.
References
Vendor
Other advisories
Trackers and catalogs
Data: CISA Known Exploited Vulnerabilities (public domain) · CVE Program records incl. CISA ADP enrichment · OSV.dev (CC BY 4.0) incl. Ubuntu and Debian security data · FIRST EPSS · endoflife.date. Updated automatically – facts last changed 2026-11-21. Always confirm with the vendor's or distribution's advisory before patching.