[M-1] Client secrets hashed with unsalted SHA-256 and compared non-timing-safe #13
Labels
No labels
architecture
code-quality
correctness
critical
docs
high
low
medium
ops
performance
privacy
security
tests
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
antrapol/CA-MDID-eMudhra#13
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Finding
hash_secret/1is a plain unsalted SHA-256;verify_secretcompares with==(length-first short-circuit).Evidence
lib/mdid_ws/oauth/client_credentials.ex:24-30Impact
Low-entropy secrets are rainbow-table reversible from the Mnesia file; marginal timing oracle.
Fix
Plug.Crypto.secure_compare/2Line numbers refer to the initial import commit
282cb11. Source: comprehensive audit, 2026-11-12 (first review of this codebase).