Litestar: HTML Injection Through CSRF Token
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- High · High · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-79.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| litestar-org | litestar | before 2.20.0 | 2.20.0 | Patch available | CNA |
| — | litestar (PyPI) | before 2.22.0 | 2.22.0 | Patch available | GHSA-542p-wvx7-72m4 |
- litestar Vendorlitestar-org Affected before 2.20.0 Fixed in 2.20.0 Patch available CNA
- litestar (PyPI) Vendor— Affected before 2.22.0 Fixed in 2.22.0 Patch available GHSA-542p-wvx7-72m4
CPE names Threatist (inferred) · 1
Inferred from how NVD named this product before; not given by a source.
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:litestar:litestar:*:*:*:*:*:*:*:* | — | — | litestar-org |
- cpe:2.3:a:litestar:litestar:*:*:*:*:*:*:*:* Versions — — ·litestar-org
Remediation
- Fix · CNA litestar (litestar-org) Fixed in 2.20.0
- Fix · GHSA-542p-wvx7-72m4 litestar (PyPI) Fixed in 2.22.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-48060
- 2026-10-03 Alias added: GHSA-542p-wvx7-72m4
References
More litestar-org vulnerabilities
- TI-2024-21848 Litestar and Starlite affected by Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') CVSS 3.1HIGH 8.2
- TI-2024-35241 Litestar allows unbounded resource consumption (DoS vulnerability) CVSS 4.0HIGH 8.2
- TI-2025-36757 X-Forwarded-For Header Spoofing Bypasses Litestar Rate Limiting CVSS 3.1HIGH 7.5
- TI-2024-28356 Litestar repository vulnerable to Environment Variable injection in `docs-preview.yml` workflow CVSS 3.1HIGH 8.3
- TI-2026-35502 Litestar: AllowedHostsMiddleware bypasses host validation via client-controlled X-Forwarded-Host header CVSS 3.1MEDIUM 5.9
- TI-2026-20591 FileStore key canonicalization collisions allow response cache mixup/poisoning (ASCII ord + Unicode NFKD) CVSS 3.1MEDIUM 6.5
Sources
- CVE-2026-48060 · CVE Program
- CVE-2026-48060 · NVD
- FIRST EPSS
- GHSA-542p-wvx7-72m4 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences