Code execution and SQL injection via struct-wrapped values in a forged keyset pagination cursor in Ash
CVE-2026-124283Published 24 Nov 2026, 02:34 UTC
Real-world risk
2.1/ 10Low
Routine
If the vulnerable configuration applies to you: 4.8
PreliminaryFrom the CVSS vector only · confidence low
CVSS
8.9
scored by the vendor (CNA), CVSS 4.0
In plain words
No plain-language summary yet. The original description is below.
Original description (from EEF)
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.
Am I affected?
| Product | Affected versions (from the sources) | Fixed in |
|---|---|---|
| ashCommon | >= 3.31.3, < 3.38.0 | 3.38.0 |
What to do
Update to a fixed version: 3.38.0.
Why this score
| Factor | Value | Evidence | × |
|---|---|---|---|
| Impact | Full compromiseCode execution or full control of the system or application | From the CVSS vector | 1.00 |
| Attacker position | LocalMust already run code or have a shell on the machine | From the CVSS vector | 0.50 |
| Privileges needed | NoneNo account | From the CVSS vector | 1.00 |
| Victim interaction | NoneNothing | From the CVSS vector | 1.00 |
| Configuration | UncommonNeeds a non-default feature that a minority enables | From the CVSS vector | 0.45 |
| Reliability | ReliableDeterministic: injection, logic bug, path traversal | From the CVSS vector | 1.00 |
Threat level T3: Public proof of concept (× 0.95)
A qualifying GitHub proof of concept, an unverified Exploit-DB entry, CISA's SSVC says PoC, or a reference tagged as an exploit
- Reference tagged as exploit (link)
- CISA SSVC: proof of concept
EPSS 4.9% chance of exploitation in 30 days (percentile 92), as of 2026-12-03.
The arithmetic
- Prerequisites multiplied together0.225
- Threat T3: Public proof of concept0.950
- 10 × impact 1 × prerequisites 0.225 × threat 0.952.137
- Rounded to one decimal between 0.1 and 102.1
Exploitation and evidence timeline
- 24 Nov 2026 Published
- 3 Dec 2026 Reference tagged as exploit first seen
- 3 Dec 2026 CISA SSVC: proof of concept first seen
- 3 Dec 2026 Risk 2.1 (cvss fallback)
Weakness
CWE-89, CWE-502
References
- https://github.com/ash-project/ash/security/advisories/GHSA-m5v6-3qwf-6w9rexploit, related, vendor-advisory
- https://cna.erlef.org/cves/CVE-2026-124283.htmlrelated
- https://osv.dev/vulnerability/EEF-CVE-2026-124283related
- https://cna.erlef.org/cves/CVE-2026-67579.htmlrelated
- https://github.com/ash-project/ash/commit/91874dd5435bc0ffebd8a254acfa573b39b74520related
- https://github.com/ash-project/ash/commit/8da3fe514975ac93682f8377c5439baefaf50badpatch
- CVE-2026-124283 on CVE.org