craftcms/cms is vulnerable to Remote Code Execution (RCE)
82
High Risk
Craft CMS's group Twig filter accepts either a string property path or a PHP callable as its arrow argument. On the callable branch the filter invoked the callable directly without calling Twig's CoreExtension::checkArrow(), which is the check that requires a callable to be a Closure when the environment is sandboxed. A sandboxed template could therefore pass a non-Closure callable such as an arbitrary PHP function name to |group and have it invoked, escaping the sandbox and achieving remote code execution in a context meant to be restricted to a safe subset of Twig. The fix adds the checkArrow() call on the callable branch; the string branch was already safe because strings are always interpreted as nested field paths.
You are affected if you are using a version that falls within the vulnerable range and have Craft's Twig sandbox enabled via enableTwigSandbox or render sandboxed object templates that reach the |group filter with a callable argument.
craftcms/cms is vulnerable to Remote Code Execution (RCE) in versions 4.17.0 - 4.18.7 and 5.9.0 - 5.10.14.
Upgrade the craftcms/cms library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.