A plain-language summary of this CVE is being written; the description below is the NVD's own text.
Description
The sandbox allows every method of Twig\Markup objects, including their public constructor. A sandboxed template can therefore call __construct() on any Markup object that it reaches, and replace its content:
{% do banner.__construct('<script>alert(1)</script>', 'UTF-8') %}
A template gains nothing by rewriting its own output. The impact is on the Markup objects that come from the application and are also rendered elsewhere, like a global in a long-running worker. Their new content then ends up in trusted pages that aren't sandboxed.
The sandbox no longer allows calling the constructor of Markup objects.
Affected products
The NVD has not attached product data to this record yet; the description names what is affected.
Weakness type
References
- github.com /twigphp/Twig/commit/97b2e40b1165e6a42a197843f96ccb0a55f46f…
- github.com /twigphp/Twig/security/advisories/GHSA-r34x-hh9h-9q9c
- symfony.com /cve-2026-133770
Ingati scans your site every week and tells you when a CVE like this one affects something it found there.
Start scanning