CVE-2025-4754: Ash authentication phoenix Ash_authentication_phoenix Has Insufficient Session Expiration Vulnerability

LOW
Advisory Identifier: GHSA-f7gq-h8jv-h3cq
CWE-613
Published
Advisory Summary

CVE-2025-4754 is a LOW ash_authentication_phoenix has insufficient session expiration vulnerability (CWE-613: Insufficient Session Expiration) affecting Ash authentication phoenix libraries in the Hex ecosystem. The issue involves ash_authentication_phoenix has insufficient session expiration. Remediation is available by upgrading affected packages to version 2.10.0.

CVE-2025-4754 at a Glance

CVE Identifier CVE-2025-4754
GHSA Identifier GHSA-f7gq-h8jv-h3cq
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-613: Insufficient Session Expiration
Affected Product Ash authentication phoenix
Package Ecosystem Hex
Published Date
Last Updated

How to Fix CVE-2025-4754

To remediate this vulnerability, upgrade all affected Ash authentication phoenix dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

ash_authentication_phoenix fixed: 2.10.0
Upgrade ash_authentication_phoenix to 2.10.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for ash_authentication_phoenix

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-4754, inspect your project dependencies for Ash authentication phoenix:

inspect dependencies for ash_authentication_phoenix

Analyze the terminal output to locate any version of Ash authentication phoenix in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.10.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-613: Insufficient Session Expiration, where according to wasc, "insufficient session expiration is when a web site permits an attacker to reuse old session credentials or session ids for authorization.". In Ash authentication phoenix, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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.

CVE-2025-4754 Affected Ash authentication phoenix Versions

1 component(s)
Fixed Versions:
2.10.0
Product / Package Ecosystem Affected Versions Fixed Version
ash_authentication_phoenix
Hex
< 2.10.0
2.10.0

References

Frequently Asked Questions

What is CVE-2025-4754?
CVE-2025-4754 is a security vulnerability in Ash authentication phoenix involving ash_authentication_phoenix has Insufficient Session Expiration under CWE-613: Insufficient Session Expiration.
Which Ash authentication phoenix versions are affected?
Affected versions include releases prior to 2.10.0 across affected packages: ash_authentication_phoenix.
What version fixes CVE-2025-4754?
Upgrading to 2.10.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is ash_authentication_phoenix affected?
Yes, ash_authentication_phoenix is affected in releases prior to 2.10.0. Upgrade your dependency to 2.10.0 or later.
What CWE is associated with CVE-2025-4754?
CVE-2025-4754 is classified under CWE-613: Insufficient Session Expiration (According to WASC, "Insufficient Session Expiration is when a web site permits an attacker to reuse old session credentials or session IDs for authorization.").
How can I check Hex dependencies for CVE-2025-4754?
Run the dependency tree command: 'inspect dependencies for ash_authentication_phoenix'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-f7gq-h8jv-h3cq",
  "modified" : "2026-04-06T23:14:59Z",
  "published" : "2025-06-17T14:20:46Z",
  "aliases" : [ "CVE-2025-4754" ],
  "summary" : "ash_authentication_phoenix has Insufficient Session Expiration",
  "details" : "### Impact\n\nSession tokens remain valid on the server after user logout, creating a security gap where:\n\n- Compromised tokens (via XSS, network interception, or device theft) continue to work even after the user logs out\n  - The sessions stored in the database still expire, limiting the duration during which this could be exploited\n- Users cannot fully invalidate their sessions when logging out from shared or potentially compromised devices \n  - by default, changing one's password *does* invalidate all other sessions, so changing your password as a security measure would have been effective\n- May cause compliance issues with security frameworks requiring complete session \n### Patches\nUpgrade 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.\n\nIf you do not have the setting `require_token_presence_for_authentication?` set to `true` in the `tokens` section, you will see a separate error:\n\n```\n** (Spark.Error.DslError) authentication -> session_identifier:\nMust set `authentication.session_identifier` to either `:jti` or `:unsafe`.\n\n...\n```\n\nIn 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.\n\n### Workarounds\nYou can manually revoke tokens in your `logout/2` handler in your auth controller.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Hex",
      "name" : "ash_authentication_phoenix"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.10.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.9.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/team-alembic/ash_authentication_phoenix/security/advisories/GHSA-f7gq-h8jv-h3cq"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-4754"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/team-alembic/ash_authentication_phoenix/pull/634"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/team-alembic/ash_authentication_phoenix/commit/a3253fb4fc7145aeb403537af1c24d3a8d51ffb1"
  }, {
    "type" : "WEB",
    "url" : "https://cna.erlef.org/cves/CVE-2025-4754.html"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/team-alembic/ash_authentication_phoenix"
  }, {
    "type" : "WEB",
    "url" : "https://osv.dev/vulnerability/EEF-CVE-2025-4754"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-613" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-06-17T14:20:46Z",
    "nvd_published_at" : "2025-06-17T15:15:53Z"
  }
}