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.

Severity (CVSS 3.1)8.1High
Exploit odds (30 days)0.4%top 71.0% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack tooling1Public PoC

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

EcosystemPackageFixed inAdvisory
PyPIlitestar2.22.0GHSA-542p-wvx7-72m4
PyPIlitestar2.22.0PYSEC-2026-2604

Affected products (as reported)

VendorProductVersions
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