External risk intelligence

Ruby-SAML Authentication Bypass via Signature Wrapping

CVE advisorySeverity: CRITICAL (CVSS 9.3)

CVE-2025-66568

The vulnerability exists in a SAML library, which is a foundational component for identity providers and service providers handling authentication. SAML endpoints are inherently designed to be public-facing to facilitate single sign-on (SSO) and federation across the internet, making them a primary and necessary internet-exposed surface in nearly all real-world deployments that utilize this library.

Authentication Bypass

Onelogin Ruby Saml

before 1.18.0

Halo Surface Signal: 5 out of 5 — more likely to be public-facing.

External exposure likelihood

Horizon Alert

Summary of the vulnerability and why it matters

This advisory concerns a critical vulnerability in the ruby-saml library, which handles SAML-based authentication. An attacker could exploit this flaw to bypass authentication, potentially leading to unauthorized access to systems that rely on this library for identity verification. The main concern is to confirm whether our environment utilizes this specific library and, if so, to assess our exposure.

  • Authentication bypass in SAML library.
  • Critical flaw impacts secure identity verification.
  • Confirm relevance and assess potential exposure.

Attack Path

How an attacker could exploit the issue

An attacker could exploit this by sending a specially crafted XML document to a system using the vulnerable ruby-saml library. The library's reliance on libxml2 for XML transformations can be tricked into processing invalid input, leading to an authentication bypass. This allows an attacker to impersonate a legitimate user.

  • No authentication required.
  • Invalid XML input triggers vulnerability.
  • Allows authentication bypass.

Live Threat

Current exploitation, exposure, and threat context

This vulnerability could allow an unauthenticated attacker to bypass authentication mechanisms when the ruby-saml library is used for SAML authorization. This is possible due to how the library handles invalid XML input during the canonicalization process, potentially leading to a signature wrapping attack.

  • Authentication credentials.
  • Signature wrapping attack.
  • Bypass authentication.

Operational Fix

Recommended remediation, mitigation, and detection steps

Application owners responsible for services relying on the ruby-saml library, along with platform and infrastructure teams managing its deployment, should prioritize this critical vulnerability. The initial step involves identifying all instances of the affected ruby-saml library, assessing their exposure and business criticality, and then coordinating with accountable system owners to plan for remediation, likely involving an upgrade.

  • Application or platform owners must own the issue.
  • Verify critical and exposed SAML deployments first.
  • Plan for upgrades during scheduled maintenance windows.

Supplementary metadata

Validate whether this threat affects your internet-facing exposure.

Halo Threat Intelligence helps prioritize remediation with Halo Surface Signal and H/A/L/O context. Start exposure validation with a free external attack surface trial.

Frequently asked questions

What is the ruby-saml library used for?

The ruby-saml library acts as the client-side engine that processes SAML assertions. Developers include it in Ruby applications to manage single sign-on (SSO) and identity federation, allowing users to authenticate seamlessly between different service and identity providers.

What does CVE-2025-66568 mean?

This vulnerability is an authentication bypass involving a Signature Wrapping attack. It falls under the weakness class CWE-347, which relates to improper verification of cryptographic signatures. Essentially, the library incorrectly validates the integrity of SAML documents due to a flaw in how it processes XML transformations.

How does an attacker trigger this bypass?

An attacker triggers the flaw by submitting a specially crafted XML document containing invalid data. When the library’s dependency, libxml2, attempts to canonicalize this invalid input, it may return an empty string. The library then mistakenly validates the signature against that empty string, treating the malicious input as successfully authenticated.

Is my system at risk?

According to Halo Surface Signal, this risk is high because SAML endpoints are designed to be internet-facing to enable federation. If your application uses an affected version of ruby-saml to process public-facing login requests, your authentication flow is potentially reachable by external actors.

What are the first steps to address this?

Begin by auditing your codebase to identify all instances where the ruby-saml library is currently deployed. Once you have an inventory, coordinate with your engineering teams to prioritize updating to version 1.18.0 or higher, which contains the necessary logic changes to fix how these XML documents are processed.

References