# CVE-2026-124283: Code execution and SQL injection via struct-wrapped values in a forged keyset pagination cursor in Ash

- **Severity:** HIGH 8.9
- **CVSS:** 8.9 (v4.0, CNA) `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`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Attack requirements: Present; Privileges required: None; User interaction: None; Confidentiality impact: High; Integrity impact: High; Availability impact: High; Confidentiality impact on other systems: High; Integrity impact on other systems: High; Availability impact on other systems: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 1.09% (percentile 65, 2026-11-28)
- **CWE:** CWE-89, CWE-502
- **Published:** 2026-11-24T02:34:31.916Z
- **Modified:** 2026-11-24T19:18:04.570Z

## Who should check

- Anyone running ash-project ash \>= 3.31.3, \< 3.38.0
- Anyone running ash-project ash \>= 91874dd5435bc0ffebd8a254acfa573b39b74520, \< 8da3fe514975ac93682f8377c5439baefaf50bad

## Description

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.

## Affected and fixed versions

- ash-project ash: \>= 3.31.3, \< 3.38.0 (cvelist)
- ash-project ash: \>= 91874dd5435bc0ffebd8a254acfa573b39b74520, \< 8da3fe514975ac93682f8377c5439baefaf50bad (cvelist)

## Mitigation

- Upgrade ash to 3.38.0 or later.
- Upgrade ash to 8da3fe514975ac93682f8377c5439baefaf50bad or later.
- Vendor workaround: On ash 3.37.0 or later, set config :ash, keyset\_signing\_secret to a long random string. Ash then rejects each cursor that it did not sign, before it decodes the cursor. Cursors issued before the change become invalid.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-124283. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-124283.md
Affected: ash-project ash >= 3.31.3, < 3.38.0; ash-project ash >= 91874dd5435bc0ffebd8a254acfa573b39b74520, < 8da3fe514975ac93682f8377c5439baefaf50bad
Fixed in: ash-project ash 3.38.0, ash-project ash 8da3fe514975ac93682f8377c5439baefaf50bad

Steps:
1. Search this machine and project for ash-project ash: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-124283 being exploited?

There is no confirmed exploitation: CVE-2026-124283 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.09% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-124283?

High: CVSS 8.9 (v4.0, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2026-124283?

ash-project ash \>= 3.31.3, \< 3.38.0; ash-project ash \>= 91874dd5435bc0ffebd8a254acfa573b39b74520, \< 8da3fe514975ac93682f8377c5439baefaf50bad.

### Is there a fix for CVE-2026-124283?

Yes. Fixed in ash-project ash 3.38.0, ash-project ash 8da3fe514975ac93682f8377c5439baefaf50bad. Upgrade ash to 3.38.0 or later. Upgrade ash to 8da3fe514975ac93682f8377c5439baefaf50bad or later. Vendor workaround: On ash 3.37.0 or later, set config :ash, keyset\_signing\_secret to a long random string. Ash then rejects each cursor that it did not sign, before it decodes the cursor. Cursors issued before the change become invalid.

### How do I check if I'm affected by CVE-2026-124283?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/ash-project/ash/security/advisories/GHSA-m5v6-3qwf-6w9r>
- patch: <https://github.com/ash-project/ash/commit/91874dd5435bc0ffebd8a254acfa573b39b74520>
- patch: <https://github.com/ash-project/ash/commit/8da3fe514975ac93682f8377c5439baefaf50bad>
- other: <https://cna.erlef.org/cves/CVE-2026-124283.html>
- other: <https://osv.dev/vulnerability/EEF-CVE-2026-124283>
- other: <https://cna.erlef.org/cves/CVE-2026-67579.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-124283>
- FIRST EPSS: EPSS scores by FIRST <https://www.first.org/epss/>

HTML: <https://flawdb.com/CVE-2026-124283> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-124283>
