Vulnerability · Published Jul 28, 2026 · Assigned by GitHub_M
CVE-2026-48060Litestar: HTML Injection Through CSRF Token
High 8.1
In plain English
A high-severity cross-site scripting in litestar from litestar-org. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 29% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| PyPI | litestar | 2.22.0 | GHSA-542p-wvx7-72m4 |
| PyPI | litestar | 2.22.0 | PYSEC-2026-2604 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| litestar-org | litestar | < 2.20.0 |
Weakness: CWE-79 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
References
- https://github.com/litestar-org/litestar/security/advisories/GHSA-542p-wvx7-72m4 x_refsource_CONFIRM
- https://github.com/litestar-org/litestar/releases/tag/v2.20.0 x_refsource_MISC