/

CVE-2026-44267

Severity:

CRITICAL RISK

(9.8)

Code Injection (CWE-94) in Elo Expression Language

CVE-2026-44267

Deferred

Vulnerability type

Category:

Code Injection

CWE:

CWE-79, CWE-94, CWE-693, CWE-1336

Impact:

Arbitrary Code Execution

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Before version 1.0.1, crafted plain Elo strings can pass through member access and JavaScript compilation to execute attacker-selected code in the host runtime. Depending on where the string is processed, this may enable script execution in a browser or arbitrary code execution in a Node.js environment.

Affected context

The vulnerability affects plain-string inputs processed through Elo's defaultFormats.elo.parse(), bin/elo, or the online playground. It occurs when member access involving meta-properties such as constructor is accepted and emitted into generated JavaScript without being rejected. The auto-running playground and Node.js hosts that execute generated output have different exposure and impact; this plain-string issue is distinct from programmatic AST-object injection.

Exploit preconditions

  • Attack surface: An Elo parser or execution path, including the browser playground, CLI, or a Node.js integration
  • Required access: Ability to supply or influence a plain Elo string that the affected path processes
  • Trigger point: Parsing and execution of the generated JavaScript; the playground may run submitted input automatically
  • Why exploitation is possible: The parser accepts constructor as an identifier, the member-access handler does not reject the relevant meta-properties, and the JavaScript compiler emits the surviving property access

Why this happens

The issue is an unsafe code-generation pattern. The parser treats constructor as an ordinary identifier, and the transformer permits a meta-property access chain to survive into JavaScript output. Because the generated code can reach JavaScript's Function constructor, attacker-controlled input can become executable code. This maps primarily to CWE-94: Improper Control of Generation of Code; related weaknesses include cross-site scripting and inadequate security control enforcement.

Potential impact

  • A browser-based playground may execute attacker-controlled script in a user's session.
  • Affected browser sessions could be compromised.
  • A Node.js process may execute arbitrary code when it processes and runs affected input.
  • CI, DevOps, or library-hosting environments could be exposed to compromise, depending on how inputs are sourced and what privileges the process has.

General mitigation guidance

Defensive patterns focus on preventing untrusted expressions from becoming executable host-language code.

  • Reject or safely handle meta-properties and other member access patterns that can reach dynamic code constructors.
  • Prefer a constrained interpreter or allowlisted expression model over emitting and executing general-purpose JavaScript.
  • Treat expressions from users, external services, and mutable configuration as untrusted; validate them against a strict grammar before processing.
  • Avoid automatically executing submitted expressions, and isolate evaluation from sensitive browser or server contexts.
  • Apply least privilege and process isolation so an expression evaluator has limited access to files, credentials, and other services.

How teams detect issues like this

  • Use static analysis to identify generated-code paths that preserve user-controlled member access or expose dynamic function constructors.
  • During code review, trace expression input from parsing through transformation and compilation, checking whether validation occurs before code generation or execution.
  • Add tests and policy checks that reject disallowed meta-properties and verify that generated output cannot invoke dynamic code construction.
  • Review integrations and CI policies for execution of generated code derived from untrusted strings; automated code review tools may help flag risky patterns.

Sources

SourceLink
github.comgithub.com/enspirit/elo/commit/2136da1f64eec8ebf99890d3100be9394534b842
github.comgithub.com/enspirit/elo/commit/d2a89a8db76a244eb740687524a7e8529b7554b5
github.comgithub.com/enspirit/elo/security/advisories/GHSA-33r5-xmm8-v6x5

Frequently asked

questions

It depends on where the plain Elo string is processed. The auto-running browser playground may allow script execution, while Node.js integrations that execute generated output may be exposed to arbitrary code execution.

An attacker needs a way to supply or influence an Elo string processed by an affected path. The string must then reach the relevant parsing and execution flow.

Prevent expressions from generating executable host-language constructs. Use strict allowlisting or a constrained interpreter, and reject unsafe member access before code generation.

Treat expression strings as untrusted, test parser and compiler boundaries, avoid automatic execution, and run evaluation with least privilege and isolation.

Find out what's already
exploitable in your codebase.