The vulnerability is a Groovy sandbox bypass in Crafter Studio, which allows an authenticated developer to achieve Remote Code Execution (RCE). The root cause is an inadequate blacklist of dangerous Java and Groovy methods within the sandbox environment. An attacker can craft a Groovy script that calls these unrestricted methods to execute arbitrary OS commands or Java code.
The provided patch addresses the vulnerability by adding several dangerous methods and constructors to the sandbox's blacklist file, src/main/resources/crafter/studio/groovy/blacklist. The functions identified as vulnerable are the ones that were added to this blacklist, as their prior absence was what allowed the sandbox escape. These include methods for process creation (java.lang.ProcessBuilder), command execution (freemarker.template.utility.Execute), and dynamic code evaluation (jdk.jshell.JShell, groovy.util.Eval).
While the patch does not modify any Java code, the blacklist itself contains a reference to org.craftercms.studio.impl.v2.service.scripting.internal.ScriptingServiceInternalImpl, strongly suggesting this class is responsible for handling Groovy script execution and enforcing the sandbox rules. Therefore, the core of the vulnerability lies within a method in this class that executes scripts without properly sanitizing them against these dangerous calls.