Am I affected?
Description
Improper Handling of Alternate Encoding vulnerability in ash-project ash_double_entry allows an attacker to submit several distinct string spellings of the same identifier.
AshDoubleEntry.ULID renders a 128-bit ULID as 26 Crockford base-32 characters, but the first character encodes only 3 bits, so canonical values are 0 to 7. decode/1 in lib/ulid.ex masks the first character to its low 3 bits and valid?/1 accepts all 32 characters in that position, so 0..., 8..., G... and R... decode to the identical 16-byte value and resolve to the same row. When the type is exposed as a public ID over an HTTP or API boundary, an attacker-supplied ID can be spelled differently from the record it actually reads or writes, desynchronizing or bypassing string-level checks such as idempotency and deduplication keys, deny-lists, audit correlation, or signatures computed over the submitted ID.
This issue affects ash_double_entry: from 0.1.0 before 1.0.19.
Weaknesses & attack patterns
Weakness
CWE-173
·
Improper Handling of Alternate Encoding
in catalog →
MITRE ↗
Attack patterns
CAPEC-267
·
Leverage Alternate Encoding
MITRE ↗
Affected — Hex / ash_double_entry Hex.pm ↗ Repository ↗
modules · source files · routines
Affected — GitHub / ash-project/ash_double_entry Repository ↗
modules · source files · routines
Configurations
Reachable only when an application exposes AshDoubleEntry.ULID as a public identifier over an HTTP or API boundary and performs string-level checks on the submitted ID (idempotency or deduplication keys, deny-lists, audit correlation, or signatures) rather than treating the value as opaque.
References
Credits
CVSS breakdown
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:L/SA:N