Plaintext API keys stored in AshAuthentication audit log entries
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
| Vendor | Product | Default status | Versions | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| team-alembic | ash_authentication | unaffected |
|
|||||||||
| team-alembic | ash_authentication | unaffected |
|
No data.
No data.
No data available yet.
Vendor Solution
Upgrade to 4.15.2 or 5.0.0-rc.19. The audit log then never records a strategy's secret arguments unless include_fields names them, and an API key sign-in action whose argument is not sensitive compiles with a warning. Upgrading does not remove keys already logged. Treat every API key used while the add-on was enabled as exposed and revoke it; the middle segment of each key encodes the id of its API key record. Remove the keys from existing entries, for example on PostgreSQL with UPDATE <audit_log_table> SET extra_data = extra_data #- '{params,api_key}' WHERE extra_data->'params' ? 'api_key';, and account for backups, replicas and exports of the audit table.
Vendor Workaround
Mark the api_key argument of the API key sign-in action sensitive?: true, and do the same for any secret argument of a magic link, OTP, TOTP, recovery code or confirmation action the application defines. Alternatively, add the sign-in action to the audit log's exclude_actions. Neither removes keys already logged; see the solution.
No CVSS v3.1
No CVSS v3.0
No CVSS v2
This CVE is not in the KEV list.
No EPSS score available.
Key SSVC decision points have not yet been added.
| Type | Values Removed | Values Added |
|---|---|---|
| Description | Insertion of Sensitive Information into Log File vulnerability in team-alembic ash_authentication allows a reader of the audit log to sign in as any user who has signed in with an API key. The audit_log add-on records every public argument of an audited action that is not marked sensitive?. The API key sign-in action written by mix ash_authentication.add_strategy.api_key, the API keys guide and the usage rules declares api_key without sensitive?, and nothing required it, so every API key sign-in, including each request AshAuthentication.Strategy.ApiKey.Plug authenticates, stored the plaintext key in the entry's extra_data. The application keeps only key hashes, but anyone who can read the audit table, its backups or an admin view of it obtains working keys. Magic link and confirmation tokens, one-time passwords, and TOTP and recovery codes were stored the same way when the action did not mark them sensitive. This issue affects ash_authentication: from 4.12.0 before 4.15.2 and from 5.0.0-rc.0 before 5.0.0-rc.19. | |
| Title | Plaintext API keys stored in AshAuthentication audit log entries | |
| First Time appeared |
Team-alembic
Team-alembic ash Authentication |
|
| Weaknesses | CWE-532 | |
| CPEs | cpe:2.3:a:team-alembic:ash_authentication:*:*:*:*:*:*:*:* | |
| Vendors & Products |
Team-alembic
Team-alembic ash Authentication |
|
| References |
|
|
| Metrics |
cvssV4_0
|