Elo data-language strings run arbitrary JavaScript in browsers and Node.js
Anyone who controls an Elo string can run arbitrary code in browsers and Node.js, GitHub's advisory database says, because the emitter turns .constructor.constructor into a live JavaScript Function call.
- Affected
- @enspirit/elo (npm) <= 1.0.0; enspirit/elo < 1.0.1
- Fixed
- 1.0.1
The flaw works through three paths: defaultFormats.elo.parse(), the bin/elo CLI, and the elo-lang.org/try playground. On the playground, a shared ?code=&run=1 URL auto-executes after about 100 ms, enabling zero-click XSS and session takeover on elo-lang.org. The CLI's -f elo flag can run attacker-supplied data files as code on CI and DevOps hosts, and the library path gives Node.js RCE to integrators using Elo as a rule engine or config DSL.
The root cause is in src/transform.ts, where member access is not filtered for meta-properties such as constructor; the JavaScript emitter writes surviving property names verbatim, and the parser accepts constructor as an ordinary identifier. @enspirit/elo versions at or below 1.0.0 are affected (vendor CNA: enspirit/elo < 1.0.1), fixed in 1.0.1. Users should update to 1.0.1; this string-based issue is separate from the Medium AST-API report.
Sources & technical scope 2 sources
GitHub Advisory Database — original source ↗
GitHub_M CNA / CVE Program — original source ↗
Affected: @enspirit/elo (npm) <= 1.0.0; enspirit/elo < 1.0.1
Fixed: 1.0.1
Exploitation: Researchers demonstrated proof of concept, including live playback on the production playground; active exploitation in the wild is not established by the supplied evidence.
Scope & limitations: Versions individually tested are not stated; patch mechanics and any KEV catalog listing are not supplied.
External findings belong to the credited researchers.