LiteLLM: Authenticated command execution via MCP stdio test endpoints
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-42271
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 13:08 UTC · Revision 1
Source evidence
LiteLLM: Authenticated command execution via MCP stdio test endpoints
core-osv · Original sourcePublished 8 May 2026, 03:35 UTC
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.
osv:CVE-2026-42271
Complete source record
{
"id": "c17e18e93e053fa2e774a5719656d02269116e4f25aa10c1ea228c43d9363e4b",
"url": "https://osv.dev/vulnerability/CVE-2026-42271",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "LiteLLM: Authenticated command execution via MCP stdio test endpoints",
"summary": "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.",
"evidence": "osv:CVE-2026-42271",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2026-42271",
"aliases": [
"CVE-2026-42271",
"GHSA-v4p8-mg3p-g94g",
"PYSEC-2026-2599"
],
"metrics": [
{
"type": "CVSS_V4",
"score": "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"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/berriai/litellm",
"type": "GIT",
"events": [
{
"introduced": "225e9f3d552d190a3042f1081bcc17e6f599d151"
},
{
"fixed": "e0d5c28db02b3219dbd944666a55f49732197922"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "1.74.2"
},
{
"fixed": "1.83.7"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"fixed": "e0d5c28db02b3219dbd944666a55f49732197922"
}
],
"source": "REFERENCES_TAG",
"original_tag": "v1.83.7-stable"
},
{
"cpe": "cpe:2.3:a:litellm:litellm:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "1.74.2"
},
{
"fixed": "1.83.7"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"versions": [
"v1.83.3.rc.1",
"v1.83.3-stable",
"v1.83.7.rc.1",
"v1.83.6-nightly",
"v1.83.5-nightly",
"v1.81.9.rc.1",
"v1.81.9-stable",
"v1.81.9-nightly",
"v1.83.2-nightly",
"v1.83.1-nightly",
"v1.83.0-nightly",
"v1.82.5.dev.1",
"v1.82.6.dev2",
"v1.82.1.rc.1",
"v1.82.1-nightly",
"v1.82.4-nightly",
"v1.82.1-silent-dev2",
"v1.81.16.custm-auth.dev",
"v1.81.14.rc.1",
"v1.81.14-nightly",
"litellmv1.81.15.presidio.dev",
"litellm-pres-dev-v1.81.15",
"v1.81.13.dev1",
"litellm_pro-mgmnt-dev-v1.81.13",
"litellm_1.81.13-dev",
"v1.80.11.rc.1",
"v1.80.11-stable",
"v1.80.11-nightly",
"litellm_sso-dev-v1.81.13",
"v1.81.12-nightly",
"v1.80.17-nightly",
"v1.81.3.rc.5",
"v1.81.7.dev1",
"v1.81.0.rc.1",
"v1.81.0-nightly",
"v1.81.3.rc",
"v1.81.3.rc.1",
"v1.81.3-nightly",
"v1.81.1-nightly",
"v1.80.16.dev6",
"v1.80.13-nightly",
"v1.80.16-nightly",
"v1.80.15.rc.1",
"v1.80.15-nightly",
"v1.80.12-nightly",
"v1.80.10.dev.1",
"v1.80.10.rc.1",
"v1.80.10-nightly",
"v1.80.8.rc.1",
"v1.80.8-nightly",
"v1.80.9.dev1",
"v1.80.9-nightly",
"v1.80.8.dev.1",
"v1.80.7.dev.3",
"v1.80.6-nightly",
"v1.80.5.dev2",
"v1.80.5-nightly",
"v1.78.5.rc.1",
"v1.78.5-stable",
"v1.78.5-nightly",
"v1.80.0.dev6",
"v1.80.0.dev2",
"v1.80.0.dev1",
"v1.80.0-nightly",
"v1.79.3.dev7",
"v1.79.3.dev5",
"v1.79.dev.1",
"v1.79.3.rc.1",
"v1.79.3-nightly",
"v1.79.2-nightly",
"v1.79.1.rc.1",
"v1.79.1-nightly",
"v1.79.0.rc.1",
"v1.79.0-nightly",
"v1.78.7-nightly",
"v1.78.6-nightly",
"v1.78.4.dev1",
"v1.78.4-nightly",
"v1.78.3-nightly",
"v1.78.2-nightly",
"v1.78.0-nightly",
"v1.77.7.rc.1",
"v1.77.7-nightly",
"v1.77.7.dev9",
"v1.77.7.dev.3",
"v1.77.7.rc.2",
"v1.77.1.rc.1-v2",
"v1.77.5.rc.1",
"v1.77.5-nightly",
"v1.77.6.dev.1",
"v1.77.4-nightly",
"v1.77.3-nightly",
"v1.77.3.dynamic_rates",
"v1.77.2.rc.1",
"v1.77.1-nightly",
"v1.77.1.dev.2",
"v1.77.1.dev.1",
"v1.77.0-nightly",
"v1.76.3.dev1",
"v1.76.1.rc.1",
"v1.76.3.rc.1",
"v1.76.3-nightly",
"v1.76.2-nightly",
"v1.76.1-nightly",
"v1.76.0-nightly",
"v1.76.0-stable-draft",
"v1.75.9-nightly",
"v1.75.8-stable",
"v1.75.8-nightly",
"v1.75.7-nightly",
"v1.75.6-nightly",
"v1.75.5.rc.1",
"v1.75.5-stable.rc-draft",
"v1.75.4-nightly",
"v1.75.2-nightly",
"v1.75.3-nightly",
"v1.75.0-nightly",
"v1.74.15-nightly",
"1.74.15.rc.1",
"v1.74.9.rc.1",
"v1.74.9-stable",
"v1.74.14-nightly",
"v1.74.12-nightly",
"v1.74.9.rc-draft",
"v1.74.7.rc.1",
"v1.74.8-nightly",
"v1.74.7-nightly",
"v1.74.6-nightly",
"v1.74.5.dev1",
"v1.74.4-nightly",
"v1.74.3.rc.1",
"v1.74.3-stable-draft",
"v1.74.3-nightly",
"v1.74.2-nightly"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-42271.json"
}
}
],
"modified": "2026-10-28T02:30:29.028537610Z",
"provider": "osv",
"references": [
"https://github.com/BerriAI/litellm/releases/tag/v1.83.7-stable",
"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-42271.json",
"https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2026-42271",
"https://access.redhat.com/errata/RHSA-2026:27784",
"https://access.redhat.com/errata/RHSA-2026:28960",
"https://access.redhat.com/errata/RHSA-2026:30056",
"https://access.redhat.com/security/cve/CVE-2026-42271",
"https://github.com/BerriAI/litellm/security/advisories/GHSA-v4p8-mg3p-g94g",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/42xxx/CVE-2026-42271.json",
"https://nvd.nist.gov/vuln/detail/CVE-2026-42271",
"https://bugzilla.redhat.com/show_bug.cgi?id=2467924"
],
"provider_metadata": {
"cwe_ids": [
"CWE-77",
"CWE-78"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/42xxx/CVE-2026-42271.json"
}
},
"related_cves": [
{
"value": "CVE-2026-42271",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 495686,
"published_at": "2026-05-08T03:35:16.758+00:00"
}