Description
Improper Authentication vulnerability in team-alembic AshAuthentication allows purpose-limited JWTs to be replayed as full bearer API credentials when a resource uses stateless bearer-token verification.

The bearer-token authentication helper AshAuthentication.Plug.Helpers.retrieve_from_bearer/3 verifies an Authorization: Bearer JWT's signature and rejects tokens containing an act claim, but performs no check that the token's purpose claim equals user at the bearer boundary. When the resource is configured with require_token_presence_for_authentication?: false (the DSL default), the follow-on validate_token/3 helper returns {:ok, nil} without consulting the token resource, so no downstream check on purpose takes place either. As a result, any valid, non-expired JWT the library itself issued for a narrow, single-purpose flow (most notably the purpose: sign_in token that WebAuthn always emits during sign-in, and that the Password strategy emits when sign-in tokens are enabled) is accepted directly as a general-purpose bearer credential and resolves to a full current_user assignment.

This bypasses the library's intended token-exchange contract, in which the sign_in token is meant to be presented exactly once to a preparation that validates the purpose claim and immediately revokes the token. The first use of a still-valid sign-in token presented directly in the Authorization header succeeds because the stateless bearer path never scopes it to purpose == "user".

An attacker who obtains a not-yet-exchanged sign-in token for a target subject (for example via log or referrer leakage, an intercepted magic-link delivery channel, or a partially compromised intermediary) can present it as a bearer token and be authenticated as that subject, fully bypassing the intended one-time-use and revocation semantics. Exploitation additionally requires that the host application wire up retrieve_from_bearer/3 on a reachable route and uses either WebAuthn (sign-in tokens are always issued) or the Password strategy with sign_in_tokens_enabled?: true. Resources configured with require_token_presence_for_authentication?: true (including applications scaffolded by the Igniter installer since v4.5.0) and the session-based path (authenticate_resource_from_session/4) enforce purpose == "user" against the stored token record and are not affected.

This issue affects ash_authentication: from 3.10.5 before 4.14.2 and from 5.0.0-rc.0 before 5.0.0-rc.13.
Published: 2026-08-25
Score: 7.6 High
EPSS: < 1% Very Low
KEV: No
Impact: Authentication Bypass
Action: Immediate Patch
AI Analysis

Impact

The vulnerability allows a purpose‑limited JSON Web Token that is intended to be used only once, such as a sign‑in token, to be used as a full bearer credential. An attacker who obtains a valid, non‑expired sign‑in token can present it in the Authorization header and be authenticated as the token’s subject. This bypasses the one‑time use and revocation model that the library enforces for sign‑in tokens, resulting in unauthorized access to the target account. The weakness is a failure to verify the token’s purpose claim when performing stateless bearer‑token authentication, leading to a CWE‑287 authentication bypass.

Affected Systems

The issue affects the AshAuthentication library provided by team‑alembic. Vulnerable releases include all versions from 3.10.5 up to but not including 4.14.2, and from 5.0.0‑rc.0 up to but not including 5.0.0‑rc.13. Applications that have integrated a stateless bearer‑token helper without enforcing the required_token_presence_for_authentication? option and that enable WebAuthn or the Password strategy with sign‑in tokens enabled are most susceptible.

Risk and Exploitability

The CVSS score of 7.6 reflects considerable risk, with the EPSS score unavailable but no data suggesting a lack of exploitation potential. The vulnerability is not listed in CISA’s KEV catalog. Exploitation requires an attacker to acquire a still‑valid sign‑in token, which can occur through log or referrer leaks, intercepted magic‑link channels, or a partially compromised intermediary. Once obtained, the attacker can simply send the token in an Authorization header on any reachable route that uses the build‑in bearer retrieval helper. The library’s default configuration (require_token_presence_for_authentication?: false) allows this misuse, while configurations that enable the token presence check and session‑based paths remain safe.

Generated by OpenCVE AI on August 25, 2026 at 09:50 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade AshAuthentication to version 4.14.2 or later for the stable release line, or to 5.0.0‑rc.13 or later for the release candidate line. This patch enforces the correct purpose claim check for all bearer‑token paths.
  • If an upgrade is not immediately possible, configure the application to enable require_token_presence_for_authentication? = true, which forces the library to validate that the token’s purpose equals "user" before accepting it.
  • Check and remove any routes that expose stateless bearer authentication without requiring token presence for authentication, and apply access controls to limit exposure.

Generated by OpenCVE AI on August 25, 2026 at 09:50 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 25 Aug 2026 20:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Tue, 25 Aug 2026 08:15:00 +0000

Type Values Removed Values Added
Description Improper Authentication vulnerability in team-alembic AshAuthentication allows purpose-limited JWTs to be replayed as full bearer API credentials when a resource uses stateless bearer-token verification. The bearer-token authentication helper AshAuthentication.Plug.Helpers.retrieve_from_bearer/3 verifies an Authorization: Bearer JWT's signature and rejects tokens containing an act claim, but performs no check that the token's purpose claim equals user at the bearer boundary. When the resource is configured with require_token_presence_for_authentication?: false (the DSL default), the follow-on validate_token/3 helper returns {:ok, nil} without consulting the token resource, so no downstream check on purpose takes place either. As a result, any valid, non-expired JWT the library itself issued for a narrow, single-purpose flow (most notably the purpose: sign_in token that WebAuthn always emits during sign-in, and that the Password strategy emits when sign-in tokens are enabled) is accepted directly as a general-purpose bearer credential and resolves to a full current_user assignment. This bypasses the library's intended token-exchange contract, in which the sign_in token is meant to be presented exactly once to a preparation that validates the purpose claim and immediately revokes the token. The first use of a still-valid sign-in token presented directly in the Authorization header succeeds because the stateless bearer path never scopes it to purpose == "user". An attacker who obtains a not-yet-exchanged sign-in token for a target subject (for example via log or referrer leakage, an intercepted magic-link delivery channel, or a partially compromised intermediary) can present it as a bearer token and be authenticated as that subject, fully bypassing the intended one-time-use and revocation semantics. Exploitation additionally requires that the host application wire up retrieve_from_bearer/3 on a reachable route and uses either WebAuthn (sign-in tokens are always issued) or the Password strategy with sign_in_tokens_enabled?: true. Resources configured with require_token_presence_for_authentication?: true (including applications scaffolded by the Igniter installer since v4.5.0) and the session-based path (authenticate_resource_from_session/4) enforce purpose == "user" against the stored token record and are not affected. This issue affects ash_authentication: from 3.10.5 before 4.14.2 and from 5.0.0-rc.0 before 5.0.0-rc.13.
Title Purpose-limited JWT accepted as full bearer authentication in AshAuthentication
First Time appeared Team-alembic
Team-alembic ash Authentication
Weaknesses CWE-287
CPEs cpe:2.3:a:team-alembic:ash_authentication:*:*:*:*:*:*:*:*
Vendors & Products Team-alembic
Team-alembic ash Authentication
References
Metrics cvssV4_0

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


Subscriptions

Team-alembic Ash Authentication
cve-icon MITRE

Status: PUBLISHED

Assigner: EEF

Published:

Updated: 2026-08-25T19:49:22.437Z

Reserved: 2026-07-22T13:58:26.233Z

Link: CVE-2026-65633

cve-icon Vulnrichment

Updated: 2026-08-25T19:49:14.638Z

cve-icon NVD

Status : Deferred

Published: 2026-08-25T08:18:09.857

Modified: 2026-09-01T21:15:00.147

Link: CVE-2026-65633

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-25T10:00:09Z

Weaknesses