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

- Severity: Medium 5.1 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.23%, higher than 14% of CVEs (2026-12-01)
- Published: 2026-05-21T21:27:20.000Z
- Modified: 2026-09-10T03:51:06.308Z
- Also known as: GHSA-jv8m-2544-3pg3
- Weaknesses: CWE-79, CWE-116
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- twigphp Twig: < 3.26.0
- twig cssinliner-extra: < 3.26.0
- twig markdown-extra: < 3.26.0
- twig/markdown-extra (Packagist): before 3.26.0
- twig/cssinliner-extra (Packagist): before 3.26.0
- symfony twig: before 3.26.0

## Every score

- GitHub_M: CVSS:4.0 5.1 Medium `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`
- GitHub: CVSS:4.0 Low `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:U`
- NVD: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://github.com/twigphp/Twig/security/advisories/GHSA-jv8m-2544-3pg3> (vendor-advisory, web)
- <https://github.com/twigphp/Twig/commit/84982072c79a7417b0d158a401d91344f3658299> (patch)
- <https://github.com/twigphp/Twig/commit/e36489d3521ecbfc08bdcc61294302557035f14a> (patch)
- <https://github.com/twigphp/Twig/releases/tag/v3.26.0> (release-notes)
- <https://github.com/FriendsOfPHP/security-advisories/blob/master/twig/cssinliner-extra/CVE-2026-46637.yaml> (web)
- <https://github.com/FriendsOfPHP/security-advisories/blob/master/twig/markdown-extra/CVE-2026-46637.yaml> (web)
- <https://github.com/twigphp/Twig> (package)
- <https://symfony.com/cve-2026-46637> (web)

## Sources

- CVE List: [CVE-2026-46637](https://www.cve.org/CVERecord?id=CVE-2026-46637), CVE Terms of Use, modified 2026-07-16
- GitHub Advisory Database: [GHSA-jv8m-2544-3pg3](https://github.com/advisories/GHSA-jv8m-2544-3pg3), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-46637](https://nvd.nist.gov/vuln/detail/CVE-2026-46637), Public domain, modified 2026-07-16

---

Page: https://cve.day/CVE-2026-46637 · Whole record: https://cve.day/CVE-2026-46637.json · Rebuilt by cve.day 2026-11-25T22:59:28.238Z
