CVE-2024-45409: Ruby saml Authentication Bypass Vulnerability

CRITICAL
Advisory Identifier: GHSA-jw9c-mfg7-9rx2
CVSS 10.0
CWE-347
Published
Advisory Summary

CVE-2024-45409 is a CRITICAL (CVSS 10.0) authentication bypass vulnerability (CWE-347: Improper Verification of Cryptographic Signature) affecting Ruby saml libraries in the RubyGems ecosystem. The issue involves saml authentication bypass via incorrect xpath selector. Remediation is available by upgrading affected packages to version 1.12.3, 1.17.0.

CVE-2024-45409 at a Glance

CVE Identifier CVE-2024-45409
GHSA Identifier GHSA-jw9c-mfg7-9rx2
Severity CRITICAL
CVSS v3.1 Base Score 10.0
CWE Classification CWE-347: Improper Verification of Cryptographic Signature
Affected Product Ruby saml
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 10.0

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:C/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 Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2024-45409

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

ruby-saml fixed: 1.12.3
Upgrade ruby-saml to 1.12.3
ruby-saml fixed: 1.17.0
Upgrade ruby-saml to 1.17.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 ruby-saml

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-45409, inspect your project dependencies for Ruby saml:

inspect dependencies for ruby-saml

Analyze the terminal output to locate any version of Ruby saml in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.12.3), 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-347: Improper Verification of Cryptographic Signature, where the product does not verify, or incorrectly verifies, the cryptographic signature for data. In Ruby saml, 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

Ruby-SAML in <= 12.2 and 1.13.0 <= 1.16.0 does not properly verify the signature of the SAML Response. An unauthenticated attacker with access to any signed saml document (by the IdP) can thus forge a SAML Response/Assertion with arbitrary contents. This would allow the attacker to log in as arbitrary user within the vulnerable system. This vulnerability was reported by ahacker1 of SecureSAML (ahacker1@securesaml.com)

CVE-2024-45409 Affected Ruby saml Versions

2 component(s)
Fixed Versions:
1.12.31.17.0
Product / Package Ecosystem Affected Versions Fixed Version
ruby-saml
RubyGems
< 1.12.3
1.12.3
ruby-saml
RubyGems
≥ 1.13.0
< 1.17.0
1.17.0

References

Frequently Asked Questions

What is CVE-2024-45409?
CVE-2024-45409 is a security vulnerability in Ruby saml involving SAML authentication bypass via Incorrect XPath selector under CWE-347: Improper Verification of Cryptographic Signature.
Which Ruby saml versions are affected?
Affected versions include releases prior to 1.12.3, 1.17.0 across affected packages: ruby-saml.
What version fixes CVE-2024-45409?
Upgrading to 1.12.3, 1.17.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is ruby-saml affected?
Yes, ruby-saml is affected in releases prior to 1.12.3, 1.17.0. Upgrade your dependency to 1.12.3, 1.17.0 or later.
What is the CVSS score of CVE-2024-45409?
CVE-2024-45409 has a CVSS v3.1 base score of 10.0 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N.
What CWE is associated with CVE-2024-45409?
CVE-2024-45409 is classified under CWE-347: Improper Verification of Cryptographic Signature (The product does not verify, or incorrectly verifies, the cryptographic signature for data.).
How can I check RubyGems dependencies for CVE-2024-45409?
Run the dependency tree command: 'inspect dependencies for ruby-saml'. 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-jw9c-mfg7-9rx2",
  "modified" : "2026-06-08T23:17:17Z",
  "published" : "2024-09-10T19:42:03Z",
  "aliases" : [ "CVE-2024-45409" ],
  "summary" : "SAML authentication bypass via Incorrect XPath selector",
  "details" : "Ruby-SAML in <= 12.2 and 1.13.0 <= 1.16.0 does not properly verify the signature of the SAML Response. An unauthenticated attacker with access to any signed saml document (by the IdP) can thus forge a SAML Response/Assertion with arbitrary contents. This would allow the attacker to log in as arbitrary user within the vulnerable system.\n\nThis vulnerability was reported by ahacker1 of SecureSAML (ahacker1@securesaml.com)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/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:H/SI:H/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "ruby-saml"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.12.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "ruby-saml"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.13.0"
      }, {
        "fixed" : "1.17.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/SAML-Toolkits/ruby-saml/security/advisories/GHSA-jw9c-mfg7-9rx2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/omniauth/omniauth-saml/security/advisories/GHSA-cvp8-5r8g-fhvq"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-45409"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/SAML-Toolkits/ruby-saml/commit/1ec5392bc506fe43a02dbb66b68741051c5ffeae"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/SAML-Toolkits/ruby-saml/commit/4865d030cae9705ee5cdb12415c654c634093ae7"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/omniauth/omniauth-saml/commit/4274e9d57e65f2dcaae4aa3b2accf831494f2ddd"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/SAML-Toolkits/ruby-saml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/omniauth-saml/CVE-2024-45409.yml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/omniauth-saml/GHSA-cvp8-5r8g-fhvq.yml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/ruby-saml/CVE-2024-45409.yml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-347" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-09-10T19:42:03Z",
    "nvd_published_at" : "2024-09-10T19:15:22Z"
  }
}