CVE-2026-133763
Description
The sandbox checks that a template may call toString() on an object before converting it to a string. For an object, the is true test evaluates to the object itself, and that result wasn't checked. A sandboxed template could therefore print an object through a denied toString() method: {{ obj is true }} The same applies when the result is concatenated or passed to a filter. No tag needs to be allowed. A test in a boolean context, like {% if obj is true %}, isn't affected, since it doesn't convert the object to a string. The sandbox now checks the result of tests like the result of filters and functions.
Predictions
Heuristic predictions, AS-IS, for prioritization only.
Mitigations
No mitigations published for this CVE yet.
The vendor-content worker queues fetches as references arrive (check back in a few minutes). Or — if you've already worked around this in production — publish your fix to the community-verified tier.
Propose a mitigation on Community Mitigations published via the community go through AI scoring + 2 human reviewers + 7-day silent objection window before landing here withsource_tier=community-verified.
OS impact
Debian Mixed 4 releases
| Version | Package | Status | Fixed in |
|---|---|---|---|
| trixie | php-twig |
Affected | — |
| sid | php-twig |
Fixed | 3.31.1-1 |
| forky | php-twig |
Fixed | 3.31.1-1 |
| bookworm | php-twig |
Affected | — |
Package impact
| Ecosystem | Package | Vulnerable | Fixed |
|---|---|---|---|
| Packagist | twig/twig | >=3.21.0,<3.31.1 | |
Application impact
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| twig | twig_twig | {"startIncluding":"3.21.0","endExcluding":"3.31.1"} | 3.31.1 |
References
CWEs
CWE-693 CWE-863
Community-verified mitigations for this CVE will appear above when contributors publish them.
Verify integrity in audit chain (admin only). AS-IS.