medium CVSS 6.5

CVE-2026-46629·PHP vulnerability

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.

Severity
medium
Software
PHP
Fixed in
3.26.0
Published
2026-07-14

Affected versions

Until: 3.26.0

Fixed in: 3.26.0

How to fix this CVE

Update PHP and the Twig templating engine to version 3.26.0 or later to resolve memory exhaustion risks in the intl-extra extension. The vulnerability allows template authors to trigger excessive allocation of formatter objects that persist for the lifetime of the Twig environment, potentially leading to denial of service. Apply security patches through your distribution's package manager as soon as possible.

sudo dnf update php

Defensia detects this vulnerability

How to check if you are affected

  1. Step 1: Check the installed PHP version by running: php -v
  2. Step 2: Verify if Twig is installed and its version by running: composer show twig/twig or grep -r 'twig/twig' composer.lock
  3. Step 3: Search application logs for evidence of template injection or unusual locale/pattern filter arguments in Twig template rendering: grep -i 'intl\|locale\|pattern' /var/log/application.log
  4. Step 4: After patching, confirm PHP version is >= 5.x with Twig >= 3.26.0 by running: php -v && composer show twig/twig | grep Version

FAQ

What is CVE-2026-46629?

This vulnerability exists in Twig's intl-extra extension, where formatter objects (IntlDateFormatter and NumberFormatter) are cached using template-controlled parameters like locale and pattern as keys, enabling attackers to exhaust server memory by forcing creation of many formatter instances that remain allocated indefinitely.

Is CVE-2026-46629 being actively exploited?

No, this vulnerability is not listed on the CISA Known Exploited Vulnerabilities (KEV) catalog and no public exploits are currently available.

What versions of PHP are affected by CVE-2026-46629?

The vulnerability affects Twig versions prior to 3.26.0, regardless of the underlying PHP version. PHP 5.x through current versions running vulnerable Twig releases are at risk.

How do I check if my server is vulnerable to CVE-2026-46629?

Run `composer show twig/twig` to determine the installed Twig version; if it is below 3.26.0, your system is vulnerable. Additionally, check for intl-extra usage in your application's dependencies with `composer show twig/intl-extra`.

Does Defensia detect CVE-2026-46629?

Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If PHP and Twig are installed on a monitored server, CVE-2026-46629 will appear in your dashboard with remediation steps.

Related PHP CVEs

CVE-2026-28289CVSS 10FreeScout is a free help desk and shared inbox built with PHP's Laravel framework. A patch bypass vulnerability for CVE-2026-27636 in FreeScout 1.8.206 and earlier allows any authenticated user with file upload permissions to achieve Remote Code Execution (RCE) on the server by uploading a malicious .htaccess file using a zero-width space character prefix to bypass the security check. The vulnerability exists in the sanitizeUploadedFileName() function in app/Http/Helper.php. The function contains a Time-of-Check to Time-of-Use (TOCTOU) flaw where the dot-prefix check occurs before sanitization removes invisible characters. This vulnerability is fixed in 1.8.207.
CVE-2025-47916CVSS 10Invision Community 5.0.0 before 5.0.7 allows remote code execution via crafted template strings to themeeditor.php. The issue lies within the themeeditor controller (file: /applications/core/modules/front/system/themeeditor.php), where a protected method named customCss can be invoked by unauthenticated users. This method passes the value of the content parameter to the Theme::makeProcessFunction() method; hence it is evaluated by the template engine. Accordingly, this can be exploited by unauthenticated attackers to inject and execute arbitrary PHP code by providing crafted template strings.
CVE-2024-5932CVSS 10The GiveWP – Donation Plugin and Fundraising Platform plugin for WordPress is vulnerable to PHP Object Injection in all versions up to, and including, 3.14.1 via deserialization of untrusted input from the 'give_title' parameter. This makes it possible for unauthenticated attackers to inject a PHP Object. The additional presence of a POP chain allows attackers to execute code remotely, and to delete arbitrary files.
CVE-2025-25174CVSS 10Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion') vulnerability in beeteam368 BeeTeam368 Extensions beeteam368-extensions allows PHP Local File Inclusion.This issue affects BeeTeam368 Extensions: from n/a through <= 1.9.4.
CVE-2025-46348CVSS 10YesWiki is a wiki system written in PHP. Prior to version 4.5.4, the request to commence a site backup can be performed and downloaded without authentication. The archives are created with a predictable filename, so a malicious user could create and download an archive without being authenticated. This could result in a malicious attacker making numerous requests to create archives and fill up the file system, or by downloading the archive which contains sensitive site information. This issue has been patched in version 4.5.4.

References

Track CVEs across your fleet automatically

Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-46629. Free for 1 server.

Get started free