Skip to content
RCE Write-up Intermediate

Three CVEs in Activepieces: The Sandbox Was Real. The Code Just Didn't Run Inside It.

A Code step's name field was accepted as any string and used to build an on-disk path that was passed to a shell-invoked build command, so shell metacharacters in the name ran arbitrary commands. Because this happened during compilation in the worker process before any sandbox was created, an attacker could run commands as the worker user, read files and environment secrets, and reach the database, Redis and internal API.

Aviral Srivastava Follow

Published on medium.com

Cybersecurity

Aviral Srivastava, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 5 min read.

Context

Activepieces is an open source workflow automation platform, with roughly 23,400 stars, the kind of tool people self-host to wire together SaaS integrations. You build flows on a canvas, and one of the step types is a Code step where you write JavaScript that runs as part of the flow.

That Code step is the whole reason a sandbox exists. Activepieces ships four execution modes:

Text
UNSANDBOXED                no isolation
SANDBOX_PROCESS            process isolation only
SANDBOX_CODE_ONLY          V8 Isolate, no Node.js APIs
SANDBOX_CODE_AND_PROCESS   both

Under SANDBOX_CODE_ONLY, the V8 isolate is the only thing standing between a user's Code step and the host. That mode is the one worth attacking, because it is the one where the isolate is load-bearing.

When a product's whole premise is "you can write arbitrary code and we will run it safely," the sandbox is not a feature. It is the product. Everything else is a UI on top of that one promise. So the question worth asking about these platforms is never "is the sandbox any good." Sandboxes are usually fine. V8 isolates work. Process isolation works. The interesting question is narrower and almost nobody asks it: what runs outside it?

Not what escapes it. What never enters it in the first place. A sandbox only protects the code that executes inside its boundary, and the amount of attacker-influenced work that happens outside that boundary is usually larger than anyone intends.

From the original on medium.com

Setup

The write-up does not describe any accounts, roles, tooling versions or preconditions used to test the platform. What it does describe is the starting point of the analysis: tracing the path a Code step takes from the moment it is submitted to the moment it executes, and marking where the sandbox begins.

Finding it

The researcher did not start by trying to escape the isolate. The starting point was tracing that path, because a Code step is not just code. It is a record with a name, an ID, settings, and a body. All of those fields cross the same trust boundary. Only one of them was ever going to end up inside the isolate.

That framing turns out to be the productive question. The write-up's summary names three CVEs in total, and the first one is the subject of the rest of the write-up.

Exploitation

Step 1: identify the compilation phase

Before a Code step can run, it has to be compiled. The worker takes the step, writes it to disk, and builds it. This happens before any code sandbox is created.

Step 2: control the on-disk path through the step name

The on-disk path for that step was constructed from the step's name. The name was validated as z.string(), a Zod schema meaning any string at all.

Step 3: reach the shell

That path was then passed to a shell-invoked build command. The command runner split the command string and ran the result through /bin/sh, so a name containing ;, |, $(), or backticks broke out of the intended bun build or esbuild invocation and ran whatever the attacker wanted.

Step 4: note that the mode does not matter

The injection occurred during the compilation phase in the worker process, before any code sandbox was created, so every execution mode was affected. Read that against the mode table: it does not matter which sandbox you configured. The compilation step happens first, in the worker process, as the worker user. In the default container image that user is root.

The advisory says so explicitly in the workarounds section: process-level sandboxing does not mitigate this, because the injection fires during compilation before the process sandbox is applied.

So the payload is not in the code you sandbox. It is in the name of the code you sandbox, processed by a shell, before the sandbox exists.

Root cause

The mistake is a trust-boundary mismatch. The Code step record has several fields, and all of them cross the same boundary, but only the body was ever going to end up inside the isolate. The name field was validated as z.string(), which accepts any string, and was then used to build an on-disk path that was handed to a shell-invoked build command. The command runner split the command string and ran the result through /bin/sh, so shell metacharacters in the name were interpreted rather than treated as data.

Existing defences did not stop it because the sandbox is applied after compilation. The injection fires during compilation, in the worker process, as the worker user, before any code sandbox exists. The advisory states this explicitly: process-level sandboxing does not mitigate the issue.

Impact

CVE-2026-73081 is rated CVSS 8.7 High. From the injection point, an attacker could read and write the worker filesystem, pull environment secrets, and reach anything the worker can reach, which is the database, Redis, and the internal API. On a multi-tenant instance that is every tenant's data.

Fix

What it does record is the advisory's position on workarounds: process-level sandboxing does not mitigate the issue, because the injection fires during compilation before the process sandbox is applied.

