Vulnerability · Published Jul 14, 2026 · Assigned by GitHub_M
CVE-2026-46637Twig: HTML-output filters in twig/* extras incorrectly declared `is_safe => ['all']`
Medium 5.1
In plain English
A medium-severity security flaw in cssinliner-extra from twig. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 23% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
Twig is a template language for PHP. Prior to 3.26.0, several filters in twig/markdown-extra and twig/cssinliner-extra are registered with is_safe => [all], causing Twig to treat plain text or HTML output as safe in HTML, JavaScript, CSS, URL, and other contexts where the output is not properly escaped. This issue is fixed in version 3.26.0.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | php-twig | 3.5.1-1+deb12u3 | DEBIAN-CVE-2026-46637 |
| Debian:13 | php-twig | 3.27.0-0+deb13u1 | DEBIAN-CVE-2026-46637 |
| Debian:14 | php-twig | 3.26.0-1 | DEBIAN-CVE-2026-46637 |
| Packagist | twig/cssinliner-extra | 3.26.0 | GHSA-jv8m-2544-3pg3 |
| Packagist | twig/markdown-extra | 3.26.0 | GHSA-jv8m-2544-3pg3 |
| Ubuntu:25.10 | php-twig | no fix listed | UBUNTU-CVE-2026-46637 |
| Ubuntu:26.10 | php-twig | no fix listed | UBUNTU-CVE-2026-46637 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| twigphp | Twig | < 3.26.0 |
| twig | cssinliner-extra | < 3.26.0 |
| twig | markdown-extra | < 3.26.0 |
Weakness: CWE-116 · Vector: 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
References
- https://github.com/twigphp/Twig/security/advisories/GHSA-jv8m-2544-3pg3 x_refsource_CONFIRM
- https://github.com/twigphp/Twig/commit/84982072c79a7417b0d158a401d91344f3658299 x_refsource_MISC
- https://github.com/twigphp/Twig/commit/e36489d3521ecbfc08bdcc61294302557035f14a x_refsource_MISC
- https://github.com/twigphp/Twig/releases/tag/v3.26.0 x_refsource_MISC