{"answers":{"affected":"3 open source packages ship an affected version, including litellm. It affects 2 products.","exploited":"Yes. Attackers have exploited CVE-2026-42271 in the wild since at least 8 Jun 2026.","fix":"Upgrade litellm to 1.83.7 or later. US federal agencies must fix it by 22 Jun 2026.","what":"CVE-2026-42271 is a high-severity command injection vulnerability in BerriAI litellm, published on 8 May 2026. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-42271 and fix it if it is affected.\n\nWhat it is: CVE-2026-42271 is a high-severity command injection vulnerability in BerriAI litellm, published on 8 May 2026. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: Yes. Attackers have exploited CVE-2026-42271 in the wild since at least 8 Jun 2026.\n\nAffected packages and fixed versions:\n- litellm (PyPI): affected from 1.74.2; fixed in 1.83.7\n- litellm (PyPI): affected from 1.74.2; fixed in 1.83.7\n- litellm (PyPI): affected from 1.74.2; fixed in 1.83.7\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-42271/ (Markdown: https://insights.sbomify.com/CVE-2026-42271/index.md)","id":"CVE-2026-42271","markdown":"https://insights.sbomify.com/CVE-2026-42271/index.md","name":"CVE-2026-42271","record":{"aliases":["ECHO-c4c7-aed2-2231","GHSA-v4p8-mg3p-g94g","MINI-2r2w-xq7g-q5j6","MINI-45w8-qv5q-qqcp","MINI-4r4g-687v-g9j9","MINI-7qv8-pqwr-2c4r","MINI-965q-5x27-w7x2","MINI-mwp4-g93c-7fg7","PYSEC-2026-2599"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["code_execution","privilege_escalation"],"network_reachable":"yes","non_default_config":false,"product_category":"AI Gateway Proxy","requires_auth":"low_privilege","summary":"Authenticated users can execute arbitrary commands on the host via MCP stdio test endpoints due to missing role checks.","user_interaction":"not_required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"litellm","vendor":"litellm"},{"product":"openshift_ai","vendor":"redhat"}],"cvss":{"score":8.7,"severity":"high","source":"cna","vector":"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","version":"4.0"},"cwes":[{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"},{"id":"CWE-77","name":"Improper Neutralization of Special Elements used in a Command"}],"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.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":"2026-04-21","github_poc":2,"max_poc_stars":1,"metasploit":1,"nuclei":1,"refs":[{"date":"2026-05-20T01:12:57Z","kind":"github_poc","ref":"https://github.com/learner202649/CVE-2026-42271-PoC","stars":1,"title":"The code for personally reproducing the corresponding vulnerability"},{"date":"2026-04-21","kind":"metasploit","ref":"exploit/multi/http/litellm_mcp_test_cmd_injection","stars":null,"title":"BerriAI LiteLLM Proxy MCP Test Endpoint Command Execution"},{"date":"2026-06-09T08:13:12Z","kind":"github_poc","ref":"https://github.com/HORKimhab/CVE-2026-42271","stars":0,"title":"CVE-2026-42271 - Draft"},{"date":null,"kind":"nuclei","ref":"http/cves/2026/CVE-2026-42271.yaml","stars":null,"title":"LiteLLM - Command Injection"}],"tier":"exploited"},"has_fix":true,"headline":"BerriAI LiteLLM Command Injection","id":"CVE-2026-42271","indexable":true,"kev":{"dateAdded":"2026-06-08","dueDate":"2026-06-22","knownRansomwareCampaignUse":"Unknown","product":"LiteLLM","requiredAction":"Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.","vendorProject":"BerriAI","vulnerabilityName":"BerriAI LiteLLM Command Injection Vulnerability"},"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"command_injection","year":"2026"},"n_packages":3,"n_references":2,"next":{"headline":"Heimdall: Case-sensitive handling of URL-encoded slashes may lead to inconsistent path interpretation","id":"CVE-2026-42272"},"packages":[{"ecosystem":"PyPI","fixed":["1.83.7"],"introduced":["1.74.2"],"last_affected":[],"package":"litellm","purl":null,"source":"GHSA-v4p8-mg3p-g94g"},{"ecosystem":"PyPI","fixed":["1.83.7"],"introduced":["1.74.2"],"last_affected":[],"package":"litellm","purl":"pkg:pypi/litellm","source":"GHSA-v4p8-mg3p-g94g"},{"ecosystem":"PyPI","fixed":["1.83.7"],"introduced":["1.74.2"],"last_affected":[],"package":"litellm","purl":"pkg:pypi/litellm","source":"PYSEC-2026-2599"}],"prev":{"headline":"countly-server: Unauthenticated Denial of Service (DoS) via Unhandled Stream Exception","id":"CVE-2026-42270"},"products":["litellm"],"published":"2026-05-08","related":[{"cvss_score":9.3,"headline":"BerriAI LiteLLM SQL Injection","id":"CVE-2026-42208","kev_date_added":"2026-05-08","published":"2026-05-08"},{"cvss_score":8.8,"headline":"BerriAI LiteLLM Improper Authentication","id":"CVE-2026-59822","kev_date_added":"2026-09-02","published":"2026-07-08"},{"cvss_score":9.8,"headline":"Remote Code Execution in BerriAI/litellm","id":"CVE-2024-5751","kev_date_added":null,"published":"2024-06-27"},{"cvss_score":9.8,"headline":"Server-Side Template Injection in BerriAI/litellm","id":"CVE-2024-2952","kev_date_added":null,"published":"2024-04-10"},{"cvss_score":9.5,"headline":"LiteLLM: Authentication Bypass via Host Header Injection","id":"CVE-2026-49468","kev_date_added":null,"published":"2026-06-22"},{"cvss_score":9.4,"headline":"LiteLLM has an authentication bypass via OIDC userinfo cache key collision","id":"CVE-2026-35030","kev_date_added":null,"published":"2026-04-06"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"open","licence":"CC0 1.0","name":"CISA KEV"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"attribution","licence":"BSD-3-Clause","name":"Metasploit"},{"class":"attribution","licence":"MIT","name":"Nuclei templates"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"active","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-07-15","vendors":["BerriAI"]},"summary":"Authenticated users can execute arbitrary commands on the host via MCP stdio test endpoints due to missing role checks.","url":"https://insights.sbomify.com/CVE-2026-42271/"}