# CVE-2026-46627: Twig: Sandbox resource exhaustion via unbounded `for` / `range()`

- Severity: High 7.1 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/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.39%, higher than 34% of CVEs (2026-12-01)
- Published: 2026-07-14T21:15:17.366Z
- Modified: 2026-10-24T22:10:00.210Z
- Weaknesses: CWE-400
- 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, the Twig sandbox does not prevent a template from consuming CPU, memory, or wall-clock time, even under the strictest allow-list, allowing untrusted templates to cause resource exhaustion. This issue is addressed in version 3.26.0 by documenting that the sandbox does not protect against resource exhaustion.

(As written by CVE List.)

## Affected

- twigphp Twig: < 3.26.0
- symfony twig: before 3.26.0

## Every score

- GitHub_M: CVSS:4.0 7.1 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N`
- NVD: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://github.com/twigphp/Twig/security/advisories/GHSA-923g-j88x-j34q> (vendor-advisory)
- <https://github.com/twigphp/Twig/commit/6bfa285e2f98651adb7aa480bf83a741d154f09f> (patch)
- <https://github.com/twigphp/Twig/releases/tag/v3.26.0> (release-notes)

## Sources

- CVE List: [CVE-2026-46627](https://www.cve.org/CVERecord?id=CVE-2026-46627), CVE Terms of Use, modified 2026-07-16
- NVD: [CVE-2026-46627](https://nvd.nist.gov/vuln/detail/CVE-2026-46627), Public domain, modified 2026-10-24

---

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