ruby-saml
CVE-2025-66567
CRITICAL
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain any valid signed SAML assertion
-
DeliveryCraft wrapped XML exploiting ReXML/Nokogiri parser differential
-
ExploitSubmit forged SAMLResponse to SSO endpoint
-
ExecutionSignature validated on different node than consumed
-
ImpactAuthenticate as arbitrary/privileged user
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A04:2025 - Cryptographic Failures
ASVS 5.0
V11 - Cryptography Signature verification
|
| Exploitation Conditions | Exploitation requires that the target application uses ruby-saml version 1.12.4 or earlier as its SAML service-provider/client library for SSO authentication, with SAML login enabled and an associated IdP trust relationship. The attacker needs a single validly signed SAML assertion (e.g., any legitimately issued token) to wrap, then abuses the divergence between ReXML and Nokogiri XML parsing to have the signature verified over one structure while a different, attacker-chosen assertion is consumed as the identity. No special non-default configuration, user interaction, or prior authentication to the target is required (PR:N/UI:N); the principal limiting factor is simply that the deployment must run an affected ruby-saml version for SAML - applications on 1.18.0+ or not using SAML SSO are unaffected. |
| Impact | This is a genuine high-priority vulnerability, not a high-CVSS-but-low-risk issue. The vendor-supplied CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N, 9.3 Critical) describes a network-reachable, low-complexity, unauthenticated flaw with high confidentiality and integrity impact - fully consistent with an authentication-bypass/signature-wrapping class (CWE-347). The core risk driver is the security semantics: a SAML signature-wrapping bypass lets an attacker impersonate arbitrary users, which is categorically severe for any SSO-protected application. No EPSS score, CISA KEV listing, or public POC is present in the provided data, so there is no public exploit identified at time of analysis - the severity rests on impact and exploitability metrics rather than observed exploitation. One notable amplifier: this CVE is explicitly an incomplete fix for CVE-2025-25292, meaning the attack surface and signature-wrapping techniques are already publicly documented from the prior CVE, lowering the practical research barrier even without a dedicated POC. No conflicting signals were detected: the CVSS metrics, the description, and the source-code patch (namespace-handling and single-document validation hardening) all point to the same unauthenticated SAML bypass. |
| Exploit ScenarioDerived | An attacker targeting a Ruby application that uses ruby-saml (≤1.12.4) for SAML SSO crafts a malicious SAMLResponse exploiting the fact that ReXML and Nokogiri build different document trees from the same XML. The signature is validated against one parsed structure while a wrapped, attacker-controlled assertion is consumed as the authentication claim, letting the attacker log in as any user. No public exploit is identified in the provided data, but the technique mirrors the prior CVE-2025-25292 signature-wrapping attack that this fix incompletely addressed. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 14, 2026
SAML authentication bypass in ruby-saml versions up to and including 1.12.4 allows a remote, unauthenticated attacker to impersonate arbitrary users in applications that use the library as their SAML service-provider client. The root cause is an incomplete fix for CVE-2025-25292: because ReXML and Nokogiri generate different document structures from identical XML input, an attacker who holds any legitimately signed SAML assertion can perform a Signature Wrapping attack, having the signature verified over one element while a different, attacker-chosen assertion is consumed as the authenticated identity. The flaw is not listed in CISA KEV and no public exploit code has been identified at time of analysis, but exploitation requires only network reachability and a single valid signed assertion (CVSS 4.0 base 9.3; independently assessed as CVSS 3.1 AV:N/AC:L/PR:N/UI:N with high confidentiality and integrity impact); version 1.18.0 contains the vendor fix.
RemediationAI
Upgrade ruby-saml to version 1.18.0 or later - the vendor advisory explicitly identifies 1.18.0 as the fixed release (vulnerable: < 1.18.0), and the fix is carried in upstream commit e9c1cdbd0f9afa467b585de279db0cbd0fb8ae97; see https://github.com/SAML-Toolkits/ruby-saml/security/advisories/GHSA-9v8j-x534-2fx3 and https://github.com/advisories/GHSA-754f-8gm6-c4r2. Because this is an incomplete-fix follow-on to CVE-2025-25292, verify that any earlier Signature Wrapping backport or monkey patch is removed after upgrading, since partial patches left the parser-differential path reachable. If an immediate upgrade is impossible, the practical compensating controls are to reject any SAML Response or LogoutResponse that contains more than one Assertion or EncryptedAssertion element, or whose signed element ID does not resolve to the assertion actually consumed for authentication - a response-shape check that must be implemented outside the vulnerable library and carries the trade-off of rejecting unusually formatted but legitimate IdP output. Enabling the stricter malformed-document checking introduced by the patch (the check_malformed_doc setting) reduces exposure but is not a substitute for 1.18.0 and may cause interoperability failures with legacy IdPs that emit loosely formatted XML. Where SAML cannot be hardened promptly, consider temporarily disabling SAML SSO or restricting it to a single trusted IdP identity plane, accepting the operational cost of losing federated login.
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 service-provider (client) side of SAML 2.0 single sign-on in Ruby, receiving and validating signed XML assertions from an identity provider. Signature validation in this class of library depends on XML Digital Signature (XMLDSig) processing over a specific element identified by an ID attribute, but the library has historically mixed parsers: ReXML is used for the security-relevant XPath and signature-reference extraction, while other parts of the stack and the wider application ecosystem commonly use Nokogiri (libxml2). The two parsers resolve namespaces, entity handling, and element nesting differently, so the same byte stream can yield structurally different documents - the classic parser differential that enables Signature Wrapping, tracked here as CWE-347 (Improper Verification of Cryptographic Signature). The upstream fix commit e9c1cdbd0f9afa467b585de279db0cbd0fb8ae97 addresses this by introducing a frozen SAML_NAMESPACES constant, adding a doc_to_validate / signed_assertion path that caches the referenced (signed) XML via cache_referenced_xml, and rewriting the assertion lookups in lib/onelogin/ruby-saml/response.rb and lib/onelogin/ruby-saml/logoutresponse.rb to query relative to the cached signed assertion ("./#{subelt}") rather than re-resolving absolute /p:Response/a:Assertion paths that a wrapped document could satisfy with an unsigned element. The commit also threads a settings-driven check_malformed_doc flag through valid_saml?, so operators can force rejection of malformed documents.
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
Network-reachable unauthenticated SAML bypass (AV:N/AC:L/PR:N/UI:N); impersonation yields high confidentiality and integrity, no availability impact, scope unchanged per vendor subsequent-system metrics.
Primary rating from Vendor (github).
CVSS VectorVendor: github
DescriptionCVE.org
The ruby-saml library is for implementing the client side of a SAML authorization. ruby-saml versions up to and including 1.12.4 contain an authentication bypass vulnerability due to an incomplete fix for CVE-2025-25292. ReXML and Nokogiri parse XML differently, generating entirely different document structures from the same input. This allows an attacker to execute a Signature Wrapping attack. This issue is fixed in version 1.18.0.
Executive ViewAI
Applications using the ruby-saml library at versions up to and including 1.12.4 face a critical authentication bypass that can allow an unauthenticated attacker to impersonate arbitrary users through SAML single sign-on, potentially exposing sensitive data and privileged business functions. The issue affects any organization relying on those library versions as a SAML service-provider client, and it undermines trust in SSO as an access control boundary. Although no public exploit identified at time of analysis, the vendor has released a fix in version 1.18.0, making immediate upgrade a priority for security management.
Apply vendor patch.
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.
Authentication bypass in ruby-saml (OneLogin SAML toolkit) versions up to and including 1.12.4 lets remote, unauthentica
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