Am I affected?

type your ash version to check

Description

Improper Input Validation vulnerability in ash-project ash fails to enforce the outer array constraints on a doubly-nested {:array, {:array, type}} attribute, letting invalid input pass validation.

Ash.Type.apply_constraints/3 (lib/ash/type/type.ex) handled the {:array, {:array, type}} case by mapping only the inner {:array, type} constraints over each element, so constraints declared on the outer array (such as min_length, max_length, and nil_items?) were never applied. An attacker could submit an outer list that violates those constraints (too many elements, or nil entries where disallowed) and have it accepted and persisted. The fix enforces the outer array constraints and adds explicit handling for nil and non-list inputs.

This issue affects ash: from 2.16.1 before 3.32.2.

Weaknesses & attack patterns

Weakness

CWE-20 · Improper Input Validation in catalog → MITRE ↗

Attack patterns

CAPEC-153 · Input Data Manipulation MITRE ↗

Affected — Hex / ash Hex.pm ↗ Repository ↗

2.16.1 < 3.32.2 affected
every other version: unaffected
cpe cpe:2.3:a:ash-project:ash:*:*:*:*:*:*:*:*
modules · source files · routines
modules 'Elixir.Ash.Type'
source files lib/ash/type/type.ex
routines 'Elixir.Ash.Type':apply_constraints/3

Affected — GitHub / ash-project/ash Repository ↗

7b50a40 < c85ccff affected
every other version: unaffected
cpe cpe:2.3:a:ash-project:ash:*:*:*:*:*:*:*:*
modules · source files · routines
modules 'Elixir.Ash.Type'
source files lib/ash/type/type.ex
routines 'Elixir.Ash.Type':apply_constraints/3

References

Credits

Jonatan Männchen / EEF Coordinator
Zach Daniel / Ash Project Remediation developer
Peter Ullrich Reporter Finder

CVSS breakdown

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
« All CVEs