CVE-2026-25480: Litestar Litestar's FileStore Key Canonicalization Collisions Vulnerability
MODERATECVE-2026-25480 is a MODERATE (CVSS 6.5) litestar's filestore key canonicalization collisions vulnerability (CWE-20: Improper Input Validation) affecting Litestar libraries in the PyPI ecosystem. The issue involves litestar's filestore key canonicalization collisions allow response cache mixup/poisoning (ascii ord + unicode nfkd). Remediation is available by upgrading affected packages to version 2.20.0.
CVE-2026-25480 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N).
How to Fix CVE-2026-25480
To remediate this vulnerability, upgrade all affected Litestar 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 litestar>=2.20.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show litestar
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-25480, inspect your installed packages using pip:
pip show litestar
Analyze the terminal output to locate any version of Litestar in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.20.0), your application is affected.
Note: The pip show litestar command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Litestar, 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-25480 Affected Litestar Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
litestar
|
PyPI |
≥ 2.19.0
< 2.20.0
All 1 versions
2.19.0
|
2.20.0
|
References
Frequently Asked Questions
What is CVE-2026-25480?
Which Litestar versions are affected?
What version fixes CVE-2026-25480?
Is litestar affected?
What is the CVSS score of CVE-2026-25480?
What CWE is associated with CVE-2026-25480?
How can I check PyPI dependencies for CVE-2026-25480?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-vxqx-rh46-q2pg",
"modified" : "2026-02-09T22:38:14Z",
"published" : "2026-02-09T17:19:06Z",
"aliases" : [ "CVE-2026-25480" ],
"summary" : "Litestar's FileStore key canonicalization collisions allow response cache mixup/poisoning (ASCII ord + Unicode NFKD)",
"details" : "### Summary\nFileStore maps cache keys to filenames using Unicode NFKD normalization and ord() substitution without separators, creating key collisions. When FileStore is used as response-cache backend, an unauthenticated remote attacker can trigger cache key collisions via crafted paths, causing one URL to serve cached responses of another (cache poisoning/mixup)\n\n### Details\nlitestar.stores.file._safe_file_name() normalizes input with unicodedata.normalize(\"NFKD\", name) and builds the filename by concatenating c if alphanumeric else str(ord(c)) (no delimiter).\nThis transformation is not injective, e.g.:\n\n- \"k-\" and \"k45\" both become \"k45\" (because - ord('-') == 45)\n- \"k/\\n\" becomes \"k4710\", colliding with \"k4710\"\n- \"K\" (Kelvin sign) normalizes to \"K\", colliding with \"K\"\n\nWhen used in response caching, the default cache key includes request path and sorted query params, which are attacker-controlled.\n\n### PoC\n\n```\nimport asyncio, tempfile\nfrom litestar.stores.file import FileStore\n\nasync def main():\n d = tempfile.mkdtemp(prefix=\"ls_filestore_poc_\")\n store = FileStore(d, create_directories=True)\n await store.__aenter__()\n\n # 1) ASCII ord-collision: \"-\" -> 45\n await store.set(\"k-\", b\"A\")\n v = await store.get(\"k45\")\n print(\"k- ->\", v)\n print(\"k45 ->\", await store.get(\"k45\"))\n if v == b\"A\":\n print(\"VULNERABLE: 'k-' collides with 'k45'\")\n\n # 2) NFKD collision: Kelvin sign -> K\n await store.set(\"K\", b\"B\") # U+212A\n v2 = await store.get(\"K\")\n print(\"K ->\", await store.get(\"K\"))\n print(\"K ->\", v2)\n if v2 == b\"B\":\n print(\"VULNERABLE: 'K' collides with 'K' (NFKD)\")\n\nif __name__ == \"__main__\":\n asyncio.run(main())\n```\n\n### Impact\nVulnerability type: cache poisoning / cache key collision.\nImpacted deployments: applications using Litestar response caching with FileStore backend (or any attacker-influenced keying into FileStore).\nPossible impact: serving incorrect cached content across distinct URLs, potential confidentiality/integrity issues depending on what endpoints are cached.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "litestar"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.19.0"
}, {
"fixed" : "2.20.0"
} ]
} ],
"versions" : [ "2.19.0" ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/litestar-org/litestar/security/advisories/GHSA-vxqx-rh46-q2pg"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-25480"
}, {
"type" : "WEB",
"url" : "https://github.com/litestar-org/litestar/commit/85db6183a76f8a6b3fd6ee3c88d860b9f37a2cca"
}, {
"type" : "WEB",
"url" : "https://docs.litestar.dev/2/release-notes/changelog.html#2.20.0"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/litestar-org/litestar"
}, {
"type" : "WEB",
"url" : "https://github.com/litestar-org/litestar/releases/tag/v2.20.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-176", "CWE-20" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-02-09T17:19:06Z",
"nvd_published_at" : "2026-02-09T20:15:57Z"
}
}