ZeroHour

CVE-2026-67579

PoC niche

Ash Framework keyset cursor deserialization enables SQL injection or RCE

CVSS 4.0
7.5 high
EPSS
<1%p55
Published
()
Modified
AI analysis

Ash Framework (the ash Elixir package) before 3.31.3 fails to safely deserialize the client-supplied keyset pagination cursor (page[:after] or page[:before]) consumed by read actions. The :safe option passed to non_executable_binary_to_term/2 blocks new atoms, functions, and ports, but it does not block structs built from atoms already loaded in a running Ash application, so an attacker can forge a cursor containing an %Ash.Query.Call{} expression that is spliced into the keyset filter without the normal public/private expression gating. On the AshPostgres data layer the injected call is inlined into the SQL query, yielding SQL injection; on the ETS and Simple data layers it is evaluated in-process, yielding arbitrary code execution. Any application running ash 1.17.0 through 3.31.2 that exposes keyset-paginated read actions to untrusted clients is affected, with impact depending on the data layer in use. No confirmed in-the-wild exploitation is reported; a public advisory with a proof of concept (GHSA-3gq3-9xm3-c8v3) is available and EPSS estimates roughly a 0.8% chance of exploitation within 30 days.

What to do: Upgrade to ash 3.31.3 or later, which is the first fixed release. As an interim mitigation, restrict keyset pagination parameters (page[:after]/page[:before]) on read actions to trusted callers and validate cursor input before it reaches the keyset decoder. Prioritize patching where AshPostgres backs unauthenticated read actions (SQL injection risk) or where ETS/Simple data layers are used (code execution risk), and review GHSA-3gq3-9xm3-c8v3 for the published proof of concept.

Affected
ash-hq ash (Ash Framework)>= 1.17.0 and < 3.31.3 (fixed in 3.31.3)
Estimated exposure
nichelikely thousands of Elixir applications at most, with only the subset exposing keyset-paginated read actions to untrusted clients affected — ash is one of the more widely adopted packages in the comparatively small Elixir ecosystem, so production installations plausibly number in the low thousands, and only applications using keyset pagination on exposed read actions are…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

Deserialization of Untrusted Data vulnerability in ash-project ash allows an unauthenticated attacker to inject a filter expression through a forged keyset pagination cursor, resulting in SQL injection or code execution depending on the data layer. Read actions with keyset pagination decode the client-supplied page[:after] or page[:before] cursor in decode_values/2 in lib/ash/page/keyset.ex using non_executable_binary_to_term/2 with [:safe]. That guard blocks new atoms, funs, and ports, but not a struct built from atoms already interned in a running Ash application, so a decoded %Ash.Query.Call{} expression survives and is spliced into the keyset filter as a comparison value in do_filters/4 and evaluated. Because the cursor bypasses the Ash.Expr macro, the runtime never applies the private?/public? gate that would otherwise reject it. On AshPostgres the injected fragment is inlined into the SQL query; on the ETS and Simple data layers it is evaluated in-process as an arbitrary function call. This issue affects ash: from 1.17.0 before 3.31.3.

Vendors
ash-hq
Products
ash framework
Weakness
CWE-89, CWE-502
Vector
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

In the news

No ingested article mentions this CVE yet.