ruby-saml
CVE-2025-66568
CRITICAL
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessReach SAML SP login endpoint
-
DeliveryCraft invalid XML causing canonicalization to empty string
-
ExploitCompute/replay signature over empty canonical form
-
ExecutionPerform signature wrapping with forged assertion
-
ImpactBypass authentication as chosen user
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A04:2025 - Cryptographic Failures
ASVS 5.0
V11 - Cryptography Signature verification
|
| Exploitation Conditions | The target application must use the ruby-saml library at version 1.12.4 or earlier, configured as a SAML service provider that validates signed SAML responses/assertions via Nokogiri/libxml2 canonicalization. Exploitation requires the attacker to craft invalid XML input that makes libxml2 canonicalization return an empty string so the DigestValue is computed over that empty string, enabling a signature-wrapping attack; the replay variant additionally requires that an empty canonical form was signed at some point (e.g., a prior interaction or misconfigured flow). Limiting factors: only affects deployments actually using ruby-saml for SAML SSO and still on a vulnerable version - no special attacker privileges, authentication, or user interaction are required per the CVSS vector (PR:N/UI:N), making any exposed vulnerable SAML login endpoint reachable by remote unauthenticated attackers. |
| Impact | This is a genuinely high-priority flaw whose signals are largely consistent. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) describes a network-reachable, low-complexity, unauthenticated attack with high confidentiality and integrity impact (VC:H/VI:H), scoring 9.3 - appropriate for an authentication-bypass/signature-wrapping flaw in a SAML service-provider library, since bypassing SAML signature validation lets an attacker forge assertions and impersonate arbitrary users. The one notable tension is that EPSS is very low (0.24%, 13th percentile) and there is NO CISA KEV listing and no evidence of public exploit code in the provided data - only the vendor GHSA advisory and the fix commit. This low EPSS despite a critical score is typical for a freshly disclosed library vulnerability that is severe in principle but not yet weaponized or widely scanned; it reflects absence of observed exploitation, not low exploitability. SSVC-style reasoning: technical impact is total (auth bypass), and exploitation is automatable in principle once a working signature-wrapping payload exists, but current exploitation status is 'none observed.' Net: treat as a high-priority patch for any Ruby application using ruby-saml as a SAML SP, while noting that real-world exploitation has not yet been demonstrated in the supplied intelligence. |
| Exploit ScenarioDerived | An attacker targeting a Ruby web application that uses ruby-saml (<=1.12.4) as a SAML service provider crafts a malicious SAML response containing XML that triggers a libxml2 canonicalization failure, causing the DigestValue to be computed over an empty string. Using this, the attacker performs a signature-wrapping attack so that forged assertion content is accepted as validly signed, authenticating as an arbitrary (e.g., administrative) user without valid credentials. No public exploit code is identified in the provided data, but the GitHub Security Advisory and fix commit describe the mechanism in detail. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 14, 2026
Authentication bypass in ruby-saml (OneLogin SAML toolkit) versions up to and including 1.12.4 lets remote, unauthenticated attackers defeat SAML signature verification by exploiting a libxml2 canonicalization failure that yields an empty string, enabling a Signature Wrapping attack against identity providers and service providers built on the library. Any application that uses the vulnerable gem to validate signed SAML responses/assertions is affected, and no privileges or user interaction are required per the assessed vector (PR:N/UI:N), so an internet-exposed SAML login endpoint is reachable by unauthenticated attackers. The fix is vendor-released in 1.18.0; at time of analysis there is no CISA KEV listing and no public exploit code has been identified, and EPSS is low at ~0.24% (13th percentile), suggesting exploitation has not yet been observed at scale despite the high technical severity.
RemediationAI
Vendor-released patch: upgrade ruby-saml to 1.18.0 or later, which is the version explicitly identified by the advisory as not affected and which incorporates the fix commit acac9e9cc0b9a507882c614f25d41f8b47be349a; the upstream advisory is at https://github.com/SAML-Toolkits/ruby-saml/security/advisories/GHSA-x4h9-gwv3-r4m4. The same commit also introduces a message size bound (settings.message_max_bytesize) that rejects oversized decoded SAML messages, so deployments that set this value should review it before enabling - too small a limit can cause legitimate large assertions to be rejected with a ValidationError, while leaving it unset or very high forfeits that additional hardening. Until upgrading is possible, compensating controls include treating any canonicalization result that is empty or that fails to match the expected node as a hard validation failure in application code that wraps the library, requiring assertion and response signatures against pinned, explicitly trusted IdP certificates, enforcing strict SAML schema and XSD validation before signature checks so malformed XML is rejected early, and monitoring SAML login endpoints for unusual replay patterns from the same assertion ID or empty-form signatures; these controls reduce exposure but do not fully replace the patched canonicalization behavior, and tightening XML/schema validation carries the trade-off of potentially rejecting non-conformant but otherwise legitimate IdP responses.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in rubygems
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
ruby-saml implements the client (service provider) side of SAML 2.0 authorization, parsing XML assertions with Nokogiri, which binds to libxml2 for XML processing and canonicalization (C14N). The root cause is classified as CWE-347 (Improper Verification of Cryptographic Signature): when libxml2's canonicalization routine is invoked on invalid or malformed XML input, it can return an empty string instead of a properly canonicalized node or an error. ruby-saml treats that empty string as a successful canonicalization result and computes the DigestValue over it, so the digest/signature validation performs its comparison against an empty canonical form rather than the actual signed content. An attacker can therefore craft input that drives canonicalization to empty and either force digest validation to pass incorrectly or replay a signature that was previously produced over an empty canonical form (for example in a prior interaction or a misconfigured flow), performing a SAML Signature Wrapping attack that substitutes or envelops assertions. The CPE cpe:2.3:a:onelogin:ruby-saml tracks the affected gem lineage under the OneLogin namespace, with the vulnerable range being versions < 1.18.0 per the GitHub advisory (GHSA-x4h9-gwv3-r4m4).
Know when Ruby Saml gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Remote unauthenticated SAML signature-bypass over the network with no user interaction (AV:N/AC:L/PR:N/UI:N); forged authentication yields high confidentiality and integrity impact, no availability impact.
Primary rating from Vendor (github).
CVSS VectorVendor: github
DescriptionCVE.org
The ruby-saml library implements the client side of an SAML authorization. Versions up to and including 1.12.4, are vulnerable to authentication bypass through the libxml2 canonicalization process used by Nokogiri for document transformation, which allows an attacker to execute a Signature Wrapping attack. When libxml2’s canonicalization is invoked on an invalid XML input, it may return an empty string rather than a canonicalized node. ruby-saml then proceeds to compute the DigestValue over this empty string, treating it as if canonicalization succeeded. This issue is fixed in version 1.18.0.
Executive ViewAI
A critical authentication bypass in the ruby-saml library (all versions through 1.12.4) lets anyone on the internet forge SAML assertions and log in as an arbitrary user, compromising every application that depends on the gem for single sign-on. Because the affected endpoints typically sit in front of identity providers and federated enterprise applications, a successful attack could hand an outsider broad, credential-free access to internal and SaaS systems. Leadership should prioritize this as an identity-infrastructure remediation now, even though no public exploit code or active exploitation has been identified at time of analysis.
Apply vendor patch (upgrade to ruby-saml 1.18.0 or later); if the upgrade cannot be completed immediately, disable or network-restrict SAML SSO endpoints, enable strict allowlisting of trusted IdP metadata and signature algorithms, and add alerting for unusual authentication patterns.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
Affected Products (CPE)CVE.org
ruby-saml provides security assertion markup language (SAML) single sign-on (SSO) for Ruby. Rated critical severity (CVS
ruby-saml provides security assertion markup language (SAML) single sign-on (SSO) for Ruby. Rated critical severity (CVS
The Ruby SAML library is for implementing the client side of a SAML authorization. Rated critical severity (CVSS 9.8), t
ruby-saml provides security assertion markup language (SAML) single sign-on (SSO) for Ruby. Rated high severity (CVSS 7.
SAML authentication bypass in ruby-saml versions up to and including 1.12.4 allows a remote, unauthenticated attacker to
Ruby-saml before 1.3.0 allows attackers to perform XML signature wrapping attacks via unspecified vectors. Rated high se
NVD
CVE.org
EPSS
GitHub
Exploit-DB