PT-2026-47218
CVE-2026-48805
·
Published
2026-05-27
·
Updated
2026-11-02
Description by
CVSS 3.1
9.1
CriticalMetricsAV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Name of the Vulnerable Software and Affected Versions
Twig versions prior to 3.26.0
Description
Deprecated internal wrappers in
src/Resources/core.php for legacy third-party code fail to correctly handle sandbox state. Specifically, the functions twig array some() and twig array every() call CoreExtension::arraySome() and CoreExtension::arrayEvery() without forwarding the sandbox state. Because the underlying methods default the isSandboxed variable to false, the restriction requiring callables to be closures is bypassed in sandbox mode, allowing string callables like 'strcmp' to be accepted. Additionally, twig check arrow in sandbox() passes an Environment object to CoreExtension::checkArrow() instead of the expected boolean, resulting in a TypeError on PHP 8+.Recommendations
Update to version 3.26.0 or later.
As a temporary workaround, avoid using the deprecated
twig array some(), twig array every(), and twig check arrow in sandbox() helper functions when using a sandboxed environment. Found an issue in the description? Have something to add? Feel free to write us 👾