CVE-2026-48060
Received Received - Intake

HTML Injection in Litestar via CSRF Cookie

Vulnerability report for CVE-2026-48060, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-07-28

Last updated on: 2026-07-28

Assigner: GitHub, Inc.

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-07-28
Last Modified
2026-07-28
Generated
2026-07-29
AI Q&A
2026-07-28
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 3 associated CPEs
Vendor Product Version / Range
litestar litestar to 2.20.0 (exc)
litestar-org litestar to 2.20.0 (exc)
litestar-org litestar to 2.21.0 (inc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-79 The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability affects the Litestar web framework versions up to 2.21.0. It involves HTML injection through a CSRF token when using template engines with CSRF protection enabled. The CSRF cookie content is not properly escaped by the template engine, allowing attackers to inject arbitrary HTML or JavaScript into web pages.

Detection Guidance

Check if your Litestar version is below 2.20.0 by running: pip show litestar or grep -r "litestar" requirements.txt. Inspect templates for CSRF token usage in hidden form fields. Monitor for unusual HTML/JavaScript injection in responses.

Impact Analysis

An attacker can set a malicious CSRF token cookie, which is then rendered unsafely in the victim's browser when the page loads. This can lead to Cross-Site Scripting (XSS) attacks, enabling theft of session tokens, form data skimming, or phishing attacks.

Compliance Impact

This vulnerability could impact compliance with GDPR and HIPAA by enabling Cross-Site Scripting (XSS) attacks. XSS may lead to unauthorized access to sensitive data, violating GDPR's data protection principles or HIPAA's confidentiality requirements. Attackers could steal session tokens, form data, or other protected information.

Mitigation Strategies

Upgrade Litestar to version 2.20.0 or later immediately. Disable CSRF protection if not required. Review template configurations to ensure proper escaping of CSRF tokens.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-48060. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart