/

CVE-2026-44265

Severity:

HIGH RISK

(7.4)

Code Injection (CWE-94) in Elo Programmatic AST API

CVE-2026-44265

Received

Vulnerability type

Category:

Code Injection

CWE:

CWE-20, CWE-89, CWE-94, CWE-749

Impact:

Code execution in generated-language targets and SQL injection

Severity:

HIGH RISK

(7.4)

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

Elo's programmatic AST API can place unvalidated values into generated JavaScript, Ruby, Python, or SQL, where those values may be interpreted as code rather than data. If an attacker can influence values supplied to the AST, this may enable code execution in the generated-language targets or SQL injection in the SQL target.

Elo's programmatic AST API can place unvalidated values into generated JavaScript, Ruby, Python, or SQL, where those values may be interpreted as code rather than data. If an attacker can influence values supplied to the AST, this may enable code execution in the generated-language targets or SQL injection in the SQL target.

Affected context

The issue occurs when Elo builds output from programmatic AST objects containing values from JSON-deserialized input, plugin output, or other untyped sources. Affected AST fields include literal values, variable and property names, object keys, datapath segments, lambda parameter names, and SQL let-binding names. The vulnerability concerns this AST-object path; it is distinct from the plain-string constructor-chain sandbox escape.

The issue occurs when Elo builds output from programmatic AST objects containing values from JSON-deserialized input, plugin output, or other untyped sources. Affected AST fields include literal values, variable and property names, object keys, datapath segments, lambda parameter names, and SQL let-binding names. The vulnerability concerns this AST-object path; it is distinct from the plain-string constructor-chain sandbox escape.

Exploit preconditions

  • Attack surface: Programs or integrations that construct Elo AST objects from externally influenced or otherwise untyped values
  • Required access: The ability to influence values assigned to affected AST fields, directly or through a plugin or data source
  • Trigger point: Generation or evaluation of target-language output from the AST
  • Why exploitation is possible: Values are interpolated into generated code or SQL without runtime syntax validation, so crafted values may be treated as expressions or identifiers
  • Attack surface: Programs or integrations that construct Elo AST objects from externally influenced or otherwise untyped values
  • Required access: The ability to influence values assigned to affected AST fields, directly or through a plugin or data source
  • Trigger point: Generation or evaluation of target-language output from the AST
  • Why exploitation is possible: Values are interpolated into generated code or SQL without runtime syntax validation, so crafted values may be treated as expressions or identifiers

Why this happens

The AST API accepts values without validating that they conform to the expected syntax or data type before inserting them into generated output. This is an input-validation failure (CWE-20) that can result in code injection (CWE-94) in JavaScript, Ruby, and Python, or SQL injection (CWE-89) in the SQL target. The underlying insecure pattern is treating untrusted values as code or identifiers instead of keeping them separate from executable syntax.

The AST API accepts values without validating that they conform to the expected syntax or data type before inserting them into generated output. This is an input-validation failure (CWE-20) that can result in code injection (CWE-94) in JavaScript, Ruby, and Python, or SQL injection (CWE-89) in the SQL target. The underlying insecure pattern is treating untrusted values as code or identifiers instead of keeping them separate from executable syntax.

Potential impact

  • Crafted AST values may execute attacker-controlled code in generated JavaScript, Ruby, or Python contexts.
  • SQL output may be altered, potentially exposing or changing data or affecting database operations.
  • The impact may extend to resources and privileges available to the process or database account running the generated output.
  • Crafted AST values may execute attacker-controlled code in generated JavaScript, Ruby, or Python contexts.
  • SQL output may be altered, potentially exposing or changing data or affecting database operations.
  • The impact may extend to resources and privileges available to the process or database account running the generated output.

General mitigation guidance

Defensive patterns focus on validating AST inputs and separating data from executable syntax:

  • Use typed AST constructors and reject values that do not match the expected type or grammar.
  • Apply strict allowlists and context-specific validation to identifiers, property names, keys, and path segments.
  • Keep literal data separate from generated syntax, using parameterized queries for SQL values where supported.
  • Prefer safe-by-default APIs that cannot interpolate arbitrary strings as expressions or identifiers.
  • Reduce trust in plugin and deserialized input, and run generated code and database operations with least privilege.

Defensive patterns focus on validating AST inputs and separating data from executable syntax:

  • Use typed AST constructors and reject values that do not match the expected type or grammar.
  • Apply strict allowlists and context-specific validation to identifiers, property names, keys, and path segments.
  • Keep literal data separate from generated syntax, using parameterized queries for SQL values where supported.
  • Prefer safe-by-default APIs that cannot interpolate arbitrary strings as expressions or identifiers.
  • Reduce trust in plugin and deserialized input, and run generated code and database operations with least privilege.

How teams detect issues like this

  • Use static analysis to identify direct interpolation of AST fields into generated source or SQL.
  • Review code paths that accept JSON, plugin output, or other untyped data and trace values through code-generation functions.
  • Add tests and policy checks requiring type and grammar validation for AST values and parameterization of SQL data.
  • Automated code review tools may help flag unsafe interpolation and missing validation.
  • Use static analysis to identify direct interpolation of AST fields into generated source or SQL.
  • Review code paths that accept JSON, plugin output, or other untyped data and trace values through code-generation functions.
  • Add tests and policy checks requiring type and grammar validation for AST values and parameterization of SQL data.
  • Automated code review tools may help flag unsafe interpolation and missing validation.

Sources

SourceLink
github.comgithub.com/enspirit/elo/commit/d2a89a8db76a244eb740687524a7e8529b7554b5
github.comgithub.com/enspirit/elo/commit/fb57dd37a2669d9c412454225c5b89a2adba5d93
github.comgithub.com/enspirit/elo/security/advisories/GHSA-x9rp-7wh3-2rj5

Frequently asked

questions

The description does not establish a direct remote attack path. Exploitation depends on whether an attacker can influence affected AST values through an application, plugin, or other input source.

An attacker must be able to supply or affect values used in vulnerable AST fields, and the application must generate or use output from that AST.

Validate values against their expected types and syntax, use safe-by-default AST APIs, and keep SQL data separate from query syntax with parameterization.

Treat deserialized and plugin-provided values as untrusted, enforce field-specific validation, and review code-generation paths for unsafe interpolation.

The description does not establish a direct remote attack path. Exploitation depends on whether an attacker can influence affected AST values through an application, plugin, or other input source.

An attacker must be able to supply or affect values used in vulnerable AST fields, and the application must generate or use output from that AST.

Validate values against their expected types and syntax, use safe-by-default AST APIs, and keep SQL data separate from query syntax with parameterization.

Treat deserialized and plugin-provided values as untrusted, enforce field-specific validation, and review code-generation paths for unsafe interpolation.

Find out what's already
exploitable in your codebase.