CVE-2025-66567: Ruby saml Authentication Bypass Vulnerability

CRITICAL
Advisory Identifier: GHSA-9v8j-x534-2fx3
CWE-347
Published
Advisory Summary

CVE-2025-66567 is a CRITICAL authentication bypass vulnerability (CWE-347: Improper Verification of Cryptographic Signature) affecting Ruby saml libraries in the RubyGems ecosystem. The issue involves ruby-saml has a saml authentication bypass due to namespace handling (parser differential). Remediation is available by upgrading affected packages to version 1.18.0.

CVE-2025-66567 at a Glance

CVE Identifier CVE-2025-66567
GHSA Identifier GHSA-9v8j-x534-2fx3
Severity CRITICAL
CVSS v3.1 Base Score N/A
CWE Classification CWE-347: Improper Verification of Cryptographic Signature
Affected Product Ruby saml
Package Ecosystem RubyGems
Published Date
Last Updated

How to Fix CVE-2025-66567

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.18.0
Upgrade ruby-saml to 1.18.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-2025-66567, 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.18.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-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

### Summary Ruby-saml up to and including 1.12.4, there is an authentication bypass vulnerability because of an incomplete fix for CVE-2025-25292. ReXML and Nokogiri parse XML differently, the parsers can generate entirely different document structures from the same XML input. That allows an attacker to be able to execute a Signature Wrapping attack. The vulnerability does not affect the version 1.18.0. ### Impact That allows an attacker to be able to execute a Signature Wrapping attack and bypass the authentication

CVE-2025-66567 Affected Ruby saml Versions

1 component(s)
Fixed Versions:
1.18.0
Product / Package Ecosystem Affected Versions Fixed Version
ruby-saml
RubyGems
< 1.18.0
1.18.0

References

Frequently Asked Questions

What is CVE-2025-66567?
CVE-2025-66567 is a security vulnerability in Ruby saml involving Ruby-saml has a SAML authentication bypass due to namespace handling (parser differential) under CWE-347: Improper Verification of Cryptographic Signature.
Which Ruby saml versions are affected?
Affected versions include releases prior to 1.18.0 across affected packages: ruby-saml.
What version fixes CVE-2025-66567?
Upgrading to 1.18.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.18.0. Upgrade your dependency to 1.18.0 or later.
What CWE is associated with CVE-2025-66567?
CVE-2025-66567 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-2025-66567?
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-9v8j-x534-2fx3",
  "modified" : "2025-12-12T21:52:23Z",
  "published" : "2025-12-08T21:30:56Z",
  "aliases" : [ "CVE-2025-66567" ],
  "summary" : "Ruby-saml has a SAML authentication bypass due to namespace handling (parser differential)",
  "details" : "### Summary\n\nRuby-saml up to and including 1.12.4, there is an authentication bypass vulnerability because of an incomplete fix for CVE-2025-25292. ReXML and Nokogiri parse XML differently, the parsers can generate entirely different document structures from the same XML input. That allows an attacker to be able to execute a Signature Wrapping attack. The vulnerability does not affect the version 1.18.0.\n\n### Impact\nThat allows an attacker to be able to execute a Signature Wrapping attack and bypass the authentication",
  "severity" : [ {
    "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" : "RubyGems",
      "name" : "ruby-saml"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.18.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/SAML-Toolkits/ruby-saml/security/advisories/GHSA-9v8j-x534-2fx3"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-66567"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/SAML-Toolkits/ruby-saml/commit/e9c1cdbd0f9afa467b585de279db0cbd0fb8ae97"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/SAML-Toolkits/ruby-saml"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-754f-8gm6-c4r2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/ruby-saml/CVE-2025-66567.yml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-347" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-12-08T21:30:56Z",
    "nvd_published_at" : "2025-12-09T16:18:21Z"
  }
}