Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. twig/intl-extra
  4. ›
  5. CVE-2026-46629

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

May 21, 2026

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.

A 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.

References

  • github.com/FriendsOfPHP/security-advisories/blob/master/twig/intl-extra/CVE-2026-46629.yaml
  • github.com/advisories/GHSA-35wc-cvqg-78fp
  • github.com/twigphp/Twig/security/advisories/GHSA-35wc-cvqg-78fp
  • nvd.nist.gov/vuln/detail/CVE-2026-46629
  • symfony.com/cve-2026-46629

Code Behaviors & Features

Detect and mitigate CVE-2026-46629 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 3.26.0

Fixed versions

  • 3.26.0

Solution

Upgrade to version 3.26.0 or above.

Impact 5.3 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Learn more about CVSS

Weakness

  • CWE-770: Allocation of Resources Without Limits or Throttling

Source file

packagist/twig/intl-extra/CVE-2026-46629.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Fri, 22 May 2026 12:20:37 +0000.