{"id":"EEF-CVE-2026-120299","summary":"Ash.Type.Keyword casts client input as trusted stored data, bypassing the input validation of its field types","details":"## Summary\n\nImproper 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.\n\n`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.\n\nThis issue affects ash: from 3.24.0 before 3.38.1.\n\n## Impact\n\nA 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.\n\n## Configurations\n\nReachable 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`.","aliases":["GHSA-rwmx-99mc-qr2x","CVE-2026-120299"],"modified":"2026-11-24T13:15:02.921843731Z","published":"2026-11-24T13:13:20.054Z","database_specific":{"capec_ids":["CAPEC-153"],"cpe_ids":["cpe:2.3:a:ash-project:ash:*:*:*:*:*:*:*:*"],"cwe_ids":["CWE-20"]},"references":[{"type":"ADVISORY","url":"https://github.com/ash-project/ash/security/advisories/GHSA-rwmx-99mc-qr2x"},{"type":"WEB","url":"https://cna.erlef.org/cves/CVE-2026-120299.html"},{"type":"WEB","url":"https://github.com/ash-project/ash/commit/71b709232454cff3ca23286c2a6b39a486bc8640"},{"type":"FIX","url":"https://github.com/ash-project/ash/commit/97a0a6061bebc2d4f7ebb40928f94a0ac734e498"},{"type":"PACKAGE","url":"https://hex.pm/packages/ash"}],"affected":[{"package":{"name":"ash","ecosystem":"Hex","purl":"pkg:hex/ash"},"ranges":[{"type":"SEMVER","events":[{"introduced":"3.24.0"},{"fixed":"3.38.1"}]}],"versions":["3.24.0","3.24.1","3.24.2","3.24.3","3.24.4","3.24.5","3.24.6","3.24.7","3.25.0","3.25.1","3.25.2","3.26.0","3.27.0","3.27.1","3.27.2","3.27.3","3.27.4","3.27.5","3.27.6","3.27.7","3.27.8","3.28.0","3.29.0","3.29.1","3.29.2","3.29.3","3.30.0","3.30.1","3.31.0","3.31.1","3.31.2","3.31.3","3.32.0","3.32.1","3.32.2","3.32.3","3.33.0","3.33.1","3.33.10","3.33.11","3.33.2","3.33.3","3.33.4","3.33.5","3.33.6","3.33.7","3.33.8","3.33.9","3.34.0","3.34.1","3.34.2","3.34.3","3.34.4","3.34.5","3.34.6","3.35.0","3.36.0","3.36.1","3.37.0","3.37.1","3.37.2","3.37.3","3.37.4","3.37.5","3.37.6","3.37.7","3.38.0"],"database_specific":{"source":"https://cna.erlef.org/osv/EEF-CVE-2026-120299.json"}},{"ranges":[{"type":"GIT","repo":"https://github.com/ash-project/ash","events":[{"introduced":"71b709232454cff3ca23286c2a6b39a486bc8640"},{"fixed":"97a0a6061bebc2d4f7ebb40928f94a0ac734e498"}]}],"database_specific":{"source":"https://cna.erlef.org/osv/EEF-CVE-2026-120299.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N","source":"CNA"}],"credits":[{"name":"Jace","type":"FINDER"},{"name":"Jace","type":"REPORTER"},{"name":"Jonatan Männchen / EEF","type":"ANALYST"},{"name":"Zach Daniel","type":"REMEDIATION_DEVELOPER"}]}