The vulnerability exists because the Custom MCPs feature, which is designed to execute OS commands, can be accessed by unauthenticated users. The analysis traced the execution flow from the public-facing API endpoint to the service-layer function responsible for the command execution.
- The JFrog security advisory provided a clear Proof of Concept (PoC), indicating that a POST request to the
/node-load-method/customMCP endpoint with a specific JSON payload can trigger the vulnerability.
- By inspecting the application's routing,
packages/server/src/routes/node-load-methods/index.ts was identified as the router handling this endpoint. It maps the request to the getSingleNodeAsyncOptions function in the nodes controller.
- The controller function, located in
packages/server/src/controllers/nodes/index.ts, was found to be a simple pass-through, taking the request parameters and body and calling the corresponding function in the nodes service.
- The service function,
getSingleNodeAsyncOptions in packages/server/src/services/nodes/index.ts, contains the root cause of the vulnerability. It dynamically resolves a method name (loadMethod from the request body) on a component node (nodeName from the URL) and executes it.
When an attacker sends the PoC payload, the getSingleNodeAsyncOptions service function calls the listActions method on the customMCP node component, passing it the attacker-controlled mcpServerConfig which contains the OS command to be executed. The lack of authentication checks before this dangerous operation allows for unauthenticated remote code execution.