{"id":"CVE-2026-25480","aliases":["CVE-2026-25480","GHSA-vxqx-rh46-q2pg","PYSEC-2026-2197"],"related":[],"kind":"vulnerability","state":"published","title":"FileStore key canonicalization collisions allow response cache mixup/poisoning (ASCII ord + Unicode NFKD)","summary":"Litestar is an Asynchronous Server Gateway Interface (ASGI) framework. Prior to 2.20.0, FileStore 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). This vulnerability is fixed in 2.20.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Litestar is an Asynchronous Server Gateway Interface (ASGI) framework. Prior to 2.20.0, FileStore 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). This vulnerability is fixed in 2.20.0.","source":"cvelist"},{"lang":"en","text":"### 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- \"K\" (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(\"K\", b\"B\")   # U+212A\n    v2 = await store.get(\"K\")\n    print(\"K ->\", await store.get(\"K\"))\n    print(\"K ->\", v2)\n    if v2 == b\"B\":\n        print(\"VULNERABLE: 'K' 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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Litestar es un framework de Interfaz de Pasarela de Servidor Asíncrono (ASGI). Antes de la versión 2.20.0, FileStore mapea las claves de caché a nombres de archivo utilizando la normalización Unicode NFKD y la sustitución ord() sin separadores, creando colisiones de claves. Cuando FileStore se utiliza como backend de caché de respuestas, un atacante remoto no autenticado puede desencadenar colisiones de claves de caché a través de rutas manipuladas, haciendo que una URL sirva respuestas en caché de otra (envenenamiento/mezcla de caché). Esta vulnerabilidad está corregida en la versión 2.20.0.","source":"nvd"}],"published":"2026-02-09T17:19:06.000Z","modified":"2026-07-13T07:26:32.411Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","score":6.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","score":6.5,"rating":"MEDIUM"}],"cwes":["CWE-20","CWE-176"],"affected":[{"ranges":[{"version":"< 2.20.0","status":"affected"}],"vendor":"litestar-org","product":"litestar","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"2.19.0","status":"affected","fixed":"2.20.0"}],"ecosystem":"PyPI","package":"litestar","purl":"pkg:pypi/litestar","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2.20.0"}],"vendor":"litestar","product":"litestar","cpe":"cpe:2.3:a:litestar:litestar:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.20.0"}],"ecosystem":"PyPI","package":"litestar","purl":"pkg:pypi/litestar","source":"pysec"}],"references":[{"url":"https://github.com/litestar-org/litestar/security/advisories/GHSA-vxqx-rh46-q2pg","tags":["evidence","exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/litestar-org/litestar/commit/85db6183a76f8a6b3fd6ee3c88d860b9f37a2cca","tags":["fix","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://docs.litestar.dev/2/release-notes/changelog.html#2.20.0","tags":["advisory","release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/litestar-org/litestar/releases/tag/v2.20.0","tags":["advisory","release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-25480","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/litestar-org/litestar","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-02-10T15:39:52.216Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-25480","url":"https://www.cve.org/CVERecord?id=CVE-2026-25480","licence":"CVE Terms of Use","modified":"2026-02-10T16:01:06.327Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-vxqx-rh46-q2pg","url":"https://github.com/advisories/GHSA-vxqx-rh46-q2pg","licence":"CC-BY-4.0","modified":"2026-07-13T07:26:32.411Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-25480","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-25480","licence":"Public domain","modified":"2026-06-17T10:24:42.447Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-2197","url":"https://osv.dev/vulnerability/PYSEC-2026-2197","licence":"CC-BY-4.0","modified":"2026-07-13T07:15:34.276Z"}],"updatedAt":"2026-11-25T22:59:13.666Z","epss":{"score":0.0046,"percentile":0.4162,"date":"2026-12-01T12:00:22.000Z"}}