Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ CVE-2026-34593 — ash

🟠 CVSS 8.0 — High ✅ No Known Exploit CWE-400 NVD
8.0
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

Ash.Type.Module.cast_input/2 atom exhaustion via unchecked Module.concat allows BEAM VM crash

Summary

Ash.Type.Module.cast_input/2 unconditionally creates a new Erlang atom via Module.concat([value]) for any user-supplied binary string that starts with "Elixir.", before verifying whether the referenced module exists. Because Erlang atoms are never garbage-collected and the BEAM atom table has a hard default limit of approximately 1,048,576 entries, an attacker who can submit values to any resource attribute or argument of type :module can exhaust this table and crash the entire BEAM VM, taking down the application.

Details

Setup: A resource with a :module-typed attribute exposed to user input, which is a supported and documented usage of the Ash.Type.Module built-in type:

```elixir

defmodule MyApp.Widget do

use Ash.Resource, domain: MyApp, data_layer: AshPostgres.DataLayer

attributes do

uuid_primary_key :id

attribute :handler_module, :module, public?: true

end

actions do

defaults [:read, :destroy]

create :create do

accept [:handler_module]

end

end

end

```

Vulnerable code in lib/ash/type/module.ex, lines 105-113:

```elixir

def cast_input("Elixir." <> _ = value, _) do

module = Module.concat([value]) # <-- Creates new atom unconditionally

if Code.ensure_loaded?(module) do

{:ok, module}

else

:error # <-- Returns error but atom is already created

end

end

```

Exploit: Submit repeated Ash.create requests (e.g., via a JSON API endpoint) with unique "Elixir.*" strings:

```elixir

# Attacker-controlled loop (or HTTP requests to an API endpoint)

for i <- 1..1_100_000 do

Ash.Changeset.for_create(MyApp.Widget, :create, %{handler_module: "Elixir.Attack#{i}"})

|> Ash.create()

# Each iteration: Module.concat(["Elixir.Attack#{i}"]) creates a new atom

# cast_input returns :error but the atom :"Elixir.Attack#{i}" persists

end

# After ~1,048,576 unique strings: BEAM crashes with system_limit

```

Contrast: The non-"Elixir." path in the same function correctly uses String.to_existing_atom/1, which is safe because it only looks up atoms that already exist:

```elixir

def cast_input(value, _) when is_binary(value) do

atom = String.to_existing_atom(value) # safe - raises if atom doesn't exist

...

end

```

Additional occurrence: cast_stored/2 at line 141 contains the identical pattern, which is reachable when reading :module-typed values from the database if an attacker can write arbitrary "Elixir.*" strings to the relevant database column.

Impact

An attacker who can submit requests to any API endpoint backed by an Ash resource with a :module-typed attribute or argument can crash the entire BEAM VM process. This is a complete denial of service: all resources served by that VM instance (not just the targeted resource) become unavailable. The crash cannot be prevented once the atom table is full, and recovery requires a full process restart.

Fix direction: Replace Module.concat([value]) with String.to_existing_atom(value) wrapped in a rescue ArgumentError block (as already done in the non-"Elixir." branch), or validate that the atom already exists before calling Module.concat by first attempting String.to_existing_atom and only falling back to Module.concat on success.

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality none, integrity none, availability high.

CVSS metrics in full

The score comes from this vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

  • Attack vector: Network — reachable from anywhere that can route to the service.
  • Attack complexity: Low — the attack works reliably, with no preparation.
  • Privileges required: None — an unauthenticated stranger can try it.
  • User interaction: None — nobody has to be tricked into anything.
  • Scope: Unchanged — the damage stays inside the vulnerable component.
  • Confidentiality impact: None.
  • Integrity impact: None.
  • Availability impact: High — total loss, or loss the attacker controls.

Weakness class

CVE-2026-34593 is classified as CWE-400: Uncontrolled Resource Consumption. A request can consume memory, CPU or storage without limit, exhausting capacity for everyone else.

Affected software

CVE-2026-34593 is recorded against 2 packages.

  • ash
  • ash-framework (fixed in 3.22.0)

Timeline and source

Published on 1 April 2026 and last revised on 15 April 2026. No public exploit is currently recorded for this entry. Record sourced from NVD.

References

github.com (Web)
nvd.nist.gov (Advisory)
github.com (Web)
github.com (Package)
github.com (Web)

Other advisories for this package

ash has other advisories on record. If you are patching this one, these are worth checking on the same host:

Same weakness in other software

These advisories are the same class of weakness (CWE-400: Uncontrolled Resource Consumption) in other software:

Details

Severity HIGH
CVSS Score 8.0
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CWE CWE-400
Public Exploit ✅ No
Source NVD
Published 2026-04-01
Updated 2026-08-20
Modified 2026-04-15
Fix URL N/A

Affected Packages

Software From version Fixed in
ash
ash-framework 3.22.0

Similar Threats

Site Security Check

Is ash part of your stack?

CVE-2026-34593 is rated CVSS 8.0 High. BotEraser scans your installation against known CVE records and tells you whether this vulnerability applies to the versions you actually run.

Scan My Site Free →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2026