CVE-2026-46638 PUBLISHED

Twig: `{% sandbox %}{% include %}` skips checkSecurity() on cached templates (incomplete fix for CVE-2024-45411)

Assigner: GitHub_M
Reserved: 15.05.2026 Published: 14.07.2026 Updated: 15.07.2026

Twig is a template language for PHP. Prior to 3.26.0, {% sandbox %}{% include %} can include a template that was previously loaded outside the sandbox without re-invoking checkSecurity(), allowing the cached template to use tags, filters, and functions that should have been denied by SecurityPolicy::checkSecurity(). This issue is fixed in version 3.26.0.

Metrics

CVSS Vector: CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N
CVSS Score: 6

Product Status

Vendor twigphp
Product Twig
Versions
  • Version < 3.26.0 is affected

References

Problem Types

  • CWE-693: Protection Mechanism Failure CWE