CVE-2024-25718: Samly Samly Access Control Vulnerability Vulnerability

CRITICAL
Advisory Identifier: GHSA-h3rw-77w7-92gf
CVSS 9.1
CWE-613 CWE-400
Published
Advisory Summary

CVE-2024-25718 is a CRITICAL (CVSS 9.1) samly access control vulnerability vulnerability (CWE-613: Insufficient Session Expiration) affecting Samly libraries in the Hex ecosystem. The issue involves samly access control vulnerability. Remediation is available by upgrading affected packages to version 1.4.0.

CVE-2024-25718 at a Glance

CVE Identifier CVE-2024-25718
GHSA Identifier GHSA-h3rw-77w7-92gf
Severity CRITICAL
CVSS v3.1 Base Score 9.1
CWE Classification CWE-613: Insufficient Session Expiration
Affected Product Samly
Package Ecosystem Hex
Published Date
Last Updated

Security Impact

CVSS: 9.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2024-25718

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

Samly fixed: 1.4.0
Upgrade Samly to 1.4.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 Samly

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-25718, inspect your project dependencies for Samly:

inspect dependencies for Samly

Analyze the terminal output to locate any version of Samly in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.4.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 Samly, 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

In the Samly package before 1.4.0 for Elixir, `Samly.State.Store.get_assertion/3` can return an expired session, which interferes with access control because Samly.AuthHandler uses a cached session and does not replace it, even after expiry.

CVE-2024-25718 Affected Samly Versions

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

References

Frequently Asked Questions

What is CVE-2024-25718?
CVE-2024-25718 is a security vulnerability in Samly involving Samly access control vulnerability under CWE-613: Insufficient Session Expiration.
Which Samly versions are affected?
Affected versions include releases prior to 1.4.0 across affected packages: Samly.
What version fixes CVE-2024-25718?
Upgrading to 1.4.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is Samly affected?
Yes, Samly is affected in releases prior to 1.4.0. Upgrade your dependency to 1.4.0 or later.
What is the CVSS score of CVE-2024-25718?
CVE-2024-25718 has a CVSS v3.1 base score of 9.1 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2024-25718?
CVE-2024-25718 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-2024-25718?
Run the dependency tree command: 'inspect dependencies for Samly'. 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-h3rw-77w7-92gf",
  "modified" : "2024-10-21T21:40:48Z",
  "published" : "2024-02-11T06:30:27Z",
  "aliases" : [ "CVE-2024-25718" ],
  "summary" : "Samly access control vulnerability",
  "details" : "In the Samly package before 1.4.0 for Elixir, `Samly.State.Store.get_assertion/3` can return an expired session, which interferes with access control because Samly.AuthHandler uses a cached session and does not replace it, even after expiry.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Hex",
      "name" : "Samly"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.4.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-25718"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dropbox/samly/pull/13"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dropbox/samly/pull/13/commits/812b5c3ad076dc9c9334c1a560c8e6470607d1eb"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dropbox/samly/commit/7637ebeef6c6b88ec2032f5323c32edcebbacbc6"
  }, {
    "type" : "WEB",
    "url" : "https://diff.hex.pm/diff/samly/1.3.0..1.4.0"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/dropbox/samly"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/handnot2/samly"
  }, {
    "type" : "WEB",
    "url" : "https://hex.pm/packages/samly"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400", "CWE-613" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-02-12T17:22:18Z",
    "nvd_published_at" : "2024-02-11T05:15:08Z"
  }
}