Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft forged keyset cursor with struct gadget
-
DeliverySubmit as page[:after] or page[:before] option
-
ExploitBypass expr check; type cast accepts struct
-
ExecutionData layer inspect runs gadget protocol chain
-
ImpactExecute OS commands as BEAM user or inject SQL
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Persistence The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires an Ash+AshPostgres application where (1) a read action declares keyset? true in its pagination block, (2) the application passes a client-supplied value as the :after or :before page option, (3) the applied sort includes a field of type :ci_string, :map, :struct or :term, and (4) config :ash, :keyset_signing_secret is unset (the default on versions below 3.37.0). For full OS command execution, the specific gadget modules from ecto (demonstrated 3.14.3) and db_connection (2.10.2) must be loaded; the SQL-injection variant works across all four permissive sort types. Limiting factors: no limit from authentication or user interaction (PR:N/UI:N), but exploitation is blocked if a keyset_signing_secret is configured (available as a workaround on 3.37.0+), if the sort uses only strict types such as :integer, or if keyset pagination is not exposed to untrusted clients. |
| Impact | This is a genuine high-priority issue rather than an inflated CVSS score. The vendor CVSS 4.0 base is 8.9 with PR:N/UI:N, meaning no authentication and no user interaction, and full high impact to confidentiality, integrity and availability of both the vulnerable system (VC/VI/VA:H) and subsequent systems (SC/SI/SA:H) - consistent with OS command execution as the BEAM user plus SQL injection against the database. The strongest mitigating signal is AT:P (attack requirements present): exploitation depends on a specific, non-universal configuration (keyset pagination enabled, a sort field of a permissive type, signing secret unset, and for full RCE specific ecto/db_connection versions loaded). One signal conflicts: the vendor sets AV:L, yet the described trigger is a client-supplied pagination cursor (page[:after]/page[:before]) that in typical Ash deployments (e.g. GraphQL/JSON:API) is delivered over the network - AV:L appears to understate the vector; verify how pagination is exposed in the specific deployment. No EPSS score was provided and the CVE is not listed in CISA KEV, so there is no evidence of active exploitation; however a detailed proof-of-concept is published in the GHSA advisory and the vuln.today decision label is 'this_week'. Net: treat as a serious, patch-this-week vulnerability for any affected Ash+AshPostgres application that exposes keyset pagination on a qualifying sort field without a signing secret. |
| Exploit ScenarioDerived | An unauthenticated client sends a crafted keyset pagination cursor (page[:after] or page[:before]) containing a struct-wrapped value whose Inspect/Enumerable protocol chain through ecto and db_connection ultimately applies an attacker-named module, function and arguments, yielding OS command execution as the BEAM OS user; a variant embeds an Ash fragment to inject raw SQL into the WHERE clause. A detailed public PoC reference exists in the GHSA advisory (it is not verified as packaged working exploit code). It requires keyset pagination on a :ci_string/:map/:struct/:term sort field with the keyset signing secret unset (the default). |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 24, 2026
Unauthenticated attackers can turn a forged keyset pagination cursor into OS command execution or raw SQL injection in Elixir applications built on the Ash framework with the AshPostgres data layer. The flaw affects ash versions from 3.31.3 before 3.38.0 and requires a read action that enables keyset? pagination, passes a client-supplied :after or :before cursor, sorts on a :ci_string, :map, :struct or :term field, and runs with config :ash, :keyset_signing_secret unset (the default below 3.37.0). The vendor advisory publishes a detailed proof-of-concept procedure, but no confirmed working exploit package and no CISA KEV entry are associated with this CVE at time of analysis; the independently assessed severity is high (CVSS 8.9, network vector, no privileges or user interaction) and the vulnerability is triaged as this_week priority.
RemediationAI
Upgrade ash to 3.38.0 or later - the vendor-released patch, corresponding to fix commit 8da3fe5 (https://github.com/ash-project/ash/commit/8da3fe514975ac93682f8377c5439baefaf50bad) - which restores rejection of untrusted decoded cursors per the advisory at https://github.com/ash-project/ash/security/advisories/GHSA-m5v6-3qwf-6w9r. If immediate upgrade is impossible, on ash 3.37.0 or later set config :ash, keyset_signing_secret to a long random string so Ash rejects any unsigned cursor before decoding it; the trade-off is that all previously issued cursors become invalid and clients must restart pagination. That option does not exist before 3.37.0, so older deployments must upgrade or avoid the exposure entirely: stop passing client-supplied values as the :after/:before page options, restrict keyset-sorted fields to strict types such as :integer (non-strict :ci_string, :map, :struct and :term sorts remain exploitable), or disable keyset pagination on read actions reachable by untrusted clients. Note that the SQL-injection variant works regardless of the inspect/1 gadget chain, so removing ecto/db_connection modules from the load path is not a reliable mitigation.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Keyset cursors in Ash are Base64-encoded Erlang external terms produced by :erlang.term_to_binary/1 over a record's sort values. Ash.Page.Keyset.decode_values/3 reads client cursors through Ash.Helpers.non_executable_binary_to_term/2 with [:safe], which blocks funs and new atoms but still permits maps carrying a __struct__ key, so the client chooses the struct module of each decoded value; when no keyset_signing_secret is configured the cursor is entirely unauthenticated. The added check_no_expression/1 uses Ash.Expr.expr?/1, which returns true for expression structs but does not inspect the fields of a non-expression struct, so nested payloads pass. Casting against the sort field's type then lets structs through for the :ci_string, :map, :struct and :term types (Ash.Type.CiString returns any %Ash.CiString{} unchanged, and Map/Struct/Term accept arbitrary terms), while strict types such as :integer reject them. In do_filters/4 the surviving value becomes the right-hand side of a keyset comparison, and AshSql.Expr compiles an %Ash.CiString{} by treating its string field as a nested expression. Two consequences follow: a value that fails parameter encoding is handed to inspect/1, which executes the Inspect implementation of the attacker-selected struct, and an %Ecto.Query.DynamicExpr{} whose binding holds a %DBConnection.Stream{} drives DBConnection.reduce/3 to apply the attacker-supplied :log module, function and arguments from the struct's opts field, giving OS command execution with the BEAM user's privileges. Separately, an %Ash.Query.Function.Fragment{} with raw: arguments placed inside an %Ash.CiString{} is spliced as literal SQL text into the WHERE clause. Root causes map to CWE-502 (deserialization of untrusted data) and CWE-89 (SQL injection).
Know when Ash gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
Cursor is typically network-supplied so AV:N; AC:H for required permissive sort type and version-dependent gadget chain; PR:N unauthenticated; S:C as impact reaches OS and database.
Primary rating from Vendor (EEF).
CVSS VectorVendor: EEF
DescriptionCVE.org
Deserialization of Untrusted Data vulnerability in ash-project ash allows an unauthenticated attacker to execute arbitrary code or inject SQL through a forged keyset pagination cursor.
Ash.Page.Keyset.filter/4 in lib/ash/page/keyset.ex decodes the client-supplied page[:after] or page[:before] cursor from Erlang external term format and rejects decoded expressions with Ash.Expr.expr?/1. That check does not examine the fields of a struct. The cast of each value against the type of its sort field accepts structs for the :ci_string, :map, :struct and :term types. A struct in the cursor value for such a sort field therefore reaches the data layer. With AshPostgres, the read passes such a struct to inspect/1, which runs the Inspect implementation of the struct module that the attacker selected. A chain of struct modules from ecto and db_connection then calls a function that the cursor names, which permits OS command execution. An %Ash.Query.Function.Fragment{} inside an %Ash.CiString{} value is written into the SQL query as raw text.
This issue affects ash: from 3.31.3 before 3.38.0.
Executive ViewAI
The Ash framework for Elixir, specifically versions 3.31.3 through 3.37.x used with AshPostgres, contains a high-severity flaw that could allow unauthenticated attackers to execute OS commands or inject SQL when certain pagination features are enabled and cursor signing is not configured. This directly threatens any customer-facing Elixir application built on this stack, potentially leading to data breaches or system compromise, and requires immediate remediation.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
OS command injection occurs when an application passes unsanitized user input directly into system shell commands.
Insecure deserialization occurs when an application converts serialized data (a stream of bytes representing an object's state) back into a living object without proper validation.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Private argument injection in the Ash Elixir framework (versions 3.0.0 through 3.29.2) allows end users to set action ar
An issue was discovered in the ash crate before 0.33.1 for Rust. Rated critical severity (CVSS 9.8), this vulnerability
Atom table exhaustion in the Ash framework (Elixir) allows an unauthenticated remote attacker to crash a BEAM node by su
Cross-tenant record takeover in the Ash framework (Elixir) for versions 1.22.0 up to 3.37.2: when a resource uses attrib
An authorization bypass in the Ash framework (Elixir) lets authenticated, lower-privileged actors recover values they ar
Information disclosure in the Ash framework for Elixir (versions 2.6.0 up to but not including 3.34.6) lets an authentic
An incorrect authorization flaw in the Elixir Ash framework (versions 3.24.0 up to but not including 3.37.1) lets an aut
Persistent record-level denial of service in the ash Elixir resource framework (versions 3.6.3-3.32.1) lets any actor wh
Integer overflow in Ash Framework's vector encoding corrupts stored vectors in any Elixir application using Ash versions
CPU exhaustion in Ash Framework's string type constraint handler allows denial of service against Elixir applications th
Memory exhaustion via decompression bomb in Ash Framework's keyset pagination can terminate Erlang nodes running version
Unbounded string storage in Ash Framework versions 0.10.0 through 3.32.x allows unauthenticated attackers to bypass max_
EUVD-2026-133600
NVD
CVE.org
GitHub
Exploit-DB