CVE-2026-46638

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

State
Published
Severity
6.0 Medium
Published
Jul 14, 2026
Updated
Jul 15, 2026
Reserved
May 15, 2026

Read the record on cve.org

Description

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.

Scores

CVSSScoreVectorSource
4.06.0 MediumCVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:NGitHub_M

Weaknesses

  • CWE-693 Protection Mechanism Failure

Affected Products

ProductVersions
Twigtwigphp
  • < 3.26.0Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.