Twigphp Twig
Twig: `{% sandbox %}{% include %}` skips checkSecurity() on cached templates (incomplete fix for CVE-2024-45411)
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.
First public PoC
None yetno public PoC found
Public PoCs00 on GitHub
CVSS8.1high · scored by NVD · CWE-693
CISA KEV
Not listednot known exploited
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
twigphp Twig
- < 3.26.0
Fixed in 3.26.0
Mitigation
Upgrade Twig to 3.26.0 or later.
References
- Vendor advisory github.com/twigphp/Twig/security/advisories/GH…
- Patch github.com/twigphp/Twig/commit/819c6a89fe0f261…
- Release notes github.com/twigphp/Twig/releases/tag/v3.26.0
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.