logo

CVE-2025-4754 ash_authentication_phoenix

Package

Manager: erlang
Name: ash_authentication_phoenix
Vulnerable Version: >=0 <2.10.0

Severity

Level: Low

CVSS v3.1: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N/E:U/RL:O/RC:C

CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N

EPSS: 0.00122 pctl0.32023

Details

ash_authentication_phoenix has Insufficient Session Expiration ### Impact Session tokens remain valid on the server after user logout, creating a security gap where: - Compromised tokens (via XSS, network interception, or device theft) continue to work even after the user logs out - The sessions stored in the database still expire, limiting the duration during which this could be exploited - Users cannot fully invalidate their sessions when logging out from shared or potentially compromised devices - by default, changing one's password *does* invalidate all other sessions, so changing your password as a security measure would have been effective - May cause compliance issues with security frameworks requiring complete session ### Patches Upgrade to version 2.10.0. After upgrading, users must update their AuthController implementation to use the new `clear_session/2` function with their OTP app name. You will be prompted to do so with a compile-time error. If you do not have the setting `require_token_presence_for_authentication?` set to `true` in the `tokens` section, you will see a separate error: ``` ** (Spark.Error.DslError) authentication -> session_identifier: Must set `authentication.session_identifier` to either `:jti` or `:unsafe`. ... ``` In order to revoke sessions on log out when not storing tokens directly in the session, we must have some unique identifier with which to do so. You should prefer to enable `require_token_presence_for_authentication?` if possible, instead of setting this to `:jti`. Note that whatever you do here, if you did not previously have `require_token_presence_for_authentication?` set to `true`, setting it to `true` *or* setting `authentication.session_identifier` to `:jti` will log out all of your currently authenticated users. ### Workarounds You can manually revoke tokens in your `logout/2` handler in your auth controller.

Metadata

Created: 2025-06-17T14:20:46Z
Modified: 2025-06-17T19:56:26Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/06/GHSA-f7gq-h8jv-h3cq/GHSA-f7gq-h8jv-h3cq.json
CWE IDs: ["CWE-613"]
Alternative ID: GHSA-f7gq-h8jv-h3cq
Finding: F076
Auto approve: 1