twigphp/twig · Security
Twig security issue where escaping was missing when using null coalesce operator
- GHSA ID
- GHSA-3xg3-cgvq-2xwr
- CVE ID
- CVE-2025-24374
- Severity
- medium
- Published
- Updated
- CVSS
- 4.3 · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
- CVSS v3
- 4.3 · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
Description
When using the ?? operator, output escaping was missing for the expression on the left side of the operator.
CWEs
- CWE-74 · Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
References
- https://github.com/twigphp/Twig/security/advisories/GHSA-3xg3-cgvq-2xwr ↗
- https://nvd.nist.gov/vuln/detail/CVE-2025-24374 ↗
- https://github.com/twigphp/Twig/commit/38576b12f05df3cc871bf68f39ccb46b418334a3 ↗
- https://github.com/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2025-24374.yaml ↗
- https://symfony.com/blog/twig-cve-2025-24374-missing-output-escaping-for-the-null-coalesce-operator ↗
- https://github.com/advisories/GHSA-3xg3-cgvq-2xwr ↗