CVE-2026-46628 json
Twig: The `spaceless` filter implicitly marks its output as safe
published 2026-05-21 5 mo ago modified 2026-10-24 15 d ago also GHSA-4j38-f5cw-54h7 , EUVD-2026-44566
- cvss
- 5.4
- version 3.1, NVD
- 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. Prior to 3.26.0, the deprecated spaceless filter is registered as safe for HTML, causing Twig autoescaping to emit attacker-controlled markup unescaped when spaceless is applied to untrusted input. This issue is fixed in version 3.26.0.
Patch / fix
- packagist twig/twig 3.26.0
- symfony twig 3.26.0
- php-twig Debian 12 3.5.1-1+deb12u3
- php-twig Debian 13 3.27.0-0+deb13u1
- php-twig Debian 14 3.26.0-1
debian advisories DEBIAN-CVE-2026-46628
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- partial
- Assessed
- 3 mo ago
Exploit prediction
0.29% chance of exploitation in the next 30 days, higher than 22% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/twigphp/Twig/security/advisories/GHSA-4j38-f5cw-54h7 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 4.0 | 5.1 | CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N |
| CNA | 4.0 | 5.1 | CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| NVD | 3.1 | 5.4 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| packagist | twig/twig | <3.26.0 |
3.26.0 |
Affected products
- twigphp Twig
Classification
- Weakness
-
- CWE-116 Improper Encoding or Escaping of Output
References
-
github.com
/twigphp/Twig/commit/3190b9ae12614dfd58cc5d8f394bac4708b17913
patch
-
github.com
/twigphp/Twig/security/advisories/GHSA-4j38-f5cw-54h7
exploit, web, vendor-advisory
-
github.com
/twigphp/Twig/releases/tag/v3.26.0
release-notes
-
github.com
/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2026-46628.yaml
web
-
github.com
/twigphp/Twig
package
-
symfony.com
/cve-2026-46628
web
Sources
- CVE List CVE-2026-46628
- GitHub Advisory GHSA-4j38-f5cw-54h7
- NVD CVE-2026-46628
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.