CVE-2025-24374
MEDIUM 4.3CVSS 3.1Twig 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.
- Published
- 29 Jan 2025
- Last modified
- 17 Jun 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Deferred
- Weakness
- CWE-74
- Also known as
- GHSA-3xg3-cgvq-2xwr
- Sources
- NVDJSONOSV GHSA-3xg3-cgvq-2xwrJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 4.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 4.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | Packagist | twig/twig | >= 3.16.0, < 3.19.0 | 3.19.0 |
References
- https://github.com/twigphp/Twig/commit/38576b12f05df3cc871bf68f39ccb46b418334a3 · WEB
- 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/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
History
- 25 Nov 2026 20:57 UTC · NVD: first stored (published 29 Jan 2025)
- 25 Nov 2026 20:15 UTC · OSV: first stored (published 29 Jan 2025)