Status: fixed in #60 and deployed as e6dbb28 on 2026-11-22. I'm recording it now that the fix is live.
What it was
Workflow conditions (step.condition and route if) were evaluated with vm.runInNewContext. Node's vm module is not a security boundary: an expression running in a vm context can reach the host process. So anyone who could save a workflow could run code inside the Pulse server process, which runs as root on CT 122 and has the database credentials and the Gandalf and worker keys.
Who could save a workflow:
Before #60: any Authelia user that Pulse admitted. Pulse let in the admin and employee groups, and creating a workflow had no admin check, although editing did.
In practice: Authelia only lets the admin group reach pulse.lotusguild.org, with two-factor. So exposure was limited to admins, who can already run root commands on the workers.
I confirmed the problem only on a local test instance. Nothing was tried against production.
Conditions are parsed and interpreted by lib/condition.js, a small evaluator that can only read the workflow's own state and params, call a short allowlist of functions and string methods, and use ordinary operators. No JavaScript engine is involved.
Each of the 26 conditions in the production workflows gives the same result as before, checked against 150 random states per condition.
Workflows with conditions that don't parse are rejected when saved.
Creating a workflow requires admin.
Pulse itself now admits only the admin group (pages, API, WebSocket), matching Authelia. The only accounts that lost access were three old test accounts that were employee-only.
Follow-ups
None needed for this bug.
Related, and unchanged: the server and worker run as root. Worth revisiting if Pulse ever admits non-admins again.
**Status:** fixed in #60 and deployed as `e6dbb28` on 2026-11-22. I'm recording it now that the fix is live.
## What it was
Workflow conditions (`step.condition` and route `if`) were evaluated with `vm.runInNewContext`. Node's `vm` module is **not a security boundary**: an expression running in a vm context can reach the host process. So anyone who could save a workflow could run code inside the Pulse server process, which runs as root on CT 122 and has the database credentials and the Gandalf and worker keys.
Who could save a workflow:
- **Before #60:** any Authelia user that Pulse admitted. Pulse let in the `admin` and `employee` groups, and creating a workflow had no admin check, although editing did.
- **In practice:** Authelia only lets the `admin` group reach `pulse.lotusguild.org`, with two-factor. So exposure was limited to admins, who can already run root commands on the workers.
I confirmed the problem only on a local test instance. Nothing was tried against production.
## The fix (#60)
- Conditions are parsed and interpreted by `lib/condition.js`, a small evaluator that can only read the workflow's own `state` and `params`, call a short allowlist of functions and string methods, and use ordinary operators. No JavaScript engine is involved.
- Each of the 26 conditions in the production workflows gives the same result as before, checked against 150 random states per condition.
- Workflows with conditions that don't parse are rejected when saved.
- Creating a workflow requires admin.
- Pulse itself now admits only the `admin` group (pages, API, WebSocket), matching Authelia. The only accounts that lost access were three old test accounts that were employee-only.
## Follow-ups
- None needed for this bug.
- Related, and unchanged: the server and worker run as root. Worth revisiting if Pulse ever admits non-admins again.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Status: fixed in #60 and deployed as
e6dbb28on 2026-11-22. I'm recording it now that the fix is live.What it was
Workflow conditions (
step.conditionand routeif) were evaluated withvm.runInNewContext. Node'svmmodule is not a security boundary: an expression running in a vm context can reach the host process. So anyone who could save a workflow could run code inside the Pulse server process, which runs as root on CT 122 and has the database credentials and the Gandalf and worker keys.Who could save a workflow:
adminandemployeegroups, and creating a workflow had no admin check, although editing did.admingroup reachpulse.lotusguild.org, with two-factor. So exposure was limited to admins, who can already run root commands on the workers.I confirmed the problem only on a local test instance. Nothing was tried against production.
The fix (#60)
lib/condition.js, a small evaluator that can only read the workflow's ownstateandparams, call a short allowlist of functions and string methods, and use ordinary operators. No JavaScript engine is involved.admingroup (pages, API, WebSocket), matching Authelia. The only accounts that lost access were three old test accounts that were employee-only.Follow-ups