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

Published Nov 24, 2026
·
Updated

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.castinput/2 in lib/ash/type/keyword.ex converts a map input to a keyword list in trymaptokeyword/2, which casts each declared field with Ash.Type.caststored/3. That function is meant for trusted values read back from the data layer, so client input skips the castinput/2 of each field type. applyconstraints/2 casts the result again with castinput/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.

Other sources

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.castinput/2 in lib/ash/type/keyword.ex converts a map input to a keyword list in trymaptokeyword/2, which casts each declared field with Ash.Type.caststored/3. That function is meant for trusted values read back from the data layer, so client input skips the castinput/2 of each field type. applyconstraints/2 casts the result again with castinput/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.

— MITRE

Affected Software

2 affected componentsFixes available
hex/ash>=3.24.0<3.38.1
erlang/ash>=3.24.0<3.38.1
3.38.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade erlang/ash to a version that resolves this vulnerability.

    Fixed in 3.38.1
  2. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 3.38.1

Event History

Nov 24, 2026
CVE Published
via MITRE·01:13 PM
Data Sourced
via MITRE·01:13 PM
DescriptionWeakness
Data Sourced
via OSV·01:13 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which applications are exposed to this issue?

Applications using ash versions from 3.24.0 before 3.38.1 are affected when client-controlled map input is accepted for a :keyword attribute or argument. The impact is especially significant when declared keyword fields include embedded resources, :function fields, or :term fields.

2

What does an attacker need to provide to exploit the bypass?

An attacker needs to supply map-shaped client input to a :keyword attribute or argument. The map is converted to a keyword list and its declared fields are processed as stored, trusted values rather than through each field type's normal input casting.

3

What are the most important consequences to investigate?

Embedded resource fields may be built without their create action, allowing validations and changes not to run and non-public attributes to be set. A :function field can accept a capture string such as &Mod.fun/1, while a :term field decodes Erlang external term format.

4

What should teams do if they are affected?

Upgrade ash to version 3.38.1 or later. Until upgraded, identify endpoints that accept client maps for :keyword attributes or arguments and avoid exposing sensitive embedded-resource, :function, or :term fields through those inputs.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203