Variants to test

  1. Other fields of the step record. A Code step is a record with a name, an ID, settings, and a body, and all of those fields cross the same trust boundary. Try each field that ends up in a filesystem path or a command string. A positive result is a field that reaches /bin/sh unescaped, shown by a metacharacter such as ; or $() producing command output or a side effect.
  2. Other build or compile steps. Look for any step type that is compiled or written to disk before execution, not just the Code step. A positive result is a build command whose arguments include user-controlled data.
  3. Shell-invoked commands elsewhere in the worker. The write-up describes a command runner that splits a command string and runs it through /bin/sh. Look for other callers of that runner. A positive result is any caller that passes a string containing user-controlled data.
  4. Execution-mode assumptions. Check whether a platform's documentation claims that a sandbox mode protects a feature, then trace what happens before the sandbox is applied. A positive result is attacker-influenced work that runs in the worker process regardless of the configured mode.
  5. Default container user. In the default container image the worker user is root. Check the user a self-hosted deployment runs as. A positive result is a worker process running as root, which raises the impact of any command injection in that process.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 13 min read.

What happened, in plain words

Activepieces is a piece of software that lets you connect other online services together so they do things automatically. You draw a flow on a screen, and the flow runs steps one after another. One of those step types is a Code step: you type some JavaScript, and the platform runs it as part of your flow.

Because the platform runs code that strangers wrote, it needs a way to run that code without letting it damage the machine. That protection is called a sandbox. A sandbox is like a playpen: the child can do whatever it likes inside, but cannot reach the kitchen knives. The whole selling point of Activepieces is that you can write arbitrary code and it will be run safely, so the sandbox is not a side feature. It is the product.

Aviral Srivastava asked a different question from the usual one. Most people ask whether the sandbox can be broken out of. He asked what happens outside the sandbox: which parts of a Code step are handled before the code ever reaches the playpen. The answer was a command injection, a bug where text you control gets treated as an instruction by the operating system. It was rated CVSS 8.7 High and tracked as CVE-2026-73081. The write-up's own summary names three CVEs in total: this command injection, a V8 isolate that protects the wrong half of the module, and an XSS in the OAuth callback. The detailed walkthrough below covers the first one.

From the original on medium.com

The target, and why the sandbox matters

Activepieces is open source, meaning its code is public, and it has roughly 23,400 stars on its code hosting page. People install it on their own servers (self-hosting) to connect SaaS integrations, where SaaS means software you use online rather than install, and an integration is a link between two such services.

You build flows on a canvas, a visual editor where steps are boxes you arrange. One step type is the Code step, where you write JavaScript that runs as part of the flow.

That Code step is the reason a sandbox exists at all. Activepieces offers four execution modes, which are settings that decide how much isolation is applied when your code runs:

Text
UNSANDBOXED                no isolation
SANDBOX_PROCESS            process isolation only
SANDBOX_CODE_ONLY          V8 Isolate, no Node.js APIs
SANDBOX_CODE_AND_PROCESS   both

Line by line:

  • UNSANDBOXED with no isolation: your code runs directly on the machine, with nothing in between. Like letting a guest cook in your kitchen with no supervision.
  • SANDBOX_PROCESS with process isolation only: your code runs in its own separate process. A process is a running program with its own memory, kept apart from other running programs by the operating system. The comparison is a separate room with a locked door, but the same house.
  • SANDBOX_CODE_ONLY with V8 Isolate, no Node.js APIs: your code runs inside a V8 isolate. V8 is the JavaScript engine, the program that reads and executes JavaScript, and an isolate is a sealed compartment inside it where code runs without access to the surrounding system. Node.js is the runtime that normally gives JavaScript access to files, the network and so on; here those APIs (the built-in functions a program can call) are not provided.
  • SANDBOX_CODE_AND_PROCESS with both: the two protections are combined.

Under SANDBOX_CODE_ONLY, the V8 isolate is the only thing between a user's Code step and the host, the underlying machine. That is the mode worth attacking, because it is the one where the isolate is doing all the work.

The reasoning behind the whole investigation is worth stating plainly. When a product promises "write any code and we will run it safely", the sandbox is the product, and everything else is a user interface on top of that promise. So the useful question is not "is the sandbox any good". Sandboxes are usually fine; V8 isolates work, process isolation works. The narrower question almost nobody asks is: what runs outside it?

Not what escapes it, but what never enters it in the first place. A sandbox only protects code that executes inside its boundary, and the amount of attacker-influenced work happening outside that boundary is usually larger than anyone intends.

Setup

The write-up does not describe any accounts, roles, tooling versions or preconditions used to test the platform. What it does describe is where the analysis started: tracing the path a Code step takes from the moment it is submitted to the moment it executes, and marking where the sandbox begins.

Finding it

The researcher did not begin by trying to escape the isolate. He began by tracing that path, because a Code step is not just code. It is a record, a bundle of data, with a name, an ID, settings, and a body. All of those fields cross the same trust boundary, the line between data the user is allowed to control and data the system relies on. Only one of them, the body, was ever going to end up inside the isolate.

That framing is what made the finding possible. The write-up's summary names three CVEs in total, and the first is the subject of the rest of the write-up.

Exploitation

Step 1: identify the compilation phase

Before a Code step can run, it has to be compiled. Compiling means turning the JavaScript you typed into a form the machine can execute; think of translating a recipe into the language the kitchen staff read. The worker, the background program that does the actual work, takes the step, writes it to disk, and builds it. This happens before any code sandbox is created.

Why this step matters: if anything user-controlled is handled during compilation, it is handled outside the playpen, where the protections do not apply yet.

Step 2: control the on-disk path through the step name

The on-disk path for that step, meaning the location and filename where the step is written on the filesystem, was constructed from the step's name. The name was validated as z.string(). Zod is a validation library for JavaScript: you describe what data should look like, and it checks incoming data against that description. z.string() means "any string at all", so the check accepted literally any text the user supplied.

Why this step matters: the name is a field the user controls, and it was being used to build a file path. If the name can contain anything, the path can contain anything.

Step 3: reach the shell

That path was then passed to a shell-invoked build command. A shell is the program that reads typed commands and runs them; /bin/sh is the standard one on Unix-like systems. The command runner split the command string and ran the result through /bin/sh, so a name containing ;, |, $(), or backticks broke out of the intended bun build or esbuild invocation and ran whatever the attacker wanted. bun build and esbuild are tools that compile JavaScript.

Those four pieces of punctuation are shell metacharacters, characters with special meaning to the shell rather than being taken literally:

  • ; ends one command and starts another, so first ; second runs both.
  • | is a pipe: it sends the output of one command into another.
  • $() runs the command inside the brackets and substitutes its output into the surrounding text.
  • Backticks do the same job as $() in older shell syntax.

The everyday comparison: imagine a form where you write your name on a label, and the label is then read aloud to a person who follows instructions. If you write "Alice, and also open the safe", the reader may do both. The name was supposed to be data, a label, but it was handed to something that treats text as instructions.

Step 4: note that the mode does not matter

The injection occurred during the compilation phase in the worker process, before any code sandbox was created, so every execution mode was affected.

Read that against the mode table. It does not matter which sandbox you configured. The compilation step happens first, in the worker process, running as the worker user. A user here means the operating-system account a program runs under, which decides what it is allowed to touch. In the default container image, a container being a packaged, self-contained way to ship software, that user is root, the all-powerful administrator account.

The advisory, the official security notice published about the flaw, says so explicitly in its workarounds section: process-level sandboxing does not mitigate this, because the injection fires during compilation before the process sandbox is applied.

So the payload is not in the code you sandbox. It is in the name of the code you sandbox, processed by a shell, before the sandbox exists.

Root cause

The mistake is a trust-boundary mismatch. The Code step record has several fields, and all of them cross the same boundary, but only the body was ever going to end up inside the isolate. The name field was validated as z.string(), which accepts any string, and was then used to build an on-disk path that was handed to a shell-invoked build command. The command runner split the command string and ran the result through /bin/sh, so shell metacharacters in the name were interpreted rather than treated as data.

But the name was handled by the shell, and the shell does not know or care about sandboxes.

Existing defences did not stop it because the sandbox is applied after compilation. The injection fires during compilation, in the worker process, as the worker user, before any code sandbox exists. The advisory states this explicitly: process-level sandboxing does not mitigate the issue.

Impact

CVE-2026-73081 is rated CVSS 8.7 High. CVSS is a standard scoring system for the severity of a security flaw, and 8.7 on its 0 to 10 scale is High. CVE is a public catalogue number given to a disclosed vulnerability so people can refer to it unambiguously.

From the injection point, an attacker could read and write the worker filesystem, meaning the files on the machine the worker runs on; pull environment secrets, meaning configuration values such as passwords and API keys that programs keep in their environment; and reach anything the worker can reach, which is the database, Redis, and the internal API. A database is organised storage for the application's data. Redis is an in-memory data store often used for queues and caching. An API is the set of addresses and rules one program uses to talk to another, like a service counter where you make requests and get responses.

On a multi-tenant instance, one installation serving many separate customers, that is every tenant's data.

Fix

What it does record is the advisory's position on workarounds: process-level sandboxing does not mitigate the issue, because the injection fires during compilation before the process sandbox is applied.

Variants to test

These are follow-up checks for anyone auditing a similar platform.

  1. Other fields of the step record. A Code step is a record with a name, an ID, settings, and a body, and all of those fields cross the same trust boundary. Try each field that ends up in a filesystem path or a command string. A positive result is a field that reaches /bin/sh unescaped, shown by a metacharacter such as ; or $() producing command output or a side effect.
  2. Other build or compile steps. Look for any step type that is compiled or written to disk before execution, not just the Code step. A positive result is a build command whose arguments include user-controlled data.
  3. Shell-invoked commands elsewhere in the worker. The write-up describes a command runner that splits a command string and runs it through /bin/sh. Look for other callers of that runner. A positive result is any caller that passes a string containing user-controlled data.
  4. Execution-mode assumptions. Check whether a platform's documentation claims that a sandbox mode protects a feature, then trace what happens before the sandbox is applied. A positive result is attacker-influenced work that runs in the worker process regardless of the configured mode.
  5. Default container user. In the default container image the worker user is root. Check the user a self-hosted deployment runs as. A positive result is a worker process running as root, which raises the impact of any command injection in that process.

Glossary

  • API: the set of addresses and rules one program uses to talk to another, like a service counter where you make requests and get responses.
  • Advisory: the official public notice published about a security flaw, including its impact and any workarounds.
  • Backticks: the ` character, which in a shell runs the command inside it and substitutes the output.
  • Body: the actual code text of a Code step, as opposed to its name or settings.
  • Command injection: a flaw where text an attacker controls is treated by the operating system as a command to run.
  • Compilation: turning code a person wrote into a form the machine can execute.
  • Container: a packaged, self-contained way to ship and run software with everything it needs.
  • Container image: the packaged file a container is started from.
  • CVSS: a standard 0 to 10 scoring system for the severity of a security flaw; 8.7 is High.
  • CVE: a public catalogue number given to a disclosed vulnerability so people can refer to it unambiguously.
  • Database: organised storage for an application's data.
  • Environment secrets: configuration values such as passwords and API keys that programs keep in their environment.
  • Execution mode: a setting that decides how much isolation is applied when user code runs.
  • Filesystem: the files and folders on a machine, and the rules for reading and writing them.
  • Flow: a sequence of steps in Activepieces that runs automatically.
  • Host: the underlying machine that software runs on.
  • Integration: a link between two online services so they can exchange data.
  • Isolate (V8 isolate): a sealed compartment inside the JavaScript engine where code runs without access to the surrounding system.
  • JavaScript: the programming language used for the Code step.
  • Metacharacter: a character with special meaning to the shell rather than being taken literally, such as ;, |, $() or backticks.
  • Multi-tenant: one installation serving many separate customers, each a tenant.
  • Node.js: the runtime that normally gives JavaScript access to files, the network and other system features.
  • Open source: software whose code is public and can be inspected and reused.
  • Patch: the code change that fixes a flaw.
  • Pipe (|): a shell character that sends the output of one command into another.
  • Process: a running program with its own memory, kept apart from other running programs by the operating system.
  • Process isolation: running code in its own separate process so it cannot directly touch other programs' memory.
  • Redis: an in-memory data store often used for queues and caching.
  • Root: the all-powerful administrator account on a Unix-like system.
  • SaaS: software you use online rather than install on your own machine.
  • Sandbox: a restricted environment where code can run without being able to damage or reach the rest of the machine.
  • Self-hosting: installing and running software on your own server rather than using someone else's service.
  • Shell: the program that reads typed commands and runs them; /bin/sh is the standard one on Unix-like systems.
  • Shell-invoked: run by passing a string to a shell, which then interprets any special characters in it.
  • Semicolon (;): a shell character that ends one command and starts another.
  • $(): shell syntax that runs the command inside the brackets and substitutes its output into the surrounding text.
  • Trust boundary: the line between data a user is allowed to control and data the system relies on.
  • User (operating system): the account a program runs under, which decides what it is allowed to touch.
  • V8: the JavaScript engine, the program that reads and executes JavaScript.
  • Worker: the background program that does the actual work of running flows and steps.
  • XSS: cross-site scripting, a flaw where an attacker gets their own script to run in another user's browser.
  • Zod: a validation library for JavaScript that checks incoming data against a description you write.
  • z.string(): a Zod check meaning "any string at all".
  • /bin/sh: the standard Unix shell program.
  • bun build / esbuild: tools that compile JavaScript.

More by Aviral Srivastava

View all

2 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.