Detect Elo (@enspirit/elo) RCE via Unescaped #{...} Interpolation in Emitted Ruby String Literals (CVE-2026-44266) in Elastic Security
Detects exploitation of CVE-2026-44266, a critical (CVSS 9.8) remote code execution vulnerability in the Elo Ruby backend (npm package @enspirit/elo <= 1.0.0). Elo emits Ruby source code from schema/model definitions, but fails to escape Ruby's `#{...}` string interpolation syntax when writing user-controllable values into emitted string literals and subtype-constraint labels (CWE-94 code injection, CWE-116 improper output encoding, CWE-1336 improper template neutralization). An attacker who can influence a field name, description, enum label, or subtype-constraint string that Elo renders into generated Ruby code can inject `#{...}` expressions that are evaluated when the generated code is loaded or run, yielding arbitrary command execution in the backend process. This detection surfaces vulnerable @enspirit/elo installs, code-generation runs that emit injected interpolation, and the child-process / shell execution that follows successful interpolation injection.
Based on GHSA-7w38-ggh5-v542 — Elo RCE via unescaped #{...} interpolation
MITRE ATT&CK
- Tactic
- Initial Access Execution
Elastic Detection Query
// df00tech DF00-d0beb4d28d · https://df00tech.com/detections/CVE-2026-44266 · licence: https://df00tech.com/detections/licence
sequence by host.id with maxspan=2m
[ process where event.type == "start" and
(process.command_line : "*@enspirit/elo*" or process.command_line : "*elo*generate*" or process.command_line : "*elo*emit*") ]
[ process where event.type == "start" and
process.name in ("ruby", "irb", "sh", "bash", "dash") and
(process.command_line : "*#{*" or process.parent.name : "*elo*" or process.parent.command_line : "*elo*") ] Correlates an Elo code-generation process with a subsequent Ruby or shell child process, the execution signature of successful #{...} interpolation injection.
Data Sources
Required Tables
False Positives & Tuning
- Legitimate Elo build pipelines that generate and then run Ruby code
- Developers interactively testing generated Ruby output
- Ruby tooling that legitimately spawns shells
Other platforms for CVE-2026-44266
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.
- Test 1 Simulate Elo emitting a Ruby string literal with injected #{...} command interpolation
Expected signal: Process-launch event for `ruby` executing /tmp/elo_generated.rb, followed by a child `sh -c id` process and a file write to /tmp/elo_cve_2026_44266.out.
- Test 2 Install vulnerable @enspirit/elo version in a lab project
Expected signal: File-creation events under /tmp/elo_lab/node_modules/@enspirit/elo and an npm/node process launch.
- Test 3 Simulate subtype-constraint label interpolation injection on Windows
Expected signal: Sysmon ProcessCreate for ruby.exe running elo_generated.rb and a child process executing whoami, plus file write of elo_poc.txt.
Response Playbook
Triage
- Confirm the installed @enspirit/elo version on the affected host: `npm ls @enspirit/elo` or inspect node_modules/@enspirit/elo/package.json. Versions <= 1.0.0 are vulnerable.
- Identify the input that reached Elo's code generator — field names, descriptions, enum labels or subtype-constraint strings — and check whether any contain the literal sequence `#{`.
- Inspect the Ruby source Elo emitted (generated .rb files) for unescaped `#{...}` expressions in string literals or subtype-constraint labels that were not present in the author's intent.
- Review process telemetry on the host for Ruby or shell child processes spawned at or shortly after the last Elo generation run.
Containment
- Stop the Elo backend / code-generation service and prevent loading of any generated Ruby that contains injected interpolation.
- Isolate the affected host from the network if command execution is confirmed, to prevent lateral movement from the backend process context.
- Revoke and rotate any credentials, tokens or secrets accessible to the Elo backend process, as they must be considered compromised.
Evidence Collection
- Preserve the generated Ruby files, the Elo input/schema definitions that produced them, and the package-lock/node_modules version metadata.
- Capture full process-execution telemetry (command lines, parent/child relationships, timestamps) for the Ruby/shell processes around the generation event.
- Collect backend application and generation logs plus any outbound network connections initiated by the Ruby/Elo process.
Escalation Criteria
- !Escalate to incident response if a Ruby or shell child process executed from an Elo-generated file containing attacker-controlled `#{...}` interpolation.
- !Escalate if the injected interpolation reached command-execution primitives (system, exec, backticks, %x, IO.popen) or if outbound connections / data staging followed.
- !Escalate to the application owner if untrusted or externally-supplied data is confirmed to flow into Elo's string-literal or subtype-constraint emission.
Investigation Guide
Forensic Artifacts
- >
Generated .rb files under or emitted by @enspirit/elo containing unescaped `#{...}` sequences - >
node_modules/@enspirit/elo/package.json showing version <= 1.0.0 - >
Process-execution records of ruby/irb/sh/bash children of the Elo process - >
Elo input schema/model definitions containing `#{` in field names, descriptions, enum labels or subtype-constraint strings
Tuning Guidance
Baseline legitimate Elo code-generation runs (CI pipelines, known developer hosts) and allowlist their host/user/path combinations so routine generation does not alert. Keep the high-fidelity signal — the `#{...}` combined with command-execution primitives (system/exec/backtick/%x/IO.popen) and Ruby/shell child processes descending from the Elo process — always alerting. Once all installs are upgraded past 1.0.0, demote the version-presence component to informational.
Hunting Queries
Hunts for Elo-emitted Ruby files and generation runs whose output or command line contains #{...} interpolation.
// df00tech DF00-d0beb4d28d · https://df00tech.com/detections/CVE-2026-44266 · licence: https://df00tech.com/detections/licence
DeviceFileEvents | where FolderPath has_any ("@enspirit/elo","@enspirit\\elo") or (FileName endswith ".rb" and InitiatingProcessCommandLine has "elo") | where ActionType in ("FileCreated","FileModified") | project Timestamp, DeviceName, FileName, FolderPath, InitiatingProcessCommandLine ``` df00tech DF00-d0beb4d28d · https://df00tech.com/detections/CVE-2026-44266 · licence: https://df00tech.com/detections/licence ```
index=* (sourcetype=*audit* OR sourcetype=*sysmon*) CommandLine="*elo*" (CommandLine="*#{*" OR process_name="ruby" OR process_name="irb") | stats count by host, user, process_name, CommandLine Atomic Red Team Tests
Writes a Ruby file mimicking Elo output where an unescaped field label injected a #{...} expression that runs a command when the file is loaded.
Command
printf 'LABEL = "user: #{`id > /tmp/elo_cve_2026_44266.out`}"\nputs LABEL\n' > /tmp/elo_generated.rb && ruby /tmp/elo_generated.rb Cleanup
rm -f /tmp/elo_generated.rb /tmp/elo_cve_2026_44266.out Expected Telemetry
Process-launch event for `ruby` executing /tmp/elo_generated.rb, followed by a child `sh -c id` process and a file write to /tmp/elo_cve_2026_44266.out.
Expected Detection
KQL/EQL/CQL rules fire on the ruby process executing a generated .rb and the shell child; interpolation-primitive regex matches the embedded `#{\`id\`}`.
Installs @enspirit/elo at a vulnerable version (<= 1.0.0) into a scratch project to validate version-presence detection.
Command
mkdir -p /tmp/elo_lab && cd /tmp/elo_lab && npm init -y >/dev/null 2>&1 && npm install @enspirit/[email protected] >/dev/null 2>&1; cat node_modules/@enspirit/elo/package.json | grep '"version"' Cleanup
rm -rf /tmp/elo_lab Expected Telemetry
File-creation events under /tmp/elo_lab/node_modules/@enspirit/elo and an npm/node process launch.
Expected Detection
File-event component of the KQL/Sumo rules matches node_modules/@enspirit/elo path; version is identified as <= 1.0.0.
Emulates Elo generating Ruby where a subtype-constraint label carried an attacker #{...} expression invoking a command, executed via a Windows Ruby install.
Command
cmd.exe /c "echo CONSTRAINT = \"#{system('whoami > %TEMP%\elo_poc.txt')}\" > %TEMP%\elo_generated.rb && ruby %TEMP%\elo_generated.rb" Cleanup
cmd.exe /c "del %TEMP%\elo_generated.rb %TEMP%\elo_poc.txt" Expected Telemetry
Sysmon ProcessCreate for ruby.exe running elo_generated.rb and a child process executing whoami, plus file write of elo_poc.txt.
Expected Detection
KQL DeviceProcessEvents and CrowdStrike CQL rules match the ruby.exe execution and #{system(...)} interpolation primitive.