The vulnerability is a Groovy Sandbox Bypass in Crafter CMS, which allows authenticated developers to execute OS commands. The analysis of the commits between the vulnerable version and the patched version revealed that the patch consists of adding a whitelist for the Groovy sandbox. The key commit 8ee112618df79ab40c01d5e5f198ae4500cdcd8b introduces configuration properties (studio.scripting.sandbox.whitelist.path and crafter.engine.groovy.sandbox.whitelist.path) to specify the location of these whitelists.
By searching for the usage of these properties in the codebase, I identified the classes responsible for script execution and sandbox configuration. The org.craftercms.studio.impl.v1.service.script.ScriptingServiceImpl class in Crafter Studio uses the studio.scripting.sandbox.whitelist.path property, and its runScript method is the entry point for executing user-provided scripts. Similarly, the org.craftercms.engine.service.impl.GroovyScriptingServiceImpl class in Crafter Engine uses the crafter.engine.groovy.sandbox.whitelist.path property in its createSandbox method to configure the sandbox.
Before the patch, these services did not enforce a sufficiently restrictive whitelist, allowing malicious Groovy code to bypass the sandbox and achieve remote code execution. Therefore, the runScript and createSandbox methods are the primary vulnerable functions that would appear in a runtime profile during exploitation.