SecBoard
Zurück zur CVE-Übersicht

CVE-2026-65633

NONE
Risk Signal Score0/100 — NIEDRIG

EPSS-Score

0.4%

Exploit-Wahrscheinlichkeit (30 Tage)

Beschreibung

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.

Erkennung & Indikatoren

Ausnutzung

In den geprüften Quellen nicht genannt

Behobene Versionen

  • 4.14.2
  • 5.0.0-rc.13

Threat-Hunting-Queries

Die Schwachstelle betrifft die Wiederverwendung von JWTs mit eingeschränktem Zweck als vollwertige Bearer-API-Anmeldeinformationen. Die Erkennung sollte sich auf ungewöhnliche Authentifizierungsversuche konzentrieren, bei denen JWTs mit 'purpose'-Claims wie 'sign_in' oder 'remember_me' als vollwertige Bearer-Tokens verwendet werden, insbesondere wenn 'require_token_presence_for_authentication?' au

Sentinel/Defender KQL

SecurityEvent
| where EventID == 4624 // Successful logon
| where SubjectUserName has "bearer" // Placeholder for JWT bearer token usage
| where AdditionalInfo has "purpose: sign_in" or AdditionalInfo has "purpose: remember_me" // Look for specific purpose claims
| summarize count() by SubjectUserName, IpAddress, Application, AdditionalInfo
| where count_ > 1 // Look for repeated use of such tokens

Splunk SPL

index=your_application_logs sourcetype=your_auth_logs "authentication_method=bearer" (purpose="sign_in" OR purpose="remember_me")
| stats count by user, src_ip, purpose
| where count > 1

Sigma

title: AshAuthentication Purpose-Limited JWT Replay
author: SecBoard
date: 2026/08/25
modified: 2026/08/25
logsource:
  product: application
  service: authentication
detection:
  selection:
    authentication_method: 'bearer'
    purpose: # Adjust based on actual log field for JWT purpose
      - 'sign_in'
      - 'remember_me'
  condition: selection
  timeframe: 1h # Look for repeated use within a timeframe
falsepositives:
  - Legitimate token exchange (if not properly logged as such)
level: high

Elastic ES|QL

FROM your_application_logs
WHERE event.category == "authentication" AND event.action == "login" AND http.request.header.authorization : "Bearer *"
  AND (jwt.claims.purpose == "sign_in" OR jwt.claims.purpose == "remember_me")
GROUP BY user.name, source.ip, jwt.claims.purpose
HAVING COUNT() > 1

SecBoard-generated · behavioral · requires customizationVon SecBoard erzeugt und nicht in einer Zielumgebung validiert. Vor dem Einsatz an die eigene Protokollierung anpassen.

Indikatoren

Datei-Hashes (2)

  • 124eddd1bbeb40289c3fe8831ac10677a19fcf09
  • 8cf8b2d4426172be0900a3505e9491800b951750

Übernommen wurden nur Indikatoren, die wörtlich in einer Hersteller- oder Research-Quelle standen.

Referenzen