Skip to content
CVE-2026-44267 Elastic Security · Elastic

Detect Elo JavaScript Emitter Sandbox Escape via `.constructor` Access (CVE-2026-44267) in Elastic Security

Detects exploitation of CVE-2026-44267, a sandbox escape in the @enspirit/elo npm package (versions <= 1.0.0). Elo's JavaScript emitter does not filter `.constructor` member access on user-controlled expressions, allowing an attacker to reach `Function`/`process` and achieve arbitrary Node.js or browser code execution (CWE-94, CWE-693, CWE-1336). Detection focuses on dependency inventory of the vulnerable package, template/expression payloads containing `constructor` chains, and post-exploitation process/network behavior spawned from a Node.js runtime hosting Elo.

MITRE ATT&CK

Tactic
Execution Initial Access

Elastic Detection Query

Elastic Security (Elastic)
eql
// df00tech DF00-b7b8bed07c · https://df00tech.com/detections/CVE-2026-44267 · licence: https://df00tech.com/detections/licence
process where event.type == "start" and
  process.parent.name in ("node", "node.exe") and
  process.name in ("sh", "bash", "cmd.exe", "powershell.exe", "/bin/sh") and
  process.command_line : ("*child_process*", "*constructor*", "*spawn*", "*exec*")
high severity medium confidence

Detects a shell or command interpreter spawned as a child of a Node.js process, consistent with post-exploitation code execution following an Elo sandbox escape.

Data Sources

Endpoint Process Events

Required Tables

logs-endpoint.events.process-*

False Positives & Tuning

  • Node.js build tooling that legitimately spawns shells (npm scripts, webpack).
  • Server-side rendering frameworks invoking subprocesses.
  • Developer tooling and test runners.

Other platforms for CVE-2026-44267


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are further down this page.

  1. Test 1 Elo constructor sandbox escape to code execution (Node)

    Expected signal: Node.js process start with an inline `-e` command line containing `constructor`.

  2. Test 2 Shell spawned via Elo-style constructor escape

    Expected signal: Node.js parent process spawning /bin/sh or id with child_process in the command line.

  3. Test 3 HTTP payload carrying constructor escape

    Expected signal: Web access log entry containing an encoded `.constructor` expression with `process`.


Response Playbook

Triage

  1. Confirm whether the affected host or application bundles @enspirit/elo at version <= 1.0.0 by inspecting package-lock.json / node_modules / SBOM.
  2. Decode and examine the flagged payload to determine whether `.constructor` was chained to `Function`, `process`, or `require` reaching real code execution versus a benign reference.
  3. Correlate the request with the hosting Node.js process timeline to identify any child processes, outbound connections, or file writes spawned immediately after.

Containment

  1. Upgrade or remove @enspirit/elo to a fixed version above 1.0.0, or disable the emitter path that evaluates untrusted expressions.
  2. Isolate the affected host from the network if post-exploitation child processes or outbound C2 connections are confirmed.

Evidence Collection

  1. Capture the full raw request/payload, application logs, and the node process command line and environment.
  2. Collect process-creation telemetry (parent=node) and any files written or scripts fetched during the suspect window.

Escalation Criteria

  • !Escalate to IR if a shell or interpreter was spawned as a child of the Node.js process hosting Elo.
  • !Escalate if outbound connections to unknown infrastructure or credential/secret access follow the suspect expression evaluation.

Investigation Guide

Forensic Artifacts

  • >Node.js process command line and child-process tree.
  • >Web/application access logs containing the `.constructor` payload.
  • >package-lock.json / node_modules showing @enspirit/elo <= 1.0.0.

Tuning Guidance

Baseline legitimate uses of `.constructor` in your application's templates and exclude known-good expression sources. Pair payload matches with process-creation telemetry (shell child of node) to raise confidence before alerting, and suppress traffic from authorized scanners by source IP.


Hunting Queries

Hunts application/syslog output for Elo expression evaluation reaching Node.js execution primitives.

Hunting — KQL
kql
// df00tech DF00-b7b8bed07c · https://df00tech.com/detections/CVE-2026-44267 · licence: https://df00tech.com/detections/licence
Syslog | where SyslogMessage has "constructor" and SyslogMessage has_any ("child_process","process.mainModule","require(") | project TimeGenerated, Computer, SyslogMessage
Hunting — SPL
spl
``` df00tech DF00-b7b8bed07c · https://df00tech.com/detections/CVE-2026-44267 · licence: https://df00tech.com/detections/licence ```
index=* sourcetype=syslog constructor (child_process OR process.mainModule OR "require(") | table _time host _raw

Atomic Red Team Tests

Test 1 Elo constructor sandbox escape to code execution (Node)
linux

Simulates the Elo emitter evaluating an untrusted expression that uses `.constructor` to reach Function and execute code.

Command

bash
node -e "const p='x'; const r=({}).constructor.constructor('return process')(); console.log(r.version);"

Cleanup

bash
echo 'no cleanup required'

Expected Telemetry

Node.js process start with an inline `-e` command line containing `constructor`.

Expected Detection

Process/command-line detections and payload rules match the `.constructor.constructor` chain.

Test 2 Shell spawned via Elo-style constructor escape
linux

Uses the constructor chain to spawn a child shell, emulating post-exploitation command execution.

Command

bash
node -e "({}).constructor.constructor('return this.process')().mainModule.require('child_process').execSync('id');"

Cleanup

bash
echo 'no cleanup required'

Expected Telemetry

Node.js parent process spawning /bin/sh or id with child_process in the command line.

Expected Detection

EQL/CQL process-lineage rules flag a shell child of node.

Test 3 HTTP payload carrying constructor escape
linux

Sends an HTTP request whose parameter contains an Elo expression using `.constructor` and process primitives.

Command

bash
curl -s 'http://localhost:8080/render?expr=%7B%7B%28%29.constructor.constructor%28%22return+process%22%29%28%29%7D%7D' || true

Cleanup

bash
echo 'no cleanup required'

Expected Telemetry

Web access log entry containing an encoded `.constructor` expression with `process`.

Expected Detection

Web-log payload rules (KQL/SPL/QRadar/Sumo/Chronicle) match the decoded constructor+process payload.

Related Detections