CVE-2025-24374 json
Twig fixes a security issue where escaping was missing when using null coalesce operator (??)
published 2025-01-29 21 mo ago modified 2026-06-17 4 mo ago also EUVD-2025-0128 , GHSA-3xg3-cgvq-2xwr
- cvss
- 4.3
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.3%
- EPSS 0.3% chance of exploitation in 30 days, percentile 22%
- public exploits
- 0
- none known
Summary
Twig is a template language for PHP. When using the ?? operator, output escaping was missing for the expression on the left side of the operator. This vulnerability is fixed in 3.19.0.
Patch / fix
- packagist twig/twig 3.19.0
- symfony twig 3.19.0
- php-twig Debian 14, Debian 13 3.19.0-1~bootstrap
debian advisories DEBIAN-CVE-2025-24374
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2025-24374 updated cvss 4.3
php-twig: Twig fixes a security issue where escaping was missing when using null coalesce operator (??)
-
Red Hat All currently supported Red Hat productsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 21 mo ago
Exploit prediction
0.30% chance of exploitation in the next 30 days, higher than 22% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 4.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N |
| GitHub | 3.1 | 4.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| packagist | twig/twig | >=3.16.0, <3.19.0 |
3.19.0 |
Affected products
- twigphp Twig
Classification
- Weakness
-
- CWE-74 Improper Neutralization of Special Elements in Output Used by a Downstream Component
References
-
github.com
/twigphp/Twig/commit/38576b12f05df3cc871bf68f39ccb46b418334a3
web
-
github.com
/twigphp/Twig/security/advisories/GHSA-3xg3-cgvq-2xwr
web
-
nvd.nist.gov
/vuln/detail/CVE-2025-24374
advisory
-
github.com
/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2025-24374.yaml
web
-
github.com
/twigphp/Twig
package
-
symfony.com
/blog/twig-cve-2025-24374-missing-output-escaping-for-the-null-coalesce-operator
web
Sources
- CVE List CVE-2025-24374
- GitHub Advisory GHSA-3xg3-cgvq-2xwr
- NVD CVE-2025-24374
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.