Skip to content

ash

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?

ProductAffected versions (from the sources)Fixed in
ashCommon>= 3.31.3, < 3.38.03.38.0

What to do

Update to a fixed version: 3.38.0.

Why this score

FactorValueEvidence×
ImpactFull compromiseCode execution or full control of the system or applicationFrom the CVSS vector1.00
Attacker positionLocalMust already run code or have a shell on the machineFrom the CVSS vector0.50
Privileges neededNoneNo accountFrom the CVSS vector1.00
Victim interactionNoneNothingFrom the CVSS vector1.00
ConfigurationUncommonNeeds a non-default feature that a minority enablesFrom the CVSS vector0.45
ReliabilityReliableDeterministic: injection, logic bug, path traversalFrom the CVSS vector1.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
  1. Prerequisites multiplied together0.225
  2. Threat T3: Public proof of concept0.950
  3. 10 × impact 1 × prerequisites 0.225 × threat 0.952.137
  4. Rounded to one decimal between 0.1 and 102.1

How the score works

Exploitation and evidence timeline

  1. 24 Nov 2026 Published
  2. 3 Dec 2026 Reference tagged as exploit first seen
  3. 3 Dec 2026 CISA SSVC: proof of concept first seen
  4. 3 Dec 2026 Risk 2.1 (cvss fallback)

Weakness

CWE-89, CWE-502

References

Get alerts for ash

Free email or text alerts when a vulnerability in ash reaches risk 8 or higher. Nothing else.