Am I affected?

type your ash version to check

Description

Improper Validation of Specified Quantity in Input vulnerability in ash-project ash allows an attacker to submit a non-finite decimal value that bypasses numeric bounds constraints or fails later operations on the value.

Ash.Type.Decimal cast input through Ecto's decimal cast in cast_input/2 and cast_stored/2 (lib/ash/type/decimal.ex) without checking that the resulting value is finite. Elixir's Decimal represents Infinity and NaN as valid structs, so a value such as "Infinity" or "NaN" passed casting and was persisted. Because NaN compares as false against every bound, min and max constraints do not reject it, and the stored special value later raises when used in Decimal arithmetic or is refused by the data layer, failing subsequent requests. The fix rejects any non-finite Decimal during casting.

This issue affects ash: from 1.28.0 before 3.32.2.

Weaknesses & attack patterns

Weakness

CWE-1284 · Improper Validation of Specified Quantity in Input in catalog → MITRE ↗

Attack patterns

CAPEC-153 · Input Data Manipulation MITRE ↗

Affected — Hex / ash Hex.pm ↗ Repository ↗

1.28.0 < 3.32.2 affected
every other version: unaffected
cpe cpe:2.3:a:ash-project:ash:*:*:*:*:*:*:*:*
modules · source files · routines
modules 'Elixir.Ash.Type.Decimal'
source files lib/ash/type/decimal.ex
routines 'Elixir.Ash.Type.Decimal':cast_input/2 · 'Elixir.Ash.Type.Decimal':cast_stored/2

Affected — GitHub / ash-project/ash Repository ↗

db6bdfc < 818087b affected
every other version: unaffected
cpe cpe:2.3:a:ash-project:ash:*:*:*:*:*:*:*:*
modules · source files · routines
modules 'Elixir.Ash.Type.Decimal'
source files lib/ash/type/decimal.ex
routines 'Elixir.Ash.Type.Decimal':cast_input/2 · 'Elixir.Ash.Type.Decimal':cast_stored/2

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:L/SC:N/SI:N/SA:N
« All CVEs