Am I affected?

type your ash_authentication version to check

Description

Insertion of Sensitive Information into Log File vulnerability in team-alembic AshAuthentication allows disclosure of user password digests to readers of the audit store.

The audit_log add-on builds each entry's extra_data in AshAuthentication.AddOn.AuditLog.Auditor.build_extra_data/4, which takes :actor from the action callback context verbatim. Any audited action invoked with actor: set to a user record therefore deposits that record, including its hashed_password attribute, into the audit entry. The same module already collapses the audited identity to an opaque string via AshAuthentication.user_to_subject/1 and filters params against the strategy's configured allow-list, so the actor is the only stored value that reaches the audit store unfiltered. Marking the attribute sensitive?: true does not help, because that redacts inspect/1 output rather than JSON encoding or raw-term storage.

There is no attacker-controlled trigger and no network disclosure path: entries accumulate from ordinary authenticated activity, and an attacker's own requests deposit only their own digest. Exploitation requires independent read access to the audit store, such as database credentials, an audit role, a backup, or a log shipper, at which point the digests support offline password attack against every active account. Whether the material persists depends on the data layer, since raw-term stores keep it verbatim while a SQL store raises Protocol.UndefinedError and drops the entry unless the user resource derives Jason.Encoder.

This issue affects ash_authentication: from 4.12.0 before 4.15.0 and from 5.0.0-rc.0 before 5.0.0-rc.2.

Weaknesses & attack patterns

Weakness

CWE-532 · Insertion of Sensitive Information into Log File in catalog → MITRE ↗

Attack patterns

CAPEC-49 · Password Brute Forcing MITRE ↗

Affected — Hex / ash_authentication Hex.pm ↗ Repository ↗

4.12.0 < 4.15.0 affected
5.0 series 5.0.0-rc.0 < 5.0.0-rc.2 affected
every other version: unaffected
cpe cpe:2.3:a:team-alembic:ash_authentication:*:*:*:*:*:*:*:*
modules · source files · routines
modules 'Elixir.AshAuthentication.AddOn.AuditLog.Auditor'
source files lib/ash_authentication/add_ons/audit_log/auditor.ex
routines 'Elixir.AshAuthentication.AddOn.AuditLog.Auditor':build_extra_data/4

Affected — GitHub / team-alembic/ash_authentication Repository ↗

255cfc9 and up affected
17ea0df not affected
f6b49cc not affected
every other version: unaffected
cpe cpe:2.3:a:team-alembic:ash_authentication:*:*:*:*:*:*:*:*
modules · source files · routines
modules 'Elixir.AshAuthentication.AddOn.AuditLog.Auditor'
source files lib/ash_authentication/add_ons/audit_log/auditor.ex
routines 'Elixir.AshAuthentication.AddOn.AuditLog.Auditor':build_extra_data/4

References

Credits

James Harton Remediation developer
Peter Ullrich Reporter
Jonatan Männchen Coordinator

CVSS breakdown

CVSS:4.0/AV:L/AC:H/AT:P/PR:H/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
« All CVEs