CVE-2026-133767

NameCVE-2026-133767
DescriptionWhen 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.
SourceCVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
php-twig (PTS)bookworm, bookworm (security)3.5.1-1+deb12u3vulnerable
trixie (security), trixie3.27.0-0+deb13u1vulnerable
forky3.30.0-1vulnerable
sid3.31.1-1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
php-twigsource(unstable)3.31.1-1

Notes

https://symfony.com/blog/cve-2026-133767-sandbox-allow-list-and-tostring-bypass-via-a-dynamic-embed-parent-expression
https://github.com/twigphp/Twig/security/advisories/GHSA-fmp9-6wxr-cfmq
https://github.com/twigphp/Twig/commit/fe395ad247b8e6c6f34f39bc211119ecb11f80b3 (v3.31.1)

Search for package or bug name: Reporting problems