Resource exhaustion in Twig - CVE-2026-46627
Published: May 20, 2026
Vulnerability identifier: #VU131992
CSH Severity: Medium
CVSS v4: 8.7 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2026-46627
CWE-ID: CWE-400
Exploitation vector: Remote access
Exploit availability:
No public exploit available
Vulnerability details
The vulnerability allows a remote attacker to cause a denial of service.
The vulnerability exists due to uncontrolled resource consumption in the Twig sandbox when rendering untrusted templates. A remote attacker can submit a crafted template to cause a denial of service.
The issue occurs even under a strict sandbox allow-list.
Affected software
Twig
How to mitigate CVE-2026-46627
Install security update from vendor's website.
Twig - update to 3.26.0