The vulnerability exists in the legacy, non-task-runner execution mode of the n8n Code node. When task runners are disabled, the Code node uses a vm2 sandbox to execute user-provided JavaScript code. The vulnerability is introduced because the sandbox is created with a context that includes an object named helpers. This helpers object contains internal n8n functions that can be abused by a malicious user to read and write arbitrary files on the host system, with the same privileges as the n8n process. The execute function in Code.node.ts is the entry point that, when not using a task runner, instantiates the vulnerable JavaScriptSandbox. The runCode, runCodeAllItems, and runCodeEachItem methods within JavaScriptSandbox are the functions that directly execute the user's code within this insecure sandbox. The patch for this vulnerability involves enabling task runners by default, which isolates the code execution in a separate process and removes access to the vulnerable helpers object.