CVE-2026-42271: BerriAI LiteLLM Command Injection Vulnerability

Reference page built from the source records below, each shown as its source publishes it. Dataset version ref-06defd401a30, updated 2026-11-02T23:39:54.475Z.

CISA Known Exploited Vulnerabilities

Name
BerriAI LiteLLM Command Injection Vulnerability
Vendor
BerriAI
Product
LiteLLM
Added to the catalog
2026-06-08
Due date for US federal agencies
2026-06-22
Weaknesses
CWE-78, CWE-77
Catalog version
2026.10.30

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.

Required action (CISA)

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: CISA does not mark known use of this vulnerability in ransomware campaigns.

Links in CISA's notes

Read on 2026-11-02T23:39:54.475Z under licence cisa-kev-cc0@b0067899 from https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json

NVD analysis

Status
Analyzed
Published
2026-05-08T04:16:21.820
Last modified
2026-10-26T20:10:00.160
Weaknesses
CWE-77, CWE-78

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.

MetricScoreSeverityVectorScored by
CVSS 4.08.7HIGHCVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X[email protected] (Secondary)
CVSS 3.18.8HIGHCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H[email protected] (Primary)
CVSS 3.18.8HIGHCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H0b0ca135-0b70-47e7-9f44-1890c2a1c46c (Secondary)

References

This product uses the NVD API but is not endorsed or certified by the NVD.

Read on 2026-11-02T23:42:31.494Z under licence nvd-api-terms-of-use@ff2a5288 from https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2026-42271

CVE record

Title (CNA)
LiteLLM: Authenticated command execution via MCP stdio test endpoints
Assigner
GitHub_M
State
PUBLISHED
Published
2026-05-08T03:35:16.758Z
Updated
2026-07-15T00:57:49.325Z
Problem types
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')

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.

References

Read on 2026-11-03T02:20:07.203Z under licence cve-terms-of-use@81bfa2f3 from https://raw.githubusercontent.com/CVEProject/cvelistV5/main/cves/2026/42xxx/CVE-2026-42271.json

GitHub Advisory Database

GHSA-v4p8-mg3p-g94g: LiteLLM: Authenticated command execution via MCP stdio test endpoints

Severity (GitHub)
high
CVSS
8.8 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Weaknesses
CWE-77, CWE-78
Published
2026-04-25T23:27:54Z
Updated
2026-06-09T13:07:08Z
  • pip litellm: affected >= 1.74.2, < 1.83.7, first patched 1.83.7

### Impact

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.

### Patches

Fixed in **`1.83.7`**. Both test endpoints now require the `PROXY_ADMIN` role, bringing them into line with the save endpoint.

### Workarounds

If upgrading is not immediately possible, developers should block `POST /mcp-rest/test/connection` and `POST /mcp-rest/test/tools/list` at their reverse proxy or API gateway.

Read on 2026-11-03T02:47:28.407Z under licence ghsa-cc-by-4.0@9e5f1b3c from https://api.github.com/advisories/GHSA-v4p8-mg3p-g94g

Also known as / affected packages

Defensive techniques (MITRE D3FEND)

D3FEND maps these defensive techniques to the weakness (CWE) that NVD lists for this CVE, through the digital artifacts the weakness affects. D3FEND does not say they stop this vulnerability.

CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')

D3FEND ontology version 1.6.0.

Read on 2026-11-02T23:54:14.988Z under licence d3fend-terms-of-use@f98cbc7e from https://d3fend.mitre.org/api/weakness/cwe/CWE-77.json

CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

D3FEND ontology version 1.6.0.

Read on 2026-11-02T23:54:16.526Z under licence d3fend-terms-of-use@f98cbc7e from https://d3fend.mitre.org/api/weakness/cwe/CWE-78.json

MITRE D3FEND™ knowledge graph. © 2025 The MITRE Corporation.
"The MITRE Corporation (MITRE) hereby grants you a non-exclusive, royalty-free license to use D3FEND for research, development, and commercial purposes. Any copy you make for such purposes is authorized provided that you reproduce MITRE's copyright designation and this license in any such copy." Terms: https://d3fend.mitre.org/tou/

Sources and licences

  • CISA

    Source: CISA Catalog of Known Exploited Vulnerabilities, version 2026.10.30, CC0 1.0. Use of this data does not imply endorsement by CISA or DHS.

    CC0 1.0 Universal

  • National Vulnerability Database (NIST)

    This product uses the NVD API but is not endorsed or certified by the NVD.

    NVD API Terms of Use (NIST publications in the public domain, 17 U.S.C. 105)

  • CVE Program, The MITRE Corporation

    Copyright © 1999-2026, The MITRE Corporation. CVE is a trademark and the CVE logo is a registered trademark of The MITRE Corporation. CVE Usage: MITRE hereby grants you a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Common Vulnerabilities and Exposures (CVE™). Any copy you make for such purposes is authorized provided that you reproduce MITRE's copyright designation and this license in any such copy.

    CVE Program Terms of Use ("CVE Usage" licence)

  • GitHub Advisory Database

    Source: GitHub Advisory Database, https://github.com/advisories/GHSA-v4p8-mg3p-g94g, licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Changes: fields selected and reformatted by ransomware-tracker.com.

    CC BY 4.0

  • GitHub Advisory Database via OSV.dev

    GHSA-v4p8-mg3p-g94g: GitHub Advisory Database, https://github.com/advisories/GHSA-v4p8-mg3p-g94g. Licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/), provided as is, without warranties. Retrieved via OSV.dev (https://osv.dev/vulnerability/GHSA-v4p8-mg3p-g94g), which enriches records; fields selected and reformatted by ransomware-tracker.com.

    CC BY 4.0

  • MITRE D3FEND

    MITRE D3FEND™ knowledge graph. © 2025 The MITRE Corporation.
    "The MITRE Corporation (MITRE) hereby grants you a non-exclusive, royalty-free license to use D3FEND for research, development, and commercial purposes. Any copy you make for such purposes is authorized provided that you reproduce MITRE's copyright designation and this license in any such copy." Terms: https://d3fend.mitre.org/tou/

    MITRE D3FEND Terms of Use (site + knowledge graph); source repo MIT

Cite this page

Dragons Eye Ransomware Tracker, "CVE-2026-42271: BerriAI LiteLLM Command Injection Vulnerability",
entity page, dataset version ref-06defd401a30, updated 2026-11-02T23:39:54.475Z,
https://ransomware-tracker.com/cve/CVE-2026-42271 (accessed 2026-11-03).
Underlying source: CISA Catalog of Known Exploited Vulnerabilities, version 2026.10.30.
Underlying source: National Vulnerability Database (NIST), CVE API 2.0, record last modified 2026-10-26T20:10:00.160.
Underlying source: CVE List (CVE Program, The MITRE Corporation), record updated 2026-07-15T00:57:49.325Z.
Underlying source: GitHub Advisory Database, GHSA-v4p8-mg3p-g94g, updated 2026-06-09T13:07:08Z.
Underlying source: GitHub Advisory Database, GHSA-v4p8-mg3p-g94g, via OSV.dev, modified 2026-09-10T03:51:03.195872876Z.
Underlying source: MITRE D3FEND, ontology version 1.6.0.

Pages change. The dataset version identifies the data, but no archive of old versions is kept, so this citation cannot be replayed later.

CISA KEV index