CVE-2026-46629 Twig: Unbounded formatter memoisation in twig/intl-extra keyed on template-controlled arguments

Medium 5.3 Published Updated

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.

PackageAffectedFixed in
twig/intl-extra PackagistAll versions3.26.0
twig/intl-extra PackagistAll versions3.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.

Sources

Also known as DEBIAN-CVE-2026-46629, GHSA-35wc-cvqg-78fp, UBUNTU-CVE-2026-46629.

Is CVE-2026-46629 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free