Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. litellm
  4. ›
  5. CVE-2026-42271

CVE-2026-42271: LiteLLM: Authenticated command execution via MCP stdio test endpoints

April 25, 2026 (updated May 4, 2026)

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.

References

  • github.com/BerriAI/litellm
  • github.com/BerriAI/litellm/releases/tag/v1.83.7-stable
  • github.com/BerriAI/litellm/security/advisories/GHSA-v4p8-mg3p-g94g
  • github.com/advisories/GHSA-v4p8-mg3p-g94g
  • nvd.nist.gov/vuln/detail/CVE-2026-42271

Code Behaviors & Features

Detect and mitigate CVE-2026-42271 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 1.74.2 before 1.83.7

Fixed versions

  • 1.83.7

Solution

Upgrade to version 1.83.7 or above.

Impact 9.9 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Learn more about CVSS

Weakness

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

Source file

pypi/litellm/CVE-2026-42271.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 09 May 2026 12:19:14 +0000.