Am I affected?

type your ash_typescript version to check

Description

Allocation of Resources Without Limits or Throttling vulnerability in ash-project ash_typescript allows an unauthenticated attacker to exhaust the BEAM atom table and abort the node via client-supplied RPC field names.

AshTypescript.FieldFormatter.convert_to_field_atom/2 in lib/ash_typescript/field_formatter.ex converts a client-supplied field name to an atom with String.to_atom/1 when no matching atom already exists. It delegates first to parse_input_field/2, which resolves the name with String.to_existing_atom/1 and falls back to returning the plain string; convert_to_field_atom/2 then mints an atom from that string rather than treating the name as unknown.

RPC field selection reaches it for every requested field name through AshTypescript.Rpc.FieldProcessing.FieldSelector, which resolves each name before checking that the field exists, with no allowlist, length bound, or rate limit. Atoms are never garbage collected, so each distinct name mints a permanent one and the VM aborts once the atom table limit is reached. A field name over 255 characters additionally raises an uncaught SystemLimitError.

This issue affects ash_typescript: from 0.1.0 before 0.18.0.

Weaknesses & attack patterns

Weakness

CWE-770 · Allocation of Resources Without Limits or Throttling in catalog → MITRE ↗

Attack patterns

CAPEC-130 · Excessive Allocation MITRE ↗

Affected — Hex / ash_typescript Hex.pm ↗ Repository ↗

≥ 0.1.0 < 0.18.0 affected
every other version: unaffected
cpe cpe:2.3:a:ash-project:ash_typescript:*:*:*:*:*:*:*:*
version type semver
modules · source files · routines
modules 'Elixir.AshTypescript.FieldFormatter' · 'Elixir.AshTypescript.Rpc' · 'Elixir.AshTypescript.Rpc.FieldProcessing.FieldSelector'
source files lib/ash_typescript/field_formatter.ex · lib/ash_typescript/rpc.ex · lib/ash_typescript/rpc/field_processing/field_selector.ex
routines 'Elixir.AshTypescript.FieldFormatter':convert_to_field_atom/2 · 'Elixir.AshTypescript.FieldFormatter':parse_input_field/2 · 'Elixir.AshTypescript.Rpc':run_action/3

Affected — GitHub / ash-project/ash_typescript Repository ↗

≥ 1a3d4c3 < df95df4 affected
every other version: unaffected
cpe cpe:2.3:a:ash-project:ash_typescript:*:*:*:*:*:*:*:*
version type git
modules · source files · routines
modules 'Elixir.AshTypescript.FieldFormatter' · 'Elixir.AshTypescript.Rpc' · 'Elixir.AshTypescript.Rpc.FieldProcessing.FieldSelector'
source files lib/ash_typescript/field_formatter.ex · lib/ash_typescript/rpc.ex · lib/ash_typescript/rpc/field_processing/field_selector.ex
routines 'Elixir.AshTypescript.FieldFormatter':convert_to_field_atom/2 · 'Elixir.AshTypescript.FieldFormatter':parse_input_field/2 · 'Elixir.AshTypescript.Rpc':run_action/3

Configurations

The application exposes an AshTypescript RPC endpoint over HTTP, so that client-supplied field names reach AshTypescript.Rpc.run_action/3.

References

Credits

Peter Ullrich Finder Reporter
Jonatan Männchen / EEF Coordinator
Torkild Gundersen Kjevik / Ash Project Remediation developer

CVSS breakdown

CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Exploitability

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None

Vulnerable System

Confidentiality
None
Integrity
None
Availability
High

Subsequent Systems

Confidentiality
None
Integrity
None
Availability
None
« All CVEs