Skip to content
Fencer Vulns
medium 5.4

CVE-2026-46637 json

Twig: HTML-output filters in twig/* extras incorrectly declared `is_safe => ['all']`

published 2026-05-21 5 mo ago modified 2026-09-10 1 mo ago also GHSA-jv8m-2544-3pg3 , EUVD-2026-44509

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 23%
public exploits
0
none known

Summary

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.

Patch / fix

  • packagist twig/markdown-extra 3.26.0
  • packagist twig/cssinliner-extra 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-46637

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
partial
Assessed
3 mo ago

Exploit prediction

0.30% chance of exploitation in the next 30 days, higher than 23% of all scored CVEs (FIRST EPSS, 2026-11-08).

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/markdown-extra
<3.26.0
3.26.0
packagist twig/cssinliner-extra
<3.26.0
3.26.0

Affected products

  • twigphp Twig
  • twig cssinliner-extra
  • twig markdown-extra

Classification

Weakness
  • CWE-116 Improper Encoding or Escaping of Output
  • CWE-79 Improper Neutralization of Input During Web Page Generation

References

Sources

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.