CVE-2026-46629 Twig: Unbounded formatter memoisation in twig/intl-extra keyed on template-controlled arguments
Attackers can cause denial of service by forcing excessive memory allocation through unbounded memoization of formatter objects in Twig templates.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-46629?
CVE-2026-46629 is a medium-severity denial of service vulnerability in twigphp Twig, published on 14 Jul 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
Twig is a template language for PHP. Prior to 3.26.0, twig/intl-extra memoises IntlDateFormatter and NumberFormatter instances in arrays keyed by template-controlled filter arguments such as locale, pattern, and attrs, allowing a template to allocate many ICU formatter objects that remain pinned for the lifetime of the Twig\Environment. This issue is fixed in version 3.26.0.
Weakness: CWE-770
Which versions are affected by CVE-2026-46629?
2 open source packages ship an affected version, including twig/intl-extra. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
twig/intl-extra Packagist | All versions | 3.26.0 |
twig/intl-extra Packagist | All versions | 3.26.0 |
Products include Symfony Twig.
How do I fix CVE-2026-46629?
Upgrade twig/intl-extra to 3.26.0 or later.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2026-46629 being exploited?
There is no known exploitation of CVE-2026-46629 in the wild and no public exploit code.
Other vulnerabilities in twigphp Twig
- CVE-2018-13818 Code injection in n/a
- CVE-2026-46633 Twig: PHP code injection via `{% use %}` template name
- CVE-2026-46640 Twig: Arbitrary PHP code execution via `_self.(<string>)` macro-reference compilation
- CVE-2026-24425 Twig 2.16.x & 3.9.0-3.25.x Sandbox Bypass via SourcePolicyInterface
- CVE-2024-45411 Twig has a possible sandbox bypass
Sources
Also known as DEBIAN-CVE-2026-46629, GHSA-35wc-cvqg-78fp, UBUNTU-CVE-2026-46629.