๐Ÿ” CVE Alert

CVE-2026-133770

UNKNOWN 0.0

Sandboxed templates can rewrite application-owned `Markup` objects through their constructor

CVSS Score
0.0
EPSS Score
0.0%
EPSS Percentile
0th

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.

CWE CWE-79 CWE-863
Vendor twig
Product twig/twig
Published Nov 24, 2026
Stay Ahead of the Next One

Get instant alerts for twig twig/twig

Be the first to know when new unknown vulnerabilities affecting twig twig/twig are published โ€” delivered to Slack, Telegram or Discord.

Get Free Alerts โ†’ Free ยท No credit card ยท 60 sec setup

Affected Versions

Twig / twig/twig
0 < 3.31.1

References

NVD โ†— CVE.org โ†— EPSS Data โ†—
symfony.com: https://symfony.com/cve-2026-133770 github.com: https://github.com/twigphp/Twig/security/advisories/GHSA-r34x-hh9h-9q9c github.com: https://github.com/twigphp/Twig/commit/97b2e40b1165e6a42a197843f96ccb0a55f46f34

Credits

Fabien Potencier