Elo Expression Language Sandbox Escape to Node.js Code Execution (CVE-2026-44267)
Published: 2026-11-25 • Researcher: Umair Aziz (umair-aziz025) — PoC; reported by ultra-supara (GHSA-33r5-xmm8-v6x5)
- Severity
- Critical
- CVE
- CVE-2026-44267 (GHSA-33r5-xmm8-v6x5)
- Category
- misc
- Affected product
- @enspirit/elo npm package — Elo purely functional expression language, JavaScript compiler and CLI (bin/elo)
- Affected versions
- Prior to 1.0.1 (vulnerable in 1.0.0 and earlier; fixed in 1.0.1). NVD lists no CPE/version ranges (products and version_ranges empty), so the upstream advisory is authoritative — see references.
- Disclosed
- 2026-11-25
- Patch status
- Patched
Tags
References
- https://nvd.nist.gov/vuln/detail/CVE-2026-44267
- https://github.com/enspirit/elo/security/advisories/GHSA-33r5-xmm8-v6x5
- https://github.com/enspirit/elo/commit/2136da1f64eec8ebf99890d3100be9394534b842
- https://github.com/enspirit/elo/commit/d2a89a8db76a244eb740687524a7e8529b7554b5
- https://github.com/umair-aziz025/CVE-2026-44267
- https://www.npmjs.com/package/@enspirit/elo
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-44267
Archive entry
intelseclab/poc-archiveOn this page
Metadata
| Field | Value |
|---|---|
| Date Added | 2026-11-25 |
| Last Updated | 2026-11-04 |
| Author / Researcher | Umair Aziz (umair-aziz025) — PoC; reported by ultra-supara (GHSA-33r5-xmm8-v6x5) |
| CVE / Advisory | CVE-2026-44267 (GHSA-33r5-xmm8-v6x5) |
| Category | misc |
| Severity | Critical |
| CVSS Score | 9.8 (CVSSv3.1; CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) |
| Status | PoC |
| Tags | RCE, sandbox-escape, code-injection, nodejs, javascript, npm-library, constructor-chain, cwe-94, expression-language, unauthenticated |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | @enspirit/elo npm package — Elo purely functional expression language, JavaScript compiler and CLI (bin/elo) |
| Versions Affected | Prior to 1.0.1 (vulnerable in 1.0.0 and earlier; fixed in 1.0.1). NVD lists no CPE/version ranges (products and version_ranges empty), so the upstream advisory is authoritative — see references. |
| Language / Platform | JavaScript / Node.js 18+; also browser runtime (elo-lang.org/try playground) |
| Authentication Required | No |
| Network Access Required | No for the library/CLI path (local code evaluation); Yes only when a network-exposed service or the playground evaluates attacker-supplied expressions |
Summary
CVE-2026-44267 is a code injection vulnerability in the Elo expression language package @enspirit/elo, which compiles domain expressions into JavaScript. Before version 1.0.1, the member access transform does not reject JavaScript meta-properties, the JavaScript compiler emits the surviving property names directly, and the parser accepts constructor as an ordinary identifier, so a plain expression string can walk from an object literal to the host Function constructor. The resulting generated JavaScript runs attacker-selected code in the host runtime: script execution and session compromise in the auto-running web playground, and arbitrary Node.js code execution wherever the library, CLI binary, or CI pipeline evaluates untrusted expressions. The included local PoC drives the constructor chain to execute fixed commands through the Node.js process and child process modules, and contrasts vulnerable 1.0.0 behavior with the 1.0.1 patch.
Vulnerability Details
Root Cause
Elo compiles an expression through parse() → AST → transform() (IR) → compileToJavaScript() → new Function(...). Three defects combine:
src/transform.ts(themember_accesshandler) does not reject JavaScript meta-property names, so.constructor,.prototypeand related names survive transformation.src/compilers/javascript.tsemits the surviving property name directly into generated JavaScript.src/parser.tsacceptsconstructoras an ordinary identifier, so the string({}).constructor.constructor(...)is a legal Elo expression.
Because the emitted code is wrapped in new Function('DateTime', 'Duration', 'Interval', \return ${jsCode};`), reaching the real Functionconstructor from inside an expression allows code to run in the host realm instead of Elo's expression scope. This plain-string path is distinct from the programmatic AST-object injection issue noted in the advisory. NVD assigns CWE-94, CWE-1336, CWE-693 and CWE-79; the upstream repository emphasizes CWE-94. The fix in 1.0.1 adds aFORBIDDEN_MEMBERS guard (constructor, proto, prototype, defineGetter, defineSetter, lookupGetter, lookupSetter`) in the member-access handler.
Attack Vector
An attacker supplies a plain Elo expression string to any entry point that evaluates untrusted input: defaultFormats.elo.parse(), the bin/elo CLI, or the auto-running elo-lang.org/try playground. The payload is an ordinary expression that walks the prototype chain, e.g. ({}).constructor.constructor('return 6 * 7')(). From there a second stage returns the Node.js process object via this.constructor.constructor('return process')() and loads child_process through process.mainModule.require('child_process') to run OS commands. No authentication, file upload, or network position beyond the expression input is required.
Impact
Arbitrary JavaScript execution in the host realm. On the browser playground this means script execution in the page origin and session compromise; on a Node.js library, CI job, or DevOps host it means arbitrary OS command execution as the process user, exposing secrets, source code, credentials and any reachable internal service. The upstream PoC demonstrates pwd, whoami, directory listing and a sub-shell directory change through the escaped compiler.
Environment / Lab Setup
OS: Linux / macOS / Windows with Node.js 18+ and npm
(recorded evidence run: Windows, Node v22.16.0)
Target: @enspirit/elo@1.0.0 (vulnerable) and @enspirit/elo@1.0.1 (patched),
each installed by npm into its own temporary directory
Attacker: Local operator running the harness; expressions are hardcoded
constants, no command/target input is accepted
Tools: node, npm (network access on the first run to fetch both versions)Isolation warning: temporary directories are not a security sandbox — both probes can access the host OS. Run this only inside a disposable, low-privilege VM or container, never on a workstation or production host.
Setup Steps
| |
Proof of Concept
Step-by-Step Reproduction
- Prepare an isolated host — disposable container or VM with Node.js 18+ and npm; the harness installs packages and spawns child processes.
- Run the harness —
node cve_2026_44267_lab.js. It creates a temp root with aworkspacedirectory containinglab_marker.txtand aproof_dir, then runsnpm install --ignore-scripts --no-save @enspirit/elo@<version>into separate folders for 1.0.0 and 1.0.1. - Baseline check — each version evaluates
2 + 3and must return5, proving the compiler works before the escape test. - Sandbox escape — the harness evaluates
({}).constructor.constructor('return 6 * 7')(). On 1.0.0 it returns42, proving hostFunctionexecution. - OS command proof — on 1.0.0, four fixed expressions reach
process.mainModule.require('child_process').execSync(...)and runpwd,whoami,ls -1,cd proof_dir && pwd(Windows variantscd,whoami,dir /b,cd proof_dir && cd) inside the controlled workspace. - Patch differential — the identical expressions on 1.0.1 are rejected at compile time with
Member access '.constructor' is forbidden: this name would expose the host runtime and is not a valid Elo property.; the harness reportsPASSwhen escape is reproduced on 1.0.0, blocked on 1.0.1, and every fixed command matched its expected output. - Evidence — a JSON report is written (default
cve_2026_44267_evidence.json) with host usernames and absolute paths redacted after assertions are computed.
Exploit Code
See
cve_2026_44267_lab.jsfor the full harness andcve_2026_44267_evidence.jsonfor the recorded run. Upstream documentation is inupstream-README.md.
| |
The harness never reads commands, payloads, targets, or URLs from CLI arguments or the network; safeCommands() returns a fixed list and the expressions are generated locally.
Expected Output
| |
The recorded upstream evidence is from a Windows / Node v22.16.0 run; on Linux the command list is pwd, whoami, ls -1, cd proof_dir && pwd.
Detection & Indicators of Compromise
- Elo expressions or compiled payloads containing
.constructor.constructor,.prototype,__proto__,return process,mainModule.require,child_process, orexecSync— in playground requests, template bodies, API parameters, or application logs. - Post-patch compile errors containing
Member access '.constructor' is forbiddenindicate an attempted (blocked) exploit against 1.0.1+. - Dependency manifests/lockfiles pinning
@enspirit/elobelow 1.0.1, or CI jobs that install and evaluate expressions from untrusted sources. - Node.js processes that spawn
sh -c,cmd.exe,whoami,pwd, orlsfrom a service whose normal behavior never forks a shell; unexpected child processes of a compiler/API worker. - Browser-side: playground/try pages executing expressions that fetch or beacon session data after rendering; CSP or
Function-constructor violations reported to report-only endpoints.
SIEM / IDS rule (example):
| |
| |
Remediation
| Action | Detail |
|---|---|
| Patch | Upgrade to @enspirit/elo@1.0.1 or later (npm install @enspirit/elo@1.0.1), regenerate the lockfile, and rebuild/redeploy every service and CLI image that embeds Elo; the fix adds the forbidden-member guard in the transform step. |
| Workaround | Do not evaluate untrusted Elo expression strings. If that is unavoidable, reject any expression whose identifiers or member names include constructor, __proto__, prototype, or accessor helpers before calling parse()/compile(), and never pass untrusted expressions to the bin/elo CLI or the playground. |
| Config Hardening | Run expression compilation in a low-privilege worker or container with no network and no access to child_process (drop capabilities, seccomp/AppArmor), keep the playground strictly sandboxed with a restrictive CSP, and treat expression evaluation as remote-code-execution-equivalent for trust boundaries. |
References
Notes
Auto-ingested from https://github.com/umair-aziz025/CVE-2026-44267 on 2026-11-25.
Review verdict: ingested as a real local PoC. cve_2026_44267_lab.js does not merely audit — it executes the exploit primitives (constructor-chain escape returning 42, then four fixed OS commands through process.mainModule.require('child_process').execSync) against a locally installed vulnerable package, and then replays them against the patched version. The upstream file header itself describes it as a “single-file, local-only regression and OS-command PoC”. It was not rejected as a detector because the exploit code is present and runs.
Status is PoC rather than Weaponized: the harness accepts no attacker input, runs only a fixed list of harmless commands (pwd, whoami, ls, cd) in a temp workspace, is local-only, and provides no browser/HTTP or arbitrary-command exploit path. The archive did not execute the script (no code execution performed during ingestion); the recorded evidence JSON is the upstream Windows/Node v22.16.0 run and was not independently retested here. The differential comparison doubles as a regression check for the 1.0.1 fix, so the file is also useful as a patched/vulnerable oracle.
License: no LICENSE file and no license statement in the repository or package.json (only the in-file authorized-lab disclaimer), so the exploit source is archived with attribution for authorized security research only. package.json is the two-field project stub required by the CommonJS harness. The repository contains no .git, binaries, lockfiles, or credentials; only the three source/evidence files and the README were copied. Use only against systems you own or have written authorization to test.
| |