# CVE-2026-133767: Sandbox allow-list and `__toString()` bypass via a dynamic `embed` parent expression

- Severity: Medium 5.3 (CVSS:4.0, scored by Symfony) `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/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.53%, higher than 46% of CVEs (2026-12-01)
- Published: 2026-11-24T13:07:50.411Z
- Modified: 2026-12-01T17:17:29.987Z
- Weaknesses: CWE-693, CWE-863
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Symfony

## Description

When the parent of an embed tag was an expression other than a string or a variable, the sandbox didn't see that expression. The functions, filters and tests of the expression weren't checked against the policy, and neither were its conversions to strings. A sandboxed template allowed to use embed could therefore call any function, filter or test, and any __toString() method:

{% embed 'leak_' ~ app_secret() %}{% endembed %}

Method calls and property reads were not affected, since they're checked at runtime.

The sandbox now checks the parent expression of embed like any other expression of the template.

(As written by CVE List.)

## Affected

- twig/twig: before 3.31.1

## References

- <https://symfony.com/cve-2026-133767> (vendor-advisory)
- <https://github.com/twigphp/Twig/security/advisories/GHSA-fmp9-6wxr-cfmq> (vendor-advisory)
- <https://github.com/twigphp/Twig/commit/fe395ad247b8e6c6f34f39bc211119ecb11f80b3> (patch)

## Sources

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

---

Page: https://cve.day/CVE-2026-133767 · Whole record: https://cve.day/CVE-2026-133767.json · Rebuilt by cve.day 2026-12-01T17:32:13.001Z
