Twig fixes a security issue where escaping was missing when using null coalesce operator (??)
Priority LOW 20CWE-74Published · Updated
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- None · Low · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub.
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.
Why it matters now
Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00298 22nd percentileScored 2026-11-07
Fix Fixed Twig (twigphp): 3.19.0twig/twig (Packagist): 3.19.0
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| symfony | Twig | 3.16.0 to before 3.19.0 | 3.19.0 | Patch available | CNA |
| — | twig/twig (Packagist) | 3.16.0 to before 3.19.0 | 3.19.0 | Patch available | GHSA-3xg3-cgvq-2xwr |
- Twig Vendorsymfony Affected 3.16.0 to before 3.19.0 Fixed in 3.19.0 Patch available CNA
- twig/twig (Packagist) Vendor— Affected 3.16.0 to before 3.19.0 Fixed in 3.19.0 Patch available GHSA-3xg3-cgvq-2xwr
Remediation
- Fix · CNA Twig (twigphp) Fixed in 3.19.0
- Fix · GHSA-3xg3-cgvq-2xwr twig/twig (Packagist) Fixed in 3.19.0 Advisory →
Vendor assessments
Timeline
- 2026-10-02 Threatist record created from CVE-2025-24374
- 2026-10-03 Alias added: GHSA-3xg3-cgvq-2xwr
References
Other 5
- https://github.com/twigphp/Twig/security/advisories/GHSA-3xg3-cgvq-2xwr
- https://github.com/twigphp/Twig/commit/38576b12f05df3cc871bf68f39ccb46b418334a3
- https://github.com/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2025-24374.yaml
- https://github.com/twigphp/Twig
- https://symfony.com/blog/twig-cve-2025-24374-missing-output-escaping-for-the-null-coalesce-operator
More symfony vulnerabilities
- TI-2024-33775 Ability to change environment from query in symfony/runtime CVSS 3.1HIGH 7.3
- TI-2026-34283 Twig: The `spaceless` filter implicitly marks its output as safe CVSS 4.0MEDIUM 5.1
- TI-2022-07667 Code injection in Twig CVSS 3.1CRITICAL 9.8
- TI-2018-10028 Twig before 2.4.4 allows Server-Side Template Injection (SSTI) via the search search_key… CVSS 3.0CRITICAL 9.8
- TI-2026-35851 Incorrect authorization in symfony CVSS 4.0HIGH 8.7
- TI-2026-35264 Improper input validation in symfony CVSS 4.0HIGH 8.3
Sources
- CVE-2025-24374 · CVE Program
- CVE-2025-24374 · NVD
- FIRST EPSS
- GHSA-3xg3-cgvq-2xwr · GitHub Advisory Database · CC BY 4.0
- CVE-2025-24374 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences