CVE-2026-120299
JSON

2.1low

Ash.Type.Keyword casts client input as trusted stored data, bypassing the input validation of its field types

Severity
2.1low CVSS:4.0 by EEF
Exploit likelihood
0.25% (higher than 17% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
EEF
Also known as
EEF-CVE-2026-120299GHSA-rwmx-99mc-qr2x

Description

Improper Input Validation vulnerability in ash-project ash allows an attacker to bypass the input validation of the field types of a :keyword attribute or argument. Ash.Type.Keyword.cast_input/2 in lib/ash/type/keyword.ex converts a map input to a keyword list in try_map_to_keyword/2, which casts each declared field with Ash.Type.cast_stored/3. That function is meant for trusted values read back from the data layer, so client input skips the cast_input/2 of each field type. apply_constraints/2 casts the result again with cast_input/2, but most types accept a value of their own type unchanged. An embedded resource field is built without its create action, so its validations and changes do not run and its non-public attributes can be set. A :function field accepts a capture string such as &Mod.fun/1, and a :term field decodes Erlang external term format. This issue affects ash: from 3.24.0 before 3.38.1.

Affected

Product or packageVersionsReported by
ashfrom 3.24.0 before 3.38.1CVE List
ash-project/ashfrom 71b709232454cff3ca23286c2a6b39a486bc8640 before 97a0a6061bebc2d4f7ebb40928f94a0ac734e498CVE List
ash (Hex)from 3.24.0 before 3.38.1Erlang Ecosystem Foundation
https://github.com/ash-project/ashfrom 71b709232454cff3ca23286c2a6b39a486bc8640 before 97a0a6061bebc2d4f7ebb40928f94a0ac734e498Erlang Ecosystem Foundation

All scores

EEF2.1low CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
Erlang Ecosystem FoundationNot scored CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N

Classification

CWE-20

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

Improper Input Validation vulnerability in ash-project ash allows an attacker to bypass the input validation of the field types of a :keyword attribute or argument. Ash.Type.Keyword.cast_input/2 in lib/ash/type/keyword.ex converts a map input to a keyword list in try_map_to_keyword/2, which casts each declared field with Ash.Type.cast_stored/3. That function is meant for trusted values read back from the data layer, so client input skips the cast_input/2 of each field type. apply_constraints/2 casts the result again with cast_input/2, but most types accept a value of their own type unchanged. An embedded resource field is built without its create action, so its validations and changes do not run and its non-public attributes can be set. A :function field accepts a capture string such as &Mod.fun/1, and a :term field decodes Erlang external term format. This issue affects ash: from 3.24.0 before 3.38.1.

Erlang Ecosystem Foundation

Summary

Improper Input Validation vulnerability in ash-project ash allows an attacker to bypass the input validation of the field types of a :keyword attribute or argument.

Ash.Type.Keyword.cast_input/2 in lib/ash/type/keyword.ex converts a map input to a keyword list in try_map_to_keyword/2, which casts each declared field with Ash.Type.cast_stored/3. That function is meant for trusted values read back from the data layer, so client input skips the cast_input/2 of each field type. apply_constraints/2 casts the result again with cast_input/2, but most types accept a value of their own type unchanged. An embedded resource field is built without its create action, so its validations and changes do not run and its non-public attributes can be set. A :function field accepts a capture string such as &Mod.fun/1, and a :term field decodes Erlang external term format.

This issue affects ash: from 3.24.0 before 3.38.1.

Impact

A client that can set a :keyword attribute or argument stores field values that the field type's input casting would reject, such as an embedded resource that skipped its create action and validations.

Configurations

Reachable when a :keyword attribute or argument that accepts client input declares fields, the client sends it as a map (or a JSON string), and one of the field types casts stored values more loosely than input, such as an embedded resource, :function or :term.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-120299 changed 2026-12-01CVE Terms of Use
Erlang Ecosystem FoundationEEF-CVE-2026-120299 changed 2026-11-25CC-BY-4.0
NVDCVE-2026-120299 changed 2026-12-01Public domain