Vulnerability 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.
Related Weaknesses (CWE)
References
- https://github.com/twigphp/Twig/commit/97b2e40b1165e6a42a197843f96ccb0a55f46f34
- https://github.com/twigphp/Twig/security/advisories/GHSA-r34x-hh9h-9q9c
- https://symfony.com/cve-2026-133770
FAQ
What is CVE-2026-133770?
CVE-2026-133770 is a documented vulnerability. 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 ...
How severe is CVE-2026-133770?
CVSS scoring is not yet available for CVE-2026-133770. Check NVD for updates.
Is there a patch for CVE-2026-133770?
Check the references section above for vendor advisories and patch information. Review vendor security bulletins for remediation guidance.