CVE-2026-133763: Sandbox `__toString()` policy bypass via the `is true` test

Published Nov 24, 2026
·
Updated

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.

Affected Software

1 affected component
composer/twig/twig

Event History

Nov 24, 2026
CVE Published
via MITRE·01:07 PM
Data Sourced
via MITRE·01:07 PM
DescriptionWeakness
Data Sourced
via OSV·01:07 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·01:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

When is a sandboxed template exposed to this issue?

Exposure requires a sandboxed template to evaluate an object with the `is true` test and then cause that test result to be converted to a string, such as by printing it, concatenating it, or passing it to a filter. The object's `toString()` method must be denied by the sandbox policy for the bypass to matter.

2

Does this require any template tags to be permitted by the sandbox?

No. The issue can be triggered without any tag being allowed.

3

Are boolean conditions using this test affected?

No. A use in a boolean context, such as `{% if obj is true %}`, does not convert the object to a string and is not affected.

4

How can I identify potentially affected templates?

Review sandboxed templates for `is true` applied to objects where the result is printed, concatenated, or supplied to a filter. Uses limited to boolean control-flow contexts are not affected.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203