CVE-2026-46629: twig/intl-extra Unbounded Formatter Memoisation Vulnerability
LOWCVE-2026-46629 is a LOW unbounded formatter memoisation vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting twig/intl-extra libraries in the Packagist ecosystem. The issue involves unbounded formatter memoisation in keyed on template-controlled arguments. Remediation is available by upgrading affected packages to version 3.26.0.
CVE-2026-46629 at a Glance
How to Fix CVE-2026-46629
To remediate this vulnerability, upgrade all affected twig/intl-extra dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade twig/intl-extra to 3.26.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for twig/intl-extra
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-46629, inspect your project dependencies for twig/intl-extra:
inspect dependencies for twig/intl-extra
Analyze the terminal output to locate any version of twig/intl-extra in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.26.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. In twig/intl-extra, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-46629 Affected twig/intl-extra Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
twig/intl-extra
|
Packagist |
< 3.26.0
|
3.26.0
|
References
Frequently Asked Questions
What is CVE-2026-46629?
Which twig/intl-extra versions are affected?
What version fixes CVE-2026-46629?
Is twig/intl-extra affected?
What CWE is associated with CVE-2026-46629?
How can I check Packagist dependencies for CVE-2026-46629?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-35wc-cvqg-78fp",
"modified" : "2026-05-21T21:23:53Z",
"published" : "2026-05-21T21:23:53Z",
"aliases" : [ "CVE-2026-46629" ],
"summary" : "twig/intl-extra: Unbounded formatter memoisation in keyed on template-controlled arguments",
"details" : "### Description\n\n`IntlExtension` memoises every `\\IntlDateFormatter` and `\\NumberFormatter` it creates in instance-level arrays keyed on a hash that includes `locale`, `pattern`, `attrs` and other values that are ordinary named arguments of the `format_datetime` / `format_date` / `format_time` / `format_number` / `format_currency` filters. There is no size limit and no eviction.\n\nA template that iterates over many distinct `pattern` (or `locale`, or `grouping_used`, ...) values therefore allocates one ICU formatter object per distinct value and pins it for the entire lifetime of the `Twig\\Environment`. Because ICU allocates its backing buffers outside the Zend memory manager, this growth is not bounded by `memory_limit`. On long-running runtimes (RoadRunner, Swoole, FrankenPHP worker mode, ReactPHP) where the `Environment` outlives a single request, the cache also accumulates across requests.\n\n### Resolution\n\nThe formatter caches are now bounded in size (100 entries each) and evict on a FIFO basis.\n\n### Credits\n\nTwig would like to thank Claude Mythos Preview (via Project Glasswing) for reporting the issue and providing the fix.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "twig/intl-extra"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.26.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/twigphp/Twig/security/advisories/GHSA-35wc-cvqg-78fp"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/twig/intl-extra/CVE-2026-46629.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/twigphp/Twig"
}, {
"type" : "WEB",
"url" : "https://symfony.com/cve-2026-46629"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-770" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-21T21:23:53Z",
"nvd_published_at" : null
}
}