PT-2026-42690 · Twigphp+5 · Twig+2

CVE-2026-46638

·

Published

2026-05-21

·

Updated

2026-07-14

CVSS v3.1

8.1

High

VectorAV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
Name of the Vulnerable Software and Affected Versions Twig (affected versions not specified)
Description An issue exists where the {% sandbox %}{% include ... %}{% endsandbox %} tag path fails to re-invoke the checkSecurity() function. If a template is loaded outside a sandbox within the same Environment instance, its security check runs while isSandboxed() is false. Consequently, when that same template is later included within a sandbox, the allowlist for tags, filters, and functions enforced by SecurityPolicy::checkSecurity() is not applied. This allows an attacker who can author the included template to access all registered filters, functions, and tags in the environment, bypassing the sandbox policy.
Recommendations At the moment, there is no information about a newer version that contains a fix for this vulnerability.

Exploit

Protection Mechanism Failure

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

CVE-2026-46638
GHSA-7FXW-R6JV-74C8

Affected Products

Twig
Php-Twig
Twig/Twig