The vulnerability is a Remote Code Execution (RCE) in Yamcs, identified as GHSA-vmwp-vh32-rj75. The root cause is the use of the Nashorn ScriptEngine to evaluate user-provided algorithm text without proper sandboxing. Specifically, the ScriptEngine is instantiated without a ClassFilter, which allows a malicious script to access any Java class and execute arbitrary code on the server.
The exploitation path begins when a user with the ChangeMissionDatabase privilege (or an unauthenticated user in the default configuration) sends a PATCH request to the /api/mdb-overrides/{instance}/{processor}/algorithms/{algorithm} endpoint. This request is handled by the org.yamcs.http.api.MdbOverrideApi.updateAlgorithm function.
This function then calls org.yamcs.algorithms.AlgorithmManager.overrideAlgorithm, which in turn uses org.yamcs.algorithms.ScriptAlgorithmExecutorFactory.makeExecutor to create an executor for the new algorithm script. It is within makeExecutor that the unsandboxed ScriptEngine is created and the user-provided script is executed via eval(), resulting in RCE.
The patch for this vulnerability does not fix the underlying issue of the missing ClassFilter. Instead, it introduces a configuration option, overrideAlgorithmsEnabled, which is set to false by default, effectively disabling the vulnerable feature and preventing the execution of user-provided algorithm scripts.