Am I affected?

type your ash version to check

Description

Uncontrolled Resource Consumption vulnerability in ash-project ash allows an attacker to exhaust the memory of the node via a crafted keyset pagination cursor.

Read actions with keyset pagination deserialize the client-supplied page[:after] or page[:before] cursor in decode_values/2 in lib/ash/page/keyset.ex, which base64-decodes the value and passes it to :erlang.binary_to_term/2 without bounding its size. The Erlang external term format supports zlib-compressed payloads, which the decoder inflates transparently, so a cursor of a few kilobytes can allocate tens of megabytes of heap in a single call. Ash itself only ever encodes cursors uncompressed, so the decoder accepts a term shape its encoder never produces. Concurrent requests aggregate these allocations and can terminate the node.

This issue affects ash: from 1.17.0 before 3.31.1.

Weaknesses & attack patterns

Weakness

CWE-502 · Deserialization of Untrusted Data in catalog → MITRE ↗

Attack patterns

CAPEC-586 · Object Injection MITRE ↗

Affected — Hex / ash Hex.pm ↗ Repository ↗

1.17.0 < 3.31.1 affected
every other version: unaffected
default status unaffected
cpe cpe:2.3:a:ash-project:ash:*:*:*:*:*:*:*:*
modules · source files · routines
modules 'Elixir.Ash.Page.Keyset'
source files lib/ash/page/keyset.ex
routines 'Elixir.Ash.Page.Keyset':decode_values/2

Affected — GitHub / ash-project/ash Repository ↗

f8fadc6 < 1816b10 affected
every other version: unaffected
default status unaffected
cpe cpe:2.3:a:ash-project:ash:*:*:*:*:*:*:*:*
modules · source files · routines
modules 'Elixir.Ash.Page.Keyset'
source files lib/ash/page/keyset.ex
routines 'Elixir.Ash.Page.Keyset':decode_values/2

Configurations

A read action must declare keyset? true in its pagination block, and the application must pass a client-supplied value as the :after or :before page option.

References

Credits

Zach Daniel Remediation developer
Jisung Chae Finder
Jonatan Männchen / EEF Analyst

CVSS breakdown

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