CVE-2026-42271
LiteLLM: Authenticated command execution via MCP stdio test endpoints
Check your servers for CVE-2026-42271
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-42271 affects litellm, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Known exploited
CISA added this CVE to its list of known exploited vulnerabilities on 8 Jun 2026. US federal agencies had to act by 22 Jun 2026.
- Name
- BerriAI LiteLLM Command Injection Vulnerability
- 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.
- Ransomware
- Use in ransomware campaigns is not known
- Notes
- https://github.com/BerriAI/litellm/security/advisories/GHSA-v4p8-mg3p-g94g https://github.com/BerriAI/litellm/releases/tag/v1.83.7-stable https://nvd.nist.gov/vuln/detail/CVE-2026-42271
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.
Severity (CVSS)
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:N/SA:N
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- low: an attack works without special conditions
- Attack requirements
- present: an attack works only when the target is in a certain state or configuration
- Privileges required
- low: the attacker needs an ordinary user account
- User interaction
- none: nobody has to click or open anything
- Impact on the vulnerable system
- confidentiality high, integrity high, availability high: what an attacker can read, change or stop in the vulnerable component
- Impact on other systems
- confidentiality high, integrity none, availability none: what an attacker can read, change or stop beyond it
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- low: the attacker needs an ordinary user account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 7.31%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 95.1% of all scored CVEs. Scores of 30 Nov 2026.
The assessment of CISA (SSVC, 8 May 2026):
- Exploitation
- active: CISA has reliable evidence of exploitation in the wild
- Automatable
- no: each attack takes manual steps
- Technical impact
- total: full control of the component or of its data
Weakness
- CWE-77 Improper Neutralization of Special Elements used in a Command
- CWE-78 Improper Neutralization of Special Elements used in an OS Command
Affected products
As the CNA lists them.
Is my server affected?
Find the installed version of litellm and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i litellm
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2026-42271 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2026-42271RHEL, Rocky, Alma, Fedora
rpm -q litellm
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2026-42271Alpine
apk list --installed | grep -i litellmWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2026-42271
trivy image --scanners vuln IMAGE | grep CVE-2026-42271
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
- https://github.com/BerriAI/litellm/security/advisories/GHSA-v4p8-mg3p-g94g github.com
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2026-42271 cisa.gov · government resource
- https://access.redhat.com/security/cve/CVE-2026-42271 access.redhat.com · vdb entry
- RHBZ#2467924 bugzilla.redhat.com · issue tracking
- https://access.redhat.com/errata/RHSA-2026:28960 access.redhat.com · vendor advisory
- https://access.redhat.com/errata/RHSA-2026:30056 access.redhat.com · vendor advisory
- https://access.redhat.com/errata/RHSA-2026:27784 access.redhat.com · vendor advisory
Other references
- https://github.com/BerriAI/litellm/releases/tag/v1.83.7-stable github.com
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-42271.json security.access.redhat.com
Source: the record CVE-2026-42271 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse