CVE-2026-44266

CVE-2026-44266 is a critical-severity code injection vulnerability in @enspirit/elo (npm), affecting versions <= 1.0.0. It is fixed in 1.0.1.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

Elo Ruby backend has Remote Code Execution via unescaped #{...} interpolation in emitted string literals and subtype-constraint labels

Elo's Ruby backend emits attacker-controlled text into Ruby double-quoted strings without escaping the # character. Because # begins Ruby's interpolation sequences, #{expr}, #@ivar, #@@cvar, #$gvar, and any expression wrapped in #{...} may use backticks for shell execution, an Elo program that contains a crafted string literal or a labelled subtype constraint compiles to Ruby that evaluates attacker-chosen Ruby, and through backticks runs attacker-chosen shell commands, at runtime.

The same Elo source compiled to JavaScript, Python, or SQL is benign, so the bug also breaks the cross-target portability guarantee the rest of the compiler honours.

Vulnerable sinks

Two sinks exist in src/compilers/ruby.ts at commit 749af7b:

  1. String-literal emitter, lines 180–184.
    The emitter escapes backslash, double quote, and control characters, but not #. Any #{...} sequence in an Elo string literal flows straight into the emitted Ruby source.

  2. Labelled subtype-constraint branch, lines 405–412.
    The error message passed to p_fail(p, "...") is wrapped in a Ruby double-quoted string with no escape pass at all. Because the parser at src/parser.ts:1339–1348 accepts single-quoted Elo strings as constraint labels, a label such as '#{ `id` }' flows unchanged into the emitted Ruby.

Attack surfaces

All three surfaces share the same root cause (the missing # escape in the Ruby double-quoted-string emission path) and are addressed by the same patch:

# Entry point Threat model
1 /try playground on elo-lang.org (Ruby target) 0-click server-side RCE against elo-lang.org infrastructure from a shared PoC URL
2 bin/eloc -t ruby -x on a CI or DevOps host RCE on any host that passes Elo strings through the CLI
3 Library API, defaultFormats.elo.parse() with a Ruby emission step Ruby RCE for any downstream integrator using Elo as a rule engine, configuration DSL, or form builder DSL (the primary documented use cases)

Proof of Concept

String-literal sink:

# poc.elo
'RES=#{`id 2>&1`}'
$ eloc -t ruby -x poc.elo
# emitted Ruby contains:  "RES=#{`id 2>&1`}"
# running it returns the output of id(1).

Replacing `id 2>&1` with `touch /tmp/pwned` produces a trivially observable filesystem side effect.

Subtype-constraint label sink:

# poc-subtype.elo
let X = Int(i | '#{`touch /tmp/pwned2`}': i > 0) in X(-1)

The predicate fails for -1, causing p_fail(p, "#{...}") to interpolate and execute the backtick command at the Ruby layer.

Both flows are automated in the reproduction script submitted with the original report and were verified against Ruby 3.x.

Root cause

The Ruby-emitter's double-quoted-string escape routine omitted # from its character set, and one emission path (the subtype-constraint label branch) performed no escape pass at all.

Impact

Untrusted input is evaluated as executable code within the application's runtime environment. Typical impact: arbitrary code execution within the application's privilege context.

CVE-2026-44266 has a CVSS score of 9.8 (Critical). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (1.0.1); upgrading removes the vulnerable code path.

Affected versions

@enspirit/elo (<= 1.0.0)

Security releases

@enspirit/elo → 1.0.1 (npm)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

Upgrade @enspirit/elo to 1.0.1 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2026-44266? CVE-2026-44266 is a critical-severity code injection vulnerability in @enspirit/elo (npm), affecting versions <= 1.0.0. It is fixed in 1.0.1. Untrusted input is evaluated as executable code within the application's runtime environment.
  2. How severe is CVE-2026-44266? CVE-2026-44266 has a CVSS score of 9.8 (Critical). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of @enspirit/elo are affected by CVE-2026-44266? @enspirit/elo (npm) versions <= 1.0.0 is affected.
  4. Is there a fix for CVE-2026-44266? Yes. CVE-2026-44266 is fixed in 1.0.1. Upgrade to this version or later.
  5. Is CVE-2026-44266 exploitable, and should I be worried? Whether CVE-2026-44266 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2026-44266 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2026-44266? Upgrade @enspirit/elo to 1.0.1 or later.

Other vulnerabilities in @enspirit/elo

Stop the waste.
Protect your environment with Kodem.