Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. litestar
  4. ›
  5. CVE-2026-48060

CVE-2026-48060: Litestar has HTML Injection Through its CSRF Token

June 10, 2026

This vulnerability affects all Litestar instances that use templates along with CSRF protection that has been configured inline with the documentation section of “Adding CSRF inputs” within the “Templating” page. An attacker that can successfully exploit this issue can inject arbitrary HTML tags into the page which is then rendered in the victim user’s browser. This includes script tags, allowing the attacker to escalate the attack to a Cross Site Scripting attack, thus executing arbitrary JavaScript code in the victim’s browser.

Depending on the configuration of the site, this could result in the theft of cookies or session tokens. This issue can also allow the attacker to change the appearance of the site. This could enable possible phishing attacks by injecting fake forms into the page or even skimming the information that a user enters into a legitimate form.

References

  • docs.litestar.dev/2/release-notes/changelog.html
  • github.com/advisories/GHSA-542p-wvx7-72m4
  • github.com/litestar-org/litestar/security/advisories/GHSA-542p-wvx7-72m4
  • nvd.nist.gov/vuln/detail/CVE-2026-48060

Code Behaviors & Features

Detect and mitigate CVE-2026-48060 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.22.0

Fixed versions

  • 2.22.0

Solution

Upgrade to version 2.22.0 or above.

Impact 8.1 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

pypi/litestar/CVE-2026-48060.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 23 Jun 2026 12:24:13 +0000.