{"answers":{"affected":"3 open source packages ship an affected version, including litestar.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-48060 exists.","fix":"Upgrade litestar to 2.22.0 or later.","what":"CVE-2026-48060 is a high-severity cross-site scripting vulnerability in litestar-org litestar, published on 28 Jul 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2026-48060 and fix it if it is affected.\n\nWhat it is: CVE-2026-48060 is a high-severity cross-site scripting vulnerability in litestar-org litestar, published on 28 Jul 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-48060 exists.\n\nAffected packages and fixed versions:\n- litestar (PyPI): affected all versions; fixed in 2.22.0\n- litestar (PyPI): affected all versions; fixed in 2.22.0\n- litestar (PyPI): affected all versions; fixed in 2.22.0\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-48060/ (Markdown: https://insights.sbomify.com/CVE-2026-48060/index.md)","id":"CVE-2026-48060","markdown":"https://insights.sbomify.com/CVE-2026-48060/index.md","name":"CVE-2026-48060","record":{"aliases":["GHSA-542p-wvx7-72m4","PYSEC-2026-2604"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["code_execution","account_takeover"],"network_reachable":"yes","non_default_config":true,"product_category":"Litestar ASGI framework","requires_auth":"none","summary":"Attackers can inject HTML or scripts via CSRF tokens in Litestar apps using template engines, potentially leading to XSS and account takeover.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":8.1,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"description":"Litestar is an Asynchronous Server Gateway Interface (ASGI) framework. Prior to version 2.20.0, Litestar instances which use a template engine in conjunction with CSRF protection are vulnerable to HTML Injection which can be escalated to Cross Site Scripting due to the contents of the CSRF cookie being excluded from automatic escaping by the template engine when configured inline with documentation recommendations. This issue has been patched in version 2.20.0.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":"2026-05-19","github_poc":1,"max_poc_stars":0,"metasploit":0,"nuclei":0,"refs":[{"date":"2026-05-19T11:49:04Z","kind":"github_poc","ref":"https://github.com/Blinky-Keys/CVE-2026-48060","stars":0,"title":null}],"tier":"weaponised"},"has_fix":true,"headline":"Litestar: HTML Injection Through CSRF Token","id":"CVE-2026-48060","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"xss","year":"2026"},"n_packages":3,"n_references":2,"next":{"headline":"Litestar: AllowedHostsMiddleware bypasses host validation via client-controlled X-Forwarded-Host header","id":"CVE-2026-48061"},"packages":[{"ecosystem":"PyPI","fixed":["2.22.0"],"introduced":["0"],"last_affected":[],"package":"litestar","purl":null,"source":"GHSA-542p-wvx7-72m4"},{"ecosystem":"PyPI","fixed":["2.22.0"],"introduced":["0"],"last_affected":[],"package":"litestar","purl":"pkg:pypi/litestar","source":"GHSA-542p-wvx7-72m4"},{"ecosystem":"PyPI","fixed":["2.22.0"],"introduced":["0"],"last_affected":[],"package":"litestar","purl":"pkg:pypi/litestar","source":"PYSEC-2026-2604"}],"prev":{"headline":"Netty HAProxy: Unbalanced Reference Count in Nested PP2_TYPE_SSL TLV Parsing Leads to Memory Exhaustion","id":"CVE-2026-48059"},"products":["litestar"],"published":"2026-07-28","related":[],"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":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-07-28","vendors":["litestar-org"]},"summary":"Attackers can inject HTML or scripts via CSRF tokens in Litestar apps using template engines, potentially leading to XSS and account takeover.","url":"https://insights.sbomify.com/CVE-2026-48060/"}