{"id":"GHSA-35wc-cvqg-78fp","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.","aliases":["CVE-2026-46629"],"modified":"2026-09-10T03:51:04.305805496Z","published":"2026-05-21T21:23:53Z","database_specific":{"cwe_ids":["CWE-770"],"severity":"LOW","github_reviewed":true,"github_reviewed_at":"2026-05-21T21:23:53Z","nvd_published_at":null},"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"}],"affected":[{"package":{"name":"twig/intl-extra","ecosystem":"Packagist","purl":"pkg:composer/twig/intl-extra"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.26.0"}]}],"versions":["v2.12.0","v2.12.1","v2.12.2","v2.12.3","v2.12.4","v2.12.5","v2.13.0","v2.13.1","v2.14.0","v2.14.1","v2.14.2","v2.14.3","v2.14.7","v2.14.8","v2.14.9","v2.15.0","v2.15.2","v2.15.4","v2.15.5","v2.15.6","v2.16.0","v3.0.0","v3.0.0-BETA1","v3.0.1","v3.0.2","v3.0.3","v3.0.4","v3.0.5","v3.1.0","v3.1.1","v3.10.0","v3.11.0","v3.12.0","v3.13.0","v3.15.0","v3.16.0","v3.17.0","v3.18.0","v3.19.0","v3.2.1","v3.20.0","v3.21.0","v3.22.0","v3.22.1","v3.23.0","v3.24.0","v3.3.0","v3.3.3","v3.3.4","v3.3.5","v3.4.0","v3.4.2","v3.5.0","v3.5.1","v3.6.0","v3.7.0","v3.7.1","v3.8.0","v3.9.0","v3.9.2"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-35wc-cvqg-78fp/GHSA-35wc-cvqg-78fp.json"}}],"schema_version":"1.9.0","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"}]}