MEDIUM4.3
GHSA-3xg3-cgvq-2xwr
Twig security issue where escaping was missing when using null coalesce operator
Quick fix
GHSA-3xg3-cgvq-2xwr — twig/twig: upgrade to the fixed version with the command below.
composer require twig/twig:^3.19.0Details
When using the `??` operator, output escaping was missing for the expression on the left side of the operator.
Are you affected?
Enter the version of the package you're using.
Affected packages
References
- https://github.com/twigphp/Twig/security/advisories/GHSA-3xg3-cgvq-2xwr[WEB]
- https://nvd.nist.gov/vuln/detail/CVE-2025-24374[ADVISORY]
- https://github.com/twigphp/Twig/commit/38576b12f05df3cc871bf68f39ccb46b418334a3[WEB]
- https://github.com/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2025-24374.yaml[WEB]
- https://github.com/twigphp/Twig[PACKAGE]
- https://symfony.com/blog/twig-cve-2025-24374-missing-output-escaping-for-the-null-coalesce-operator[WEB]