GHSA-3xg3-cgvq-2xwrmedium4.3
Twig security issue where escaping was missing when using null coalesce operator
Impact
When using the ?? operator, output escaping was missing for the expression on the left side of the operator.
Source excerpt · OSVAffected packages
Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.
twig/twig Packagist
| Affected range | Recorded fix |
|---|---|
| From 3.16.0 before 3.19.0Ecosystem versions | 3.19.0 |
Version evidence: OSV · GHSA-3xg3-cgvq-2xwr
View original version evidence (4 explicit versions)
Original source description
When using the ?? operator, output escaping was missing for the expression on the left side of the operator.
References
- Security advisory github.com/twigphp/Twig/security/advisories/GHSA-3xg3-cgvq-2xwr
- Security advisory nvd.nist.gov/vuln/detail/CVE-2025-24374
- Patch github.com/twigphp/Twig/commit/38576b12f05df3cc871bf68f39ccb46b418334a3
- Security advisory github.com/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2025-24374.yaml
- Source reference github.com/twigphp/Twig
- Security advisory symfony.com/blog/twig-cve-2025-24374-missing-output-escaping-for-the-null-coalesce-operator