CVE-2026-46627
published high CVSS 4.0 · 7.1Twig: Sandbox resource exhaustion via unbounded `for` / `range()`
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| twigphp | — | Twig< 3.26.0 | Affected | Not stated | GitHub_M |
| Debian | trixie | php-twig | Advisory build | 3.27.0-0+deb13u1 | DSA-6311-1 |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 7.1 / 10
- Severity
- high
- Provider
- GitHub_M · cna
- Vector string
- 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
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| twigphp | Twig | < 3.26.0 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-400 CWE-400: Uncontrolled Resource Consumption
References
3Provider assertions
2GitHub_M · cna
Twig: Sandbox resource exhaustion via unbounded `for` / `range()`
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 54e0283e03ac84ae5c417a354163365e9826b69ac89f8ebc3c721a4df565efcc
- Ingested
- 23 Sep 2026, 09:16:38 UTC
- Source record
- Official CVE record