cve.bz

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

2.1 lowFix available

Low (2.1) in ash-project ash. Fixed in ash 3.38.1.

On this page
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.

Severity

CVSS 4.0

2.1 low
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
CWE
CWE-20 Improper Input Validation
OWASP Top 10
A05:2025 Injection
Published
Modified
Assigned by
EEF (CNA)
NVD analysis
Awaiting analysis
Record from
the NVD, synced

Fix and patched versions

  • ash (Hex): fixed in 3.38.1

Ask an AI about this CVE

Show the promptExplain CVE-2026-120299 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-120299?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-120299?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-120299 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
ash-project ashfrom 3.24.0 before 3.38.1

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
EEF-CVE-2026-120299Hexash>=3.24.0 <3.38.13.38.1
EEF-CVE-2026-120299no fix published

Attack patterns (CAPEC)

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-20 (51).

References

Check your stackJSON