Cross-site scripting in Twig - CVE-2025-24374

 

Cross-site scripting in Twig - CVE-2025-24374

Published: January 29, 2025 / Updated: May 20, 2026


Vulnerability identifier: #VU131989
CSH Severity: Medium
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:U/U:Green
CVE-ID: CVE-2025-24374
CWE-ID: CWE-79
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vendor: Symfony
Affected software:
Twig

Detailed vulnerability description

The vulnerability allows a remote attacker to modify rendered output.

The vulnerability exists due to improper output neutralization in the null coalesce operator handling when rendering templates that use the ?? operator. A remote attacker can supply a crafted left-side expression value to modify rendered output.

User interaction is required to process the crafted content.


How to mitigate CVE-2025-24374

Install security update from vendor's website.

Sources