CVE-2026-139967

Plaintext API keys stored in AshAuthentication audit log entries

Published Dec 4, 2026 CVSS 4.0 · 6.7 Medium EPSS n/a KEV · Not listed
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.

Remediation

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.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
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

{'score': 6.7, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:N/PR:H/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
EEF
Published
Updated
Dec 4, 2026, 6:38 AM
Reserved
Nov 30, 2026, 4:56 PM
Status
Deferred
Published
Dec 4, 2026, 7:17 AM
Modified
Dec 4, 2026, 7:17 AM