Am I affected?

type your ash version to check

Description

Improper Input Validation vulnerability in ash-project ash allows an attacker to persistently deny reads of a record by storing a non-version-7 UUID in an Ash.Type.UUIDv7 attribute.

Ash.Type.UUIDv7.cast_input/2 accepts any well-formed UUID string, including non-version-7 UUIDs, and stores it as a 16-byte binary. On read, cast_stored/2 (lib/ash/type/uuid_v7.ex) routes the stored binary back through cast_input/2, which since an input-validation tightening in v3.6.3 matches only version-7 (and optionally version-4) 16-byte binaries and otherwise expects a 36-character string. A stored non-v7 16-byte binary matches neither clause and returns :error, so every later read of that record fails. An attacker able to set such an attribute poisons the row permanently. The fix decodes any 16-byte stored binary directly in cast_stored/2.

This issue affects ash: from 3.6.3 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 ↗

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

Affected — GitHub / ash-project/ash Repository ↗

751d8a4 < c453cdc affected
every other version: unaffected
cpe cpe:2.3:a:ash-project:ash:*:*:*:*:*:*:*:*
modules · source files · routines
modules 'Elixir.Ash.Type.UUIDv7'
source files lib/ash/type/uuid_v7.ex
routines 'Elixir.Ash.Type.UUIDv7':cast_input/2 · 'Elixir.Ash.Type.UUIDv7':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:N/VA:H/SC:N/SI:N/SA:N
« All CVEs