Action not permitted
Modal body text goes here.
Modal Title
Modal Body
EUVD-2026-411868
European Vulnerability Database identifier assigned by ENISAReserved
2026-11-24 03:39
Assigner
ENISA
Alias of
a CVE record, shown under related vulnerabilities.
This identifier carries no description, severity or references of its own:
they belong to that CVE.
{
"assigner": "ENISA",
"date_reserved": "2026-11-24T03:39:58.916255+00:00",
"id": "EUVD-2026-411868"
}
CVE-2026-124283 (GCVE-0-2026-124283)
Vulnerability from cvelistv5 – Published: 2026-11-24 02:34 – Updated: 2026-11-24 18:19
VLAI
EPSS
VEX
Title
Code execution and SQL injection via struct-wrapped values in a forged keyset pagination cursor in Ash
Summary
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.
Severity
SSVC
Exploitation: poc
Automatable: no
Technical Impact: total
CISA Coordinator · CISA-ADP (v2.0.3)
Decision recorded 2026-11-24 18:18 UTC
CWE
Assigner
References
6 references
| URL | Tags |
|---|---|
| https://github.com/ash-project/ash/security/advis… | vendor-advisoryrelated |
| https://cna.erlef.org/cves/CVE-2026-124283.html | related |
| https://osv.dev/vulnerability/EEF-CVE-2026-124283 | related |
| https://cna.erlef.org/cves/CVE-2026-67579.html | related |
| https://github.com/ash-project/ash/commit/91874dd… | related |
| https://github.com/ash-project/ash/commit/8da3fe5… | patch |
Impacted products
2 products
| Vendor | Product | Version | |
|---|---|---|---|
| ash-project | ash |
Affected:
3.31.3 , < 3.38.0
(semver)
cpe:2.3:a:ash-project:ash:*:*:*:*:*:*:*:* |
|
| ash-project | ash |
Affected:
91874dd5435bc0ffebd8a254acfa573b39b74520 , < 8da3fe514975ac93682f8377c5439baefaf50bad
(git)
cpe:2.3:a:ash-project:ash:*:*:*:*:*:*:*:* |
Date Public
2026-11-24 02:34
{
"containers": {
"adp": [
{
"metrics": [
{
"other": {
"content": {
"id": "CVE-2026-124283",
"options": [
{
"Exploitation": "poc"
},
{
"Automatable": "no"
},
{
"Technical Impact": "total"
}
],
"role": "CISA Coordinator",
"timestamp": "2026-11-24T18:18:42.866795Z",
"version": "2.0.3"
},
"type": "ssvc"
}
}
],
"providerMetadata": {
"dateUpdated": "2026-11-24T18:19:09.008Z",
"orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"shortName": "CISA-ADP"
},
"references": [
{
"tags": [
"exploit"
],
"url": "https://github.com/ash-project/ash/security/advisories/GHSA-m5v6-3qwf-6w9r"
}
],
"title": "CISA ADP Vulnrichment"
}
],
"cna": {
"affected": [
{
"collectionURL": "https://repo.hex.pm",
"cpes": [
"cpe:2.3:a:ash-project:ash:*:*:*:*:*:*:*:*"
],
"defaultStatus": "unaffected",
"modules": [
"\u0027Elixir.Ash.Page.Keyset\u0027",
"\u0027Elixir.Ash.Expr\u0027",
"\u0027Elixir.Ash.Type.CiString\u0027"
],
"packageName": "ash",
"packageURL": "pkg:hex/ash",
"product": "ash",
"programFiles": [
"lib/ash/page/keyset.ex",
"lib/ash/expr/expr.ex",
"lib/ash/type/ci_string.ex"
],
"programRoutines": [
{
"name": "\u0027Elixir.Ash.Page.Keyset\u0027:filter/4"
},
{
"name": "\u0027Elixir.Ash.Expr\u0027:\u0027expr?\u0027/1"
},
{
"name": "\u0027Elixir.Ash.Type.CiString\u0027:cast_input/2"
}
],
"repo": "https://github.com/ash-project/ash",
"vendor": "ash-project",
"versions": [
{
"lessThan": "3.38.0",
"status": "affected",
"version": "3.31.3",
"versionType": "semver"
}
]
},
{
"collectionURL": "https://github.com",
"cpes": [
"cpe:2.3:a:ash-project:ash:*:*:*:*:*:*:*:*"
],
"defaultStatus": "unaffected",
"modules": [
"\u0027Elixir.Ash.Page.Keyset\u0027",
"\u0027Elixir.Ash.Expr\u0027",
"\u0027Elixir.Ash.Type.CiString\u0027"
],
"packageName": "ash-project/ash",
"packageURL": "pkg:github/ash-project/ash",
"product": "ash",
"programFiles": [
"lib/ash/page/keyset.ex",
"lib/ash/expr/expr.ex",
"lib/ash/type/ci_string.ex"
],
"programRoutines": [
{
"name": "\u0027Elixir.Ash.Page.Keyset\u0027:filter/4"
},
{
"name": "\u0027Elixir.Ash.Expr\u0027:\u0027expr?\u0027/1"
},
{
"name": "\u0027Elixir.Ash.Type.CiString\u0027:cast_input/2"
}
],
"repo": "https://github.com/ash-project/ash",
"vendor": "ash-project",
"versions": [
{
"lessThan": "8da3fe514975ac93682f8377c5439baefaf50bad",
"status": "affected",
"version": "91874dd5435bc0ffebd8a254acfa573b39b74520",
"versionType": "git"
}
]
}
],
"configurations": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/html",
"value": "\u003cp\u003eA read action must declare \u003ccode\u003ekeyset? true\u003c/code\u003e in its \u003ccode\u003epagination\u003c/code\u003e block, and the application must pass a client-supplied value as the \u003ccode\u003e:after\u003c/code\u003e or \u003ccode\u003e:before\u003c/code\u003e page option. The sort must include a field of type \u003ccode\u003e:ci_string\u003c/code\u003e, \u003ccode\u003e:map\u003c/code\u003e, \u003ccode\u003e:struct\u003c/code\u003e or \u003ccode\u003e:term\u003c/code\u003e. \u003ccode\u003econfig :ash, :keyset_signing_secret\u003c/code\u003e must be unset, which is the default. Both results were demonstrated with the AshPostgres data layer. The code execution was demonstrated with \u003ccode\u003eecto\u003c/code\u003e 3.14.3 and \u003ccode\u003edb_connection\u003c/code\u003e 2.10.2 loaded.\u003c/p\u003e"
},
{
"base64": false,
"type": "text/markdown",
"value": "A read action must declare `keyset? true` in its `pagination` block, and the application must pass a client-supplied value as the `:after` or `:before` page option. The sort must include a field of type `:ci_string`, `:map`, `:struct` or `:term`. `config :ash, :keyset_signing_secret` must be unset, which is the default. Both results were demonstrated with the AshPostgres data layer. The code execution was demonstrated with `ecto` 3.14.3 and `db_connection` 2.10.2 loaded."
}
],
"value": "A read action must declare keyset? true in its pagination block, and the application must pass a client-supplied value as the :after or :before page option. The sort must include a field of type :ci_string, :map, :struct or :term. config :ash, :keyset_signing_secret must be unset, which is the default. Both results were demonstrated with the AshPostgres data layer. The code execution was demonstrated with ecto 3.14.3 and db_connection 2.10.2 loaded."
}
],
"cpeApplicability": [
{
"nodes": [
{
"cpeMatch": [
{
"criteria": "cpe:2.3:a:ash-project:ash:*:*:*:*:*:*:*:*",
"versionEndExcluding": "3.38.0",
"versionStartIncluding": "3.31.3",
"vulnerable": true
}
],
"negate": false,
"operator": "OR"
}
],
"operator": "AND"
}
],
"credits": [
{
"lang": "en",
"type": "finder",
"value": "Jonatan M\u00e4nnchen / EEF"
},
{
"lang": "en",
"type": "reporter",
"value": "Jonatan M\u00e4nnchen / EEF"
},
{
"lang": "en",
"type": "coordinator",
"value": "Jonatan M\u00e4nnchen / EEF"
},
{
"lang": "en",
"type": "remediation developer",
"value": "Zach Daniel"
}
],
"dateAssigned": "2026-11-24T00:51:47.000Z",
"datePublic": "2026-11-24T02:34:32.000Z",
"descriptions": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/html",
"value": "\u003cp\u003eDeserialization 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.\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003eAsh.Page.Keyset.filter/4\u003c/code\u003e in \u003ccode\u003elib/ash/page/keyset.ex\u003c/code\u003e decodes the client-supplied \u003ccode\u003epage[:after]\u003c/code\u003e or \u003ccode\u003epage[:before]\u003c/code\u003e cursor from Erlang external term format and rejects decoded expressions with \u003ccode\u003eAsh.Expr.expr?/1\u003c/code\u003e. 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 \u003ccode\u003e:ci_string\u003c/code\u003e, \u003ccode\u003e:map\u003c/code\u003e, \u003ccode\u003e:struct\u003c/code\u003e and \u003ccode\u003e:term\u003c/code\u003e 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 \u003ccode\u003einspect/1\u003c/code\u003e, which runs the \u003ccode\u003eInspect\u003c/code\u003e implementation of the struct module that the attacker selected. A chain of struct modules from \u003ccode\u003eecto\u003c/code\u003e and \u003ccode\u003edb_connection\u003c/code\u003e then calls a function that the cursor names, which permits OS command execution. An \u003ccode\u003e%Ash.Query.Function.Fragment{}\u003c/code\u003e inside an \u003ccode\u003e%Ash.CiString{}\u003c/code\u003e value is written into the SQL query as raw text.\u003c/p\u003e\n\u003cp\u003eThis issue affects ash: from 3.31.3 before 3.38.0.\u003c/p\u003e"
},
{
"base64": false,
"type": "text/markdown",
"value": "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.\n\n`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.\n\nThis issue affects ash: from 3.31.3 before 3.38.0."
}
],
"value": "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.\n\nAsh.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.\n\nThis issue affects ash: from 3.31.3 before 3.38.0."
}
],
"impacts": [
{
"capecId": "CAPEC-586",
"descriptions": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/html",
"value": "\u003cp\u003eAn unauthenticated client that can supply a keyset cursor selects the struct modules of the decoded values. Through protocol implementations in \u003ccode\u003eecto\u003c/code\u003e and \u003ccode\u003edb_connection\u003c/code\u003e, the client makes the application call a function of its choice, and can execute OS commands with the privileges of the BEAM OS user.\u003c/p\u003e"
},
{
"base64": false,
"type": "text/markdown",
"value": "An unauthenticated client that can supply a keyset cursor selects the struct modules of the decoded values. Through protocol implementations in `ecto` and `db_connection`, the client makes the application call a function of its choice, and can execute OS commands with the privileges of the BEAM OS user."
}
],
"value": "An unauthenticated client that can supply a keyset cursor selects the struct modules of the decoded values. Through protocol implementations in ecto and db_connection, the client makes the application call a function of its choice, and can execute OS commands with the privileges of the BEAM OS user."
}
]
},
{
"capecId": "CAPEC-66",
"descriptions": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/html",
"value": "\u003cp\u003eAn unauthenticated client that can supply a keyset cursor adds SQL text to the query of the read action. The text runs with the database privileges of the application.\u003c/p\u003e"
},
{
"base64": false,
"type": "text/markdown",
"value": "An unauthenticated client that can supply a keyset cursor adds SQL text to the query of the read action. The text runs with the database privileges of the application."
}
],
"value": "An unauthenticated client that can supply a keyset cursor adds SQL text to the query of the read action. The text runs with the database privileges of the application."
}
]
}
],
"metrics": [
{
"cvssV4_0": {
"Automatable": "NOT_DEFINED",
"Recovery": "NOT_DEFINED",
"Safety": "NOT_DEFINED",
"attackComplexity": "LOW",
"attackRequirements": "PRESENT",
"attackVector": "LOCAL",
"baseScore": 8.9,
"baseSeverity": "HIGH",
"privilegesRequired": "NONE",
"providerUrgency": "NOT_DEFINED",
"subAvailabilityImpact": "HIGH",
"subConfidentialityImpact": "HIGH",
"subIntegrityImpact": "HIGH",
"userInteraction": "NONE",
"valueDensity": "NOT_DEFINED",
"vectorString": "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",
"version": "4.0",
"vulnAvailabilityImpact": "HIGH",
"vulnConfidentialityImpact": "HIGH",
"vulnIntegrityImpact": "HIGH",
"vulnerabilityResponseEffort": "NOT_DEFINED"
},
"format": "CVSS",
"scenarios": [
{
"lang": "en",
"value": "GENERAL"
}
]
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-89",
"description": "CWE-89 Improper Neutralization of Special Elements used in an SQL Command",
"lang": "en",
"type": "CWE"
}
]
},
{
"descriptions": [
{
"cweId": "CWE-502",
"description": "CWE-502 Deserialization of Untrusted Data",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-11-24T04:37:51.717Z",
"orgId": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
"shortName": "EEF"
},
"references": [
{
"name": "Code execution and SQL injection via struct-wrapped values in a forged keyset pagination cursor in Ash",
"tags": [
"vendor-advisory",
"related"
],
"url": "https://github.com/ash-project/ash/security/advisories/GHSA-m5v6-3qwf-6w9r"
},
{
"name": "EEF CNA record for CVE-2026-124283",
"tags": [
"related"
],
"url": "https://cna.erlef.org/cves/CVE-2026-124283.html"
},
{
"name": "OSV record EEF-CVE-2026-124283",
"tags": [
"related"
],
"url": "https://osv.dev/vulnerability/EEF-CVE-2026-124283"
},
{
"name": "CVE-2026-67579",
"tags": [
"related"
],
"url": "https://cna.erlef.org/cves/CVE-2026-67579.html"
},
{
"name": "Introducing commit 91874dd in ash-project/ash",
"tags": [
"related"
],
"url": "https://github.com/ash-project/ash/commit/91874dd5435bc0ffebd8a254acfa573b39b74520"
},
{
"name": "Fix commit 8da3fe5 in ash-project/ash",
"tags": [
"patch"
],
"url": "https://github.com/ash-project/ash/commit/8da3fe514975ac93682f8377c5439baefaf50bad"
}
],
"source": {
"discovery": "INTERNAL"
},
"title": "Code execution and SQL injection via struct-wrapped values in a forged keyset pagination cursor in Ash",
"workarounds": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/html",
"value": "\u003cp\u003eOn ash 3.37.0 or later, set \u003ccode\u003econfig :ash, keyset_signing_secret\u003c/code\u003e 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.\u003c/p\u003e"
},
{
"base64": false,
"type": "text/markdown",
"value": "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."
}
],
"value": "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."
}
],
"x_proofOfConcept": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/html",
"value": "\u003col\u003e\n\u003cli\u003eDefine an AshPostgres resource with a \u003ccode\u003e:ci_string\u003c/code\u003e attribute and a read action with \u003ccode\u003epagination keyset?: true\u003c/code\u003e. Leave \u003ccode\u003ekeyset_signing_secret\u003c/code\u003e unset.\u003c/li\u003e\n\u003cli\u003eRead one page sorted on the \u003ccode\u003e:ci_string\u003c/code\u003e attribute and decode the \u003ccode\u003ekeyset\u003c/code\u003e of a record with \u003ccode\u003eBase.decode64!/1\u003c/code\u003e and \u003ccode\u003e:erlang.binary_to_term/1\u003c/code\u003e. The term is a list with the \u003ccode\u003e%Ash.CiString{}\u003c/code\u003e sort value and the primary key.\u003c/li\u003e\n\u003cli\u003eBuild an \u003ccode\u003e%Ecto.Query.DynamicExpr{}\u003c/code\u003e whose \u003ccode\u003ebinding\u003c/code\u003e field is a \u003ccode\u003e%DBConnection.Stream{}\u003c/code\u003e. Set the \u003ccode\u003equery\u003c/code\u003e field of the stream to an atom, and put a \u003ccode\u003e:log\u003c/code\u003e entry with a module, function and argument list into its \u003ccode\u003eopts\u003c/code\u003e field.\u003c/li\u003e\n\u003cli\u003eReplace the first element of the list with an \u003ccode\u003e%Ash.CiString{}\u003c/code\u003e whose \u003ccode\u003estring\u003c/code\u003e field is a one-element tuple that holds the struct from step 3.\u003c/li\u003e\n\u003cli\u003eEncode the list with \u003ccode\u003e:erlang.term_to_binary/1\u003c/code\u003e and \u003ccode\u003eBase.encode64/1\u003c/code\u003e, and pass the result as \u003ccode\u003epage: [after: cursor]\u003c/code\u003e to the same read.\u003c/li\u003e\n\u003cli\u003eThe read returns an invalid filter value error. Before it returns, the application calls the function from the \u003ccode\u003e:log\u003c/code\u003e entry.\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003eFor the SQL injection, use an \u003ccode\u003e%Ash.Query.Function.Fragment{}\u003c/code\u003e with \u003ccode\u003eraw:\u003c/code\u003e arguments as the \u003ccode\u003estring\u003c/code\u003e field in step 4. The read succeeds, and the query contains the raw text in the \u003ccode\u003eWHERE\u003c/code\u003e clause.\u003c/p\u003e"
},
{
"base64": false,
"type": "text/markdown",
"value": "1. Define an AshPostgres resource with a `:ci_string` attribute and a read action with `pagination keyset?: true`. Leave `keyset_signing_secret` unset.\n2. Read one page sorted on the `:ci_string` attribute and decode the `keyset` of a record with `Base.decode64!/1` and `:erlang.binary_to_term/1`. The term is a list with the `%Ash.CiString{}` sort value and the primary key.\n3. Build an `%Ecto.Query.DynamicExpr{}` whose `binding` field is a `%DBConnection.Stream{}`. Set the `query` field of the stream to an atom, and put a `:log` entry with a module, function and argument list into its `opts` field.\n4. Replace the first element of the list with an `%Ash.CiString{}` whose `string` field is a one-element tuple that holds the struct from step 3.\n5. Encode the list with `:erlang.term_to_binary/1` and `Base.encode64/1`, and pass the result as `page: [after: cursor]` to the same read.\n6. The read returns an invalid filter value error. Before it returns, the application calls the function from the `:log` entry.\n\nFor the SQL injection, use an `%Ash.Query.Function.Fragment{}` with `raw:` arguments as the `string` field in step 4. The read succeeds, and the query contains the raw text in the `WHERE` clause."
}
],
"value": "* Define an AshPostgres resource with a :ci_string attribute and a read action with pagination keyset?: true. Leave keyset_signing_secret unset.\n* Read one page sorted on the :ci_string attribute and decode the keyset of a record with Base.decode64!/1 and :erlang.binary_to_term/1. The term is a list with the %Ash.CiString{} sort value and the primary key.\n* Build an %Ecto.Query.DynamicExpr{} whose binding field is a %DBConnection.Stream{}. Set the query field of the stream to an atom, and put a :log entry with a module, function and argument list into its opts field.\n* Replace the first element of the list with an %Ash.CiString{} whose string field is a one-element tuple that holds the struct from step 3.\n* Encode the list with :erlang.term_to_binary/1 and Base.encode64/1, and pass the result as page: [after: cursor] to the same read.\n* The read returns an invalid filter value error. Before it returns, the application calls the function from the :log entry.\n\nFor the SQL injection, use an %Ash.Query.Function.Fragment{} with raw: arguments as the string field in step 4. The read succeeds, and the query contains the raw text in the WHERE clause."
}
],
"x_technicalAnalysis": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/html",
"value": "\u003cp\u003e\u003cstrong\u003e1. Cursor decoding\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eA keyset cursor is the Base64 form of \u003ccode\u003e:erlang.term_to_binary/1\u003c/code\u003e over the list of sort values of one record. \u003ccode\u003edecode_values/3\u003c/code\u003e in \u003ccode\u003elib/ash/page/keyset.ex\u003c/code\u003e decodes a client-supplied cursor with \u003ccode\u003eAsh.Helpers.non_executable_binary_to_term/2\u003c/code\u003e and \u003ccode\u003e[:safe]\u003c/code\u003e. This refuses functions and new atoms. It accepts a map with a \u003ccode\u003e__struct__\u003c/code\u003e key, so the client selects the struct module of each decoded value. When \u003ccode\u003ekeyset_signing_secret\u003c/code\u003e is unset, Ash does not authenticate the cursor.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003e2. Expression check\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003echeck_no_expression/1\u003c/code\u003e calls \u003ccode\u003eAsh.Expr.expr?/1\u003c/code\u003e on the decoded term. \u003ccode\u003eAsh.Expr.expr?/1\u003c/code\u003e in \u003ccode\u003elib/ash/expr/expr.ex\u003c/code\u003e returns \u003ccode\u003etrue\u003c/code\u003e for expression structs and descends into lists, tuples and maps that are not structs. For a struct that is not an expression it returns \u003ccode\u003efalse\u003c/code\u003e and does not examine the fields. Such a struct passes the check, and so does any value inside it.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003e3. Type cast\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003ecast_values/3\u003c/code\u003e casts each decoded value with \u003ccode\u003eAsh.Type.cast_input/3\u003c/code\u003e against the type of its sort field. Strict types such as \u003ccode\u003e:integer\u003c/code\u003e reject a struct. Four built-in types accept one. \u003ccode\u003eAsh.Type.CiString.cast_input/2\u003c/code\u003e returns any \u003ccode\u003e%Ash.CiString{}\u003c/code\u003e unchanged, and its \u003ccode\u003estring\u003c/code\u003e field can hold any term. \u003ccode\u003eAsh.Type.Map.cast_input/2\u003c/code\u003e and \u003ccode\u003eAsh.Type.Struct.cast_input/2\u003c/code\u003e accept any map, which includes any struct. \u003ccode\u003eAsh.Type.Term.cast_input/2\u003c/code\u003e accepts any term.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003e4. Query construction\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003edo_filters/4\u003c/code\u003e puts the value into the keyset filter as the right side of a comparison with the sort field. In \u003ccode\u003eash_sql\u003c/code\u003e, the clause of \u003ccode\u003eAshSql.Expr\u003c/code\u003e for an \u003ccode\u003e%Ash.CiString{}\u003c/code\u003e value compiles the \u003ccode\u003estring\u003c/code\u003e field as a nested expression.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003e5. Code execution\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eA value that holds a struct inside a map, or inside a tuple in an \u003ccode\u003e%Ash.CiString{}\u003c/code\u003e, becomes a query parameter. Parameter encoding fails, and the read passes the value to \u003ccode\u003einspect/1\u003c/code\u003e before \u003ccode\u003eAsh.read/2\u003c/code\u003e returns. \u003ccode\u003einspect/1\u003c/code\u003e runs the \u003ccode\u003eInspect\u003c/code\u003e implementation of each struct module in the value. An \u003ccode\u003e%Ecto.Query.DynamicExpr{}\u003c/code\u003e whose \u003ccode\u003ebinding\u003c/code\u003e field holds a \u003ccode\u003e%DBConnection.Stream{}\u003c/code\u003e makes \u003ccode\u003eInspect\u003c/code\u003e call \u003ccode\u003eEnum.map/2\u003c/code\u003e on the stream. The \u003ccode\u003eEnumerable\u003c/code\u003e implementation of \u003ccode\u003eDBConnection.Stream\u003c/code\u003e calls \u003ccode\u003eDBConnection.reduce/3\u003c/code\u003e, which applies the \u003ccode\u003e:log\u003c/code\u003e module, function and arguments from the \u003ccode\u003eopts\u003c/code\u003e field of the struct. The cursor supplies that field. A function from the OTP standard library that applies a further module, function and argument list makes the call fully attacker-controlled, which includes OS command execution.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003e6. SQL injection\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eAn \u003ccode\u003e%Ash.CiString{}\u003c/code\u003e whose \u003ccode\u003estring\u003c/code\u003e field holds an \u003ccode\u003e%Ash.Query.Function.Fragment{}\u003c/code\u003e with \u003ccode\u003eraw:\u003c/code\u003e arguments becomes literal SQL text in the \u003ccode\u003eWHERE\u003c/code\u003e clause. This works for each of the four types, because each accepts the \u003ccode\u003e%Ash.CiString{}\u003c/code\u003e struct.\u003c/p\u003e"
},
{
"base64": false,
"type": "text/markdown",
"value": "**1. Cursor decoding**\n\nA keyset cursor is the Base64 form of `:erlang.term_to_binary/1` over the list of sort values of one record. `decode_values/3` in `lib/ash/page/keyset.ex` decodes a client-supplied cursor with `Ash.Helpers.non_executable_binary_to_term/2` and `[:safe]`. This refuses functions and new atoms. It accepts a map with a `__struct__` key, so the client selects the struct module of each decoded value. When `keyset_signing_secret` is unset, Ash does not authenticate the cursor.\n\n**2. Expression check**\n\n`check_no_expression/1` calls `Ash.Expr.expr?/1` on the decoded term. `Ash.Expr.expr?/1` in `lib/ash/expr/expr.ex` returns `true` for expression structs and descends into lists, tuples and maps that are not structs. For a struct that is not an expression it returns `false` and does not examine the fields. Such a struct passes the check, and so does any value inside it.\n\n**3. Type cast**\n\n`cast_values/3` casts each decoded value with `Ash.Type.cast_input/3` against the type of its sort field. Strict types such as `:integer` reject a struct. Four built-in types accept one. `Ash.Type.CiString.cast_input/2` returns any `%Ash.CiString{}` unchanged, and its `string` field can hold any term. `Ash.Type.Map.cast_input/2` and `Ash.Type.Struct.cast_input/2` accept any map, which includes any struct. `Ash.Type.Term.cast_input/2` accepts any term.\n\n**4. Query construction**\n\n`do_filters/4` puts the value into the keyset filter as the right side of a comparison with the sort field. In `ash_sql`, the clause of `AshSql.Expr` for an `%Ash.CiString{}` value compiles the `string` field as a nested expression.\n\n**5. Code execution**\n\nA value that holds a struct inside a map, or inside a tuple in an `%Ash.CiString{}`, becomes a query parameter. Parameter encoding fails, and the read passes the value to `inspect/1` before `Ash.read/2` returns. `inspect/1` runs the `Inspect` implementation of each struct module in the value. An `%Ecto.Query.DynamicExpr{}` whose `binding` field holds a `%DBConnection.Stream{}` makes `Inspect` call `Enum.map/2` on the stream. The `Enumerable` implementation of `DBConnection.Stream` calls `DBConnection.reduce/3`, which applies the `:log` module, function and arguments from the `opts` field of the struct. The cursor supplies that field. A function from the OTP standard library that applies a further module, function and argument list makes the call fully attacker-controlled, which includes OS command execution.\n\n**6. SQL injection**\n\nAn `%Ash.CiString{}` whose `string` field holds an `%Ash.Query.Function.Fragment{}` with `raw:` arguments becomes literal SQL text in the `WHERE` clause. This works for each of the four types, because each accepts the `%Ash.CiString{}` struct."
}
],
"value": "1. Cursor decoding\n\nA keyset cursor is the Base64 form of :erlang.term_to_binary/1 over the list of sort values of one record. decode_values/3 in lib/ash/page/keyset.ex decodes a client-supplied cursor with Ash.Helpers.non_executable_binary_to_term/2 and [:safe]. This refuses functions and new atoms. It accepts a map with a __struct__ key, so the client selects the struct module of each decoded value. When keyset_signing_secret is unset, Ash does not authenticate the cursor.\n\n2. Expression check\n\ncheck_no_expression/1 calls Ash.Expr.expr?/1 on the decoded term. Ash.Expr.expr?/1 in lib/ash/expr/expr.ex returns true for expression structs and descends into lists, tuples and maps that are not structs. For a struct that is not an expression it returns false and does not examine the fields. Such a struct passes the check, and so does any value inside it.\n\n3. Type cast\n\ncast_values/3 casts each decoded value with Ash.Type.cast_input/3 against the type of its sort field. Strict types such as :integer reject a struct. Four built-in types accept one. Ash.Type.CiString.cast_input/2 returns any %Ash.CiString{} unchanged, and its string field can hold any term. Ash.Type.Map.cast_input/2 and Ash.Type.Struct.cast_input/2 accept any map, which includes any struct. Ash.Type.Term.cast_input/2 accepts any term.\n\n4. Query construction\n\ndo_filters/4 puts the value into the keyset filter as the right side of a comparison with the sort field. In ash_sql, the clause of AshSql.Expr for an %Ash.CiString{} value compiles the string field as a nested expression.\n\n5. Code execution\n\nA value that holds a struct inside a map, or inside a tuple in an %Ash.CiString{}, becomes a query parameter. Parameter encoding fails, and the read passes the value to inspect/1 before Ash.read/2 returns. inspect/1 runs the Inspect implementation of each struct module in the value. An %Ecto.Query.DynamicExpr{} whose binding field holds a %DBConnection.Stream{} makes Inspect call Enum.map/2 on the stream. The Enumerable implementation of DBConnection.Stream calls DBConnection.reduce/3, which applies the :log module, function and arguments from the opts field of the struct. The cursor supplies that field. A function from the OTP standard library that applies a further module, function and argument list makes the call fully attacker-controlled, which includes OS command execution.\n\n6. SQL injection\n\nAn %Ash.CiString{} whose string field holds an %Ash.Query.Function.Fragment{} with raw: arguments becomes literal SQL text in the WHERE clause. This works for each of the four types, because each accepts the %Ash.CiString{} struct."
}
]
}
},
"cveMetadata": {
"assignerOrgId": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
"assignerShortName": "EEF",
"cveId": "CVE-2026-124283",
"datePublished": "2026-11-24T02:34:31.916Z",
"dateReserved": "2026-11-23T21:43:54.819Z",
"dateUpdated": "2026-11-24T18:19:09.008Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
Loading…
Trend slope:
-
(linear fit over daily sighting counts)
Show additional events:
Loading…
Experimental. This forecast is provided for visualization only and may change without notice. Do not use it for operational decisions.
Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…
The MITRE ATT&CK techniques below are AI-generated suggestions, inferred from the description of the
vulnerability by the CIRCL/vulnerability-attack-technique-classification-roberta-base
model, served locally by ML-Gateway.
They have not been verified by an analyst and are provided for guidance only.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Loading…
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.
Loading…
Loading…