CVE-2026-46629: CWE-770: Allocation of Resources Without Limits or Throttling in twigphp Twig
Twig prior to version 3.26.0 contains a vulnerability where IntlDateFormatter and NumberFormatter instances are memoized without limits based on template-controlled arguments. This can lead to excessive resource allocation that persists for the lifetime of the Twig environment. The issue is fixed in version 3.26.0.
AI Analysis
Technical Summary
Twig, a PHP template language, prior to version 3.26.0, memoizes ICU formatter objects (IntlDateFormatter and NumberFormatter) in arrays keyed by template-controlled filter arguments such as locale, pattern, and attributes. This allows a template to allocate many formatter instances that remain in memory for the lifetime of the Twig\Environment, constituting an allocation of resources without limits or throttling (CWE-770). This can lead to resource exhaustion. The vulnerability is addressed in Twig version 3.26.0.
Potential Impact
An attacker controlling template input can cause Twig to allocate many ICU formatter objects that remain pinned in memory for the lifetime of the environment, potentially leading to resource exhaustion and degraded service availability. The CVSS 4.0 score is 5.3 (medium severity), indicating a moderate impact with network attack vector and low privileges required.
Mitigation Recommendations
This vulnerability is fixed in Twig version 3.26.0. Users should upgrade to version 3.26.0 or later to remediate this issue. No other official remediation or temporary fix is indicated. Patch status is not explicitly confirmed in the advisory, but the fix version is clearly stated.
CVE-2026-46629: CWE-770: Allocation of Resources Without Limits or Throttling in twigphp Twig
Description
Twig prior to version 3.26.0 contains a vulnerability where IntlDateFormatter and NumberFormatter instances are memoized without limits based on template-controlled arguments. This can lead to excessive resource allocation that persists for the lifetime of the Twig environment. The issue is fixed in version 3.26.0.
CVSS v4.0
Score 5.3medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Twig, a PHP template language, prior to version 3.26.0, memoizes ICU formatter objects (IntlDateFormatter and NumberFormatter) in arrays keyed by template-controlled filter arguments such as locale, pattern, and attributes. This allows a template to allocate many formatter instances that remain in memory for the lifetime of the Twig\Environment, constituting an allocation of resources without limits or throttling (CWE-770). This can lead to resource exhaustion. The vulnerability is addressed in Twig version 3.26.0.
Potential Impact
An attacker controlling template input can cause Twig to allocate many ICU formatter objects that remain pinned in memory for the lifetime of the environment, potentially leading to resource exhaustion and degraded service availability. The CVSS 4.0 score is 5.3 (medium severity), indicating a moderate impact with network attack vector and low privileges required.
Mitigation Recommendations
This vulnerability is fixed in Twig version 3.26.0. Users should upgrade to version 3.26.0 or later to remediate this issue. No other official remediation or temporary fix is indicated. Patch status is not explicitly confirmed in the advisory, but the fix version is clearly stated.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-05-15T19:34:14.013Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a56aea068715ace4342b0d6
Added to database: 07/14/2026, 21:48:16 UTC
Last enriched: 07/14/2026, 22:24:25 UTC
Last updated: 07/14/2026, 22:47:30 UTC
Views: 2
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.