# CVE-2026-133770: Sandboxed templates can rewrite application-owned `Markup` objects through their constructor

- Severity: Low 2.1 (CVSS:4.0, scored by Symfony) `CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:P/VC:N/VI:L/VA:N/SC:L/SI:L/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.55%, higher than 47% of CVEs (2026-12-01)
- Published: 2026-11-24T13:07:53.166Z
- Modified: 2026-12-01T20:18:25.823Z
- Weaknesses: CWE-79, CWE-863
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Symfony

## 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.

(As written by CVE List.)

## Affected

- twig/twig: before 3.31.1

## References

- <https://symfony.com/cve-2026-133770> (vendor-advisory)
- <https://github.com/twigphp/Twig/security/advisories/GHSA-r34x-hh9h-9q9c> (vendor-advisory)
- <https://github.com/twigphp/Twig/commit/97b2e40b1165e6a42a197843f96ccb0a55f46f34> (patch)

## Sources

- CVE List: [CVE-2026-133770](https://www.cve.org/CVERecord?id=CVE-2026-133770), CVE Terms of Use, modified 2026-12-01
- NVD: [CVE-2026-133770](https://nvd.nist.gov/vuln/detail/CVE-2026-133770), Public domain, modified 2026-12-01

---

Page: https://cve.day/CVE-2026-133770 · Whole record: https://cve.day/CVE-2026-133770.json · Rebuilt by cve.day 2026-12-01T20:32:24.524Z
