CVE-2025-24374
Twig fixes a security issue where escaping was missing when using null coalesce operator (??)
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- None
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
4.3
Twig fixes a security issue where escaping was missing when using null coalesce operator (??)
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.
- Record
CVE-2025-24374- CVSS 3.1
- 4.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N - Weakness
- CWE-74
- Updated
- 2026-11-02
EUVDEUVD-2025-0128
4.3
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.
- Record
EUVD-2025-0128- CVSS 3.1
- 4.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-3xg3-cgvq-2xwr
4.3
Twig security issue where escaping was missing when using null coalesce operator
When using the ?? operator, output escaping was missing for the expression on the left side of the operator.
- Record
GHSA-3xg3-cgvq-2xwr- CVSS 3.1
- 4.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N - Weakness
- CWE-74
- Updated
- 2026-11-02
NVD
4.3
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.
- Record
CVE-2025-24374- CVSS 3.1
- 4.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N - Weakness
- CWE-74
- Updated
- 2026-11-02
OSV
4.3
Twig fixes a security issue where escaping was missing when using null coalesce operator (??)
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.
- Record
CVE-2025-24374- CVSS 3.1
- 4.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N - Weakness
- CWE-74
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2025-24374
4.3
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.
- Record
DEBIAN-CVE-2025-24374- CVSS 3.1
- 4.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N - Updated
- 2026-11-02
OSVGHSA-3xg3-cgvq-2xwr
4.3
Twig security issue where escaping was missing when using null coalesce operator
When using the ?? operator, output escaping was missing for the expression on the left side of the operator.
- Record
GHSA-3xg3-cgvq-2xwr- CVSS 3.1
- 4.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N - Weakness
- CWE-74
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2025-24374
4.3
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.
- Record
UBUNTU-CVE-2025-24374- CVSS 3.1
- 4.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
twig/twigPackagist |
3.16.0 up to 3.19.0 | 3.19.0 |
php-twigDebian:12 |
All versions, plus listed versions 3.10.1-13.10.3-13.11.0-13.13.0-13.14.0-1 Show 45 moreShow less3.14.0-23.14.0-33.14.0-43.14.2-13.14.2-23.14.2-33.15.0-13.15.0-23.17.1-13.17.1-23.18.0-13.18.0-23.18.0-43.18.0-53.18.0-63.18.0-73.19.0-13.19.0-1~bootstrap3.20.0-13.20.0-1~bootstrap3.20.0-23.21.1-13.21.1-23.21.1-33.22.0-13.22.0-23.22.1-13.22.1-23.22.1-33.22.2-13.22.2-23.23.0-13.23.0-23.24.0-13.26.0-13.27.0-13.27.1-13.28.0-13.5.1-13.5.1-1+deb12u13.5.1-1+deb12u23.5.1-1+deb12u33.6.0-13.6.1-13.7.0-1 |
None known |
php-twigDebian:13 |
before 3.19.0-1~bootstrap | 3.19.0-1~bootstrap |
php-twigDebian:14 |
before 3.19.0-1~bootstrap | 3.19.0-1~bootstrap |
twig/twigPackagist |
3.16.0 up to 3.19.0, plus listed versions v3.16.0v3.17.0v3.17.1v3.18.0 |
3.19.0 |
twigUbuntu:Pro:16.04:LTS |
All versions, plus listed versions 1.20.0-11.23.1-1ubuntu11.23.1-1ubuntu41.23.1-1ubuntu4+esm1 |
None known |
twigUbuntu:Pro:18.04:LTS |
All versions, plus listed versions 1.24.0-2ubuntu12.4.4-2ubuntu12.4.6-12.4.6-1ubuntu0.1~esm1 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases, published | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2025-24374 is a medium vulnerability (CVSS 4.3) in Twigphp Twig, published January 29, 2025. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.30%, the 22nd percentile. Fixed in twig/twig 3.19.0.
References
github.com/twigphp/Twig/security/advisories/GHSA-3xg3-cgvq-2xwr
github.com/twigphp/Twig/commit/38576b12f05df3cc871bf68f39ccb46b418334a3
nvd.nist.gov/vuln/detail/CVE-2025-24374
github.com/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2025-24374.yaml
symfony.com/blog/twig-cve-2025-24374-missing-output-escaping-for-the-null-coalesce-operator
github.com/advisories/GHSA-3xg3-cgvq-2xwr
Left out here: 9 versions. The JSON record has them.