{"id":"CVE-2026-46628","published":"2026-07-14T21:19:54Z","modified":"2026-07-15T12:49:21Z","title":"Twig: The `spaceless` filter implicitly marks its output as safe","vendor":"twigphp","product":"Twig","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.1,"severity":"MEDIUM","version":"4.0","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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00295,"percentile":0.22672,"provenance":"source"},"cwes":[{"id":"CWE-116","name":"Improper Encoding or Escaping of Output"}],"references":[{"url":"https://github.com/twigphp/Twig/security/advisories/GHSA-4j38-f5cw-54h7","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/twigphp/Twig/commit/3190b9ae12614dfd58cc5d8f394bac4708b17913","tags":["x_refsource_MISC"]},{"url":"https://github.com/twigphp/Twig/releases/tag/v3.26.0","tags":["x_refsource_MISC"]}],"priority":{"score":8.1,"factors":[{"name":"EPSS percentile","points":4.53},{"name":"CVSS severity","points":3.57}]},"vendorSlug":"twigphp","affectedVersions":[{"vendor":"twigphp","product":"Twig","versions":["< 3.26.0"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2026-07-15T12:49:16.947870Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Packagist","package":"twig/twig","vulnerableRanges":["<3.26.0"],"patched":["3.26.0"],"from":["GHSA-4j38-f5cw-54h7"],"provenance":"source"}],"summary":{"text":"The Twig template engine for PHP has a flaw in its deprecated spaceless filter, which is registered as safe for HTML, so autoescaping is bypassed when it processes untrusted input. An attacker with low privileges who can get a user to interact with a page can have attacker-controlled markup emitted unescaped over the network, with no effect on confidentiality, integrity or availability beyond the injected markup itself.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:13:14Z"},"euvd":{"id":"EUVD-2026-44566","exploited":false,"provenance":"source"}}