{"containers":{"cna":{"affected":[{"collectionURL":"https://repo.hex.pm","cpes":["cpe:2.3:a:team-alembic:ash_authentication:*:*:*:*:*:*:*:*"],"defaultStatus":"unaffected","modules":["'Elixir.AshAuthentication.Plug.Helpers'"],"packageName":"ash_authentication","packageURL":"pkg:hex/ash_authentication","product":"ash_authentication","programFiles":["lib/ash_authentication/plug/helpers.ex"],"programRoutines":[{"name":"'Elixir.AshAuthentication.Plug.Helpers':retrieve_from_bearer/3"}],"repo":"https://github.com/team-alembic/ash_authentication","vendor":"team-alembic","versions":[{"lessThan":"4.14.2","status":"affected","version":"3.10.5","versionType":"semver"},{"lessThan":"5.0.0-rc.13","status":"affected","version":"5.0.0-rc.0","versionType":"semver"}]},{"collectionURL":"https://github.com","cpes":["cpe:2.3:a:team-alembic:ash_authentication:*:*:*:*:*:*:*:*"],"defaultStatus":"unaffected","modules":["'Elixir.AshAuthentication.Plug.Helpers'"],"packageName":"team-alembic/ash_authentication","packageURL":"pkg:github/team-alembic/ash_authentication","product":"ash_authentication","programFiles":["lib/ash_authentication/plug/helpers.ex"],"programRoutines":[{"name":"'Elixir.AshAuthentication.Plug.Helpers':retrieve_from_bearer/3"}],"repo":"https://github.com/team-alembic/ash_authentication","vendor":"team-alembic","versions":[{"changes":[{"at":"8cf8b2d4426172be0900a3505e9491800b951750","status":"unaffected"},{"at":"124eddd1bbeb40289c3fe8831ac10677a19fcf09","status":"unaffected"}],"lessThan":"*","status":"affected","version":"eca8cadea0f1595ed2c10a0c177b1da9aa9e5269","versionType":"git"}]}],"configurations":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>The bypass is reachable only when a resource uses stateless bearer-token verification, i.e. <code>require_token_presence_for_authentication?</code> is <code>false</code> (the DSL default). In that mode <code>validate_token/3</code> returns <code>{:ok, nil}</code> without consulting the token resource, so the JWT's <code>purpose</code> claim is the only remaining scoping signal at the bearer boundary and it is never checked. When <code>require_token_presence_for_authentication?</code> is <code>true</code>, <code>validate_token/3</code> looks the token up with <code>get_token(%{\"jti\" =&gt; jti, \"purpose\" =&gt; \"user\"})</code>; purpose-limited tokens are stored under their own purpose (<code>sign_in</code>, <code>remember_me</code>, ...), so that lookup fails and those tokens are rejected. Applications scaffolded by the Igniter installer since v4.5.0 default to <code>require_token_presence_for_authentication?: true</code> and are therefore not exposed as generated; applications configured manually or that deliberately opt into stateless JWT verification are.</p>\n<p>Exploitation additionally requires the host application to wire up <code>AshAuthentication.Plug.Helpers.retrieve_from_bearer/3</code> on a route the attacker can reach, and to use a strategy that issues purpose-limited JWTs carrying a resolvable <code>sub</code> claim: either the WebAuthn strategy (sign-in tokens are always emitted, no opt-in required) or the Password strategy with <code>sign_in_tokens_enabled?: true</code>. The session-based path (<code>authenticate_resource_from_session/4</code>) already enforces <code>purpose == \"user\"</code> against the token resource and is not affected.</p>"},{"base64":false,"type":"text/markdown","value":"The bypass is reachable only when a resource uses stateless bearer-token verification, i.e. `require_token_presence_for_authentication?` is `false` (the DSL default). In that mode `validate_token/3` returns `{:ok, nil}` without consulting the token resource, so the JWT's `purpose` claim is the only remaining scoping signal at the bearer boundary and it is never checked. When `require_token_presence_for_authentication?` is `true`, `validate_token/3` looks the token up with `get_token(%{\"jti\" => jti, \"purpose\" => \"user\"})`; purpose-limited tokens are stored under their own purpose (`sign_in`, `remember_me`, ...), so that lookup fails and those tokens are rejected. Applications scaffolded by the Igniter installer since v4.5.0 default to `require_token_presence_for_authentication?: true` and are therefore not exposed as generated; applications configured manually or that deliberately opt into stateless JWT verification are.\n\nExploitation additionally requires the host application to wire up `AshAuthentication.Plug.Helpers.retrieve_from_bearer/3` on a route the attacker can reach, and to use a strategy that issues purpose-limited JWTs carrying a resolvable `sub` claim: either the WebAuthn strategy (sign-in tokens are always emitted, no opt-in required) or the Password strategy with `sign_in_tokens_enabled?: true`. The session-based path (`authenticate_resource_from_session/4`) already enforces `purpose == \"user\"` against the token resource and is not affected."}],"value":"The bypass is reachable only when a resource uses stateless bearer-token verification, i.e. require_token_presence_for_authentication? is false (the DSL default). In that mode validate_token/3 returns {:ok, nil} without consulting the token resource, so the JWT's purpose claim is the only remaining scoping signal at the bearer boundary and it is never checked. When require_token_presence_for_authentication? is true, validate_token/3 looks the token up with get_token(%{\"jti\" => jti, \"purpose\" => \"user\"}); purpose-limited tokens are stored under their own purpose (sign_in, remember_me, ...), so that lookup fails and those tokens are rejected. Applications scaffolded by the Igniter installer since v4.5.0 default to require_token_presence_for_authentication?: true and are therefore not exposed as generated; applications configured manually or that deliberately opt into stateless JWT verification are.\n\nExploitation additionally requires the host application to wire up AshAuthentication.Plug.Helpers.retrieve_from_bearer/3 on a route the attacker can reach, and to use a strategy that issues purpose-limited JWTs carrying a resolvable sub claim: either the WebAuthn strategy (sign-in tokens are always emitted, no opt-in required) or the Password strategy with sign_in_tokens_enabled?: true. The session-based path (authenticate_resource_from_session/4) already enforces purpose == \"user\" against the token resource and is not affected."}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:a:team-alembic:ash_authentication:*:*:*:*:*:*:*:*","versionEndExcluding":"4.14.2","versionStartIncluding":"3.10.5","vulnerable":true},{"criteria":"cpe:2.3:a:team-alembic:ash_authentication:*:*:*:*:*:*:*:*","versionEndExcluding":"5.0.0-rc.13","versionStartIncluding":"5.0.0-rc.0","vulnerable":true}],"negate":false,"operator":"OR"}],"operator":"AND"}],"credits":[{"lang":"en","type":"finder","value":"EQSTLab"},{"lang":"en","type":"remediation developer","value":"James Harton"},{"lang":"en","type":"coordinator","value":"Jonatan Männchen / EEF"}],"descriptions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>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.</p>\n<p>The bearer-token authentication helper <code>AshAuthentication.Plug.Helpers.retrieve_from_bearer/3</code> verifies an <code>Authorization: Bearer</code> JWT's signature and rejects tokens containing an <code>act</code> claim, but performs no check that the token's <code>purpose</code> claim equals <code>user</code> at the bearer boundary. When the resource is configured with <code>require_token_presence_for_authentication?: false</code> (the DSL default), the follow-on <code>validate_token/3</code> helper returns <code>{:ok, nil}</code> without consulting the token resource, so no downstream check on <code>purpose</code> takes place either. As a result, any valid, non-expired JWT the library itself issued for a narrow, single-purpose flow (most notably the <code>purpose: sign_in</code> 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 <code>current_user</code> assignment.</p>\n<p>This bypasses the library's intended token-exchange contract, in which the <code>sign_in</code> token is meant to be presented exactly once to a preparation that validates the <code>purpose</code> claim and immediately revokes the token. The first use of a still-valid sign-in token presented directly in the <code>Authorization</code> header succeeds because the stateless bearer path never scopes it to <code>purpose == \"user\"</code>.</p>\n<p>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 <code>retrieve_from_bearer/3</code> on a reachable route and uses either WebAuthn (sign-in tokens are always issued) or the Password strategy with <code>sign_in_tokens_enabled?: true</code>. Resources configured with <code>require_token_presence_for_authentication?: true</code> (including applications scaffolded by the Igniter installer since v4.5.0) and the session-based path (<code>authenticate_resource_from_session/4</code>) enforce <code>purpose == \"user\"</code> against the stored token record and are not affected.</p>\n<p>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.</p>"},{"base64":false,"type":"text/markdown","value":"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.\n\nThe 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.\n\nThis 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\"`.\n\nAn 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.\n\nThis 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."}],"value":"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.\n\nThe 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.\n\nThis 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\".\n\nAn 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.\n\nThis 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."}],"impacts":[{"capecId":"CAPEC-21","descriptions":[{"lang":"en","value":"CAPEC-21 Exploitation of Trusted Identifiers"}]}],"metrics":[{"cvssV4_0":{"Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","Safety":"NOT_DEFINED","attackComplexity":"HIGH","attackRequirements":"PRESENT","attackVector":"NETWORK","baseScore":7.6,"baseSeverity":"HIGH","privilegesRequired":"NONE","providerUrgency":"NOT_DEFINED","subAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","userInteraction":"PASSIVE","valueDensity":"NOT_DEFINED","vectorString":"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","version":"4.0","vulnAvailabilityImpact":"NONE","vulnConfidentialityImpact":"HIGH","vulnIntegrityImpact":"HIGH","vulnerabilityResponseEffort":"NOT_DEFINED"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-287","description":"CWE-287 Improper Authentication","lang":"en","type":"CWE"}]}],"providerMetadata":{"dateUpdated":"2026-08-25T08:03:51.846Z","orgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","shortName":"EEF"},"references":[{"tags":["vendor-advisory","related"],"url":"https://github.com/team-alembic/ash_authentication/security/advisories/GHSA-6vcj-3h59-rrc3"},{"tags":["related"],"url":"https://cna.erlef.org/cves/CVE-2026-65633.html"},{"tags":["related"],"url":"https://osv.dev/vulnerability/EEF-CVE-2026-65633"},{"tags":["patch"],"url":"https://github.com/team-alembic/ash_authentication/commit/8cf8b2d4426172be0900a3505e9491800b951750"},{"tags":["patch"],"url":"https://github.com/team-alembic/ash_authentication/commit/124eddd1bbeb40289c3fe8831ac10677a19fcf09"}],"source":{"discovery":"EXTERNAL"},"title":"Purpose-limited JWT accepted as full bearer authentication in AshAuthentication"}},"cveMetadata":{"assignerOrgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","assignerShortName":"EEF","cveId":"CVE-2026-65633","datePublished":"2026-08-25T08:03:51.846Z","dateReserved":"2026-07-22T13:58:26.233Z","dateUpdated":"2026-08-25T08:03:51.846Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"}