CVE-2026-59820: LiteLLM Path Traversal Vulnerability
MODERATECVE-2026-59820 is a MODERATE path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting LiteLLM libraries in the PyPI ecosystem. The issue involves arbitrary file write via path traversal in skills archive extraction. Remediation is available by upgrading affected packages to version 1.83.7.
CVE-2026-59820 at a Glance
How to Fix CVE-2026-59820
To remediate this vulnerability, upgrade all affected LiteLLM dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install litellm>=1.83.7
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show litellm
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-59820, inspect your installed packages using pip:
pip show litellm
Analyze the terminal output to locate any version of LiteLLM in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.83.7), your application is affected.
Note: The pip show litellm command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In LiteLLM, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-59820 Affected LiteLLM Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
litellm
|
PyPI |
< 1.83.7
|
1.83.7
|
References
Frequently Asked Questions
What is CVE-2026-59820?
Which LiteLLM versions are affected?
What version fixes CVE-2026-59820?
Is litellm affected?
What CWE is associated with CVE-2026-59820?
How can I check PyPI dependencies for CVE-2026-59820?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5jmr-gcrj-2c9q",
"modified" : "2026-07-22T22:37:15Z",
"published" : "2026-07-22T22:37:15Z",
"aliases" : [ "CVE-2026-59820" ],
"summary" : "LiteLLM: Arbitrary file write via path traversal in Skills archive extraction",
"details" : "### Impact\n\nLiteLLM Skills archive extraction did not sufficiently validate file paths from uploaded skill ZIP archives. An authenticated user with access to LiteLLM LLM API routes, or a key whose `allowed_routes` includes `/v1/skills`, `anthropic_routes`, or `llm_api_routes`, could upload a crafted skill archive containing path traversal entries.\n\nWhen the skill was processed for execution, those entries could be written outside the intended extraction/staging directory. This could allow arbitrary file write and may lead to code execution depending on deployment configuration and writable paths.\n\n### Patches\n\nThe issue is fixed in `1.83.7-stable`.\n\nLiteLLM recommens upgrading to `1.83.7-stable` or later.\n\n### Workarounds\n\nIf upgrading is not immediately possible:\n\n1. Block `POST /v1/skills` at your reverse proxy or API gateway.\n2. Restrict Skills API access to trusted users only.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "litellm"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.83.7"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/BerriAI/litellm/security/advisories/GHSA-5jmr-gcrj-2c9q"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-59820"
}, {
"type" : "WEB",
"url" : "https://github.com/BerriAI/litellm/pull/25475"
}, {
"type" : "WEB",
"url" : "https://github.com/BerriAI/litellm/commit/6a15adcd64137d37f73dee76dfe7481f8c2d9196"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/BerriAI/litellm"
}, {
"type" : "WEB",
"url" : "https://github.com/BerriAI/litellm/releases/tag/v1.83.7-stable"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-22T22:37:15Z",
"nvd_published_at" : "2026-07-08T20:16:57Z"
}
}