CVE-2026-133767
Published:November 24, 2026
Updated:November 26, 2026
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.
Affected Packages
https://github.com/twigphp/Twig.git (GITHUB):
Affected version(s) >=v1.8.0 <v3.31.1 || >=v2.0.0 <v3.31.1 || >=v3.0.0-BETA1 <v3.31.1Fix Suggestion:
Update to version v3.31.1https://github.com/twigphp/Twig.git (GITHUB):
Affected version(s) =v4.0.0-alpha1 <v4.0.0-beta1Fix Suggestion:
Update to version v4.0.0-beta1twig/twig (PHP):
Affected version(s) =v4.0.0-alpha1 <v4.0.0-beta1Fix Suggestion:
Update to version v4.0.0-beta1twig/twig (PHP):
Affected version(s) >=v3.0.0-BETA1 <v3.31.1 || >=v1.8.0 <v3.31.1 || >=v2.0.0 <v3.31.1Fix Suggestion:
Update to version v3.31.1Related Resources (7)
Do you need more information?
Contact UsCVSS v4
Base Score:
5.3
Attack Vector
NETWORK
Attack Complexity
LOW
Attack Requirements
NONE
Privileges Required
LOW
User Interaction
NONE
Vulnerable System Confidentiality
LOW
Vulnerable System Integrity
LOW
Vulnerable System Availability
NONE
Subsequent System Confidentiality
NONE
Subsequent System Integrity
NONE
Subsequent System Availability
NONE
CVSS v3
Base Score:
5.4
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
LOW
Integrity
LOW
Availability
NONE
EPSS
Base Score:
0.53