7.1high
Twig: Sandbox resource exhaustion via unbounded `for` / `range()`
- Severity
- 7.1high CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.39% (higher than 34% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- 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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| twigphp Twig | < 3.26.0 | CVE List |
| symfony twig | before 3.26.0 | NVD |
All scores
| GitHub_M | 7.1high CVSS:4.0 | 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 | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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.
NVD (es)
Twig es un lenguaje de plantillas para PHP. Antes de 3.26.0, el sandbox de Twig no impide que una plantilla consuma CPU, memoria o tiempo de reloj de pared, incluso bajo la lista de permitidos más estricta, permitiendo que plantillas no confiables causen agotamiento de recursos. Este problema se aborda en la versión 3.26.0 al documentar que el sandbox no protege contra el agotamiento de recursos.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-46627 changed 2026-07-16 | CVE Terms of Use |
| NVD | CVE-2026-46627 changed 2026-10-24 | Public domain |