Skip to main content

ruby-saml CVE-2025-66567

CRITICAL
Improper Verification of Cryptographic Signature (CWE-347)
2025-12-09 security-advisories@github.com
9.3
CVSS 4.0 · Vendor: github
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain any valid signed SAML assertion
  2. Delivery
    Craft wrapped XML exploiting ReXML/Nokogiri parser differential
  3. Exploit
    Submit forged SAMLResponse to SSO endpoint
  4. Execution
    Signature validated on different node than consumed
  5. Impact
    Authenticate 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.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

rubygems ruby-saml fix: 1.18.0

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

Vendor (github) PRIMARY 9.3 CRITICAL
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
vuln.today AI 9.1 CRITICAL

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.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (github).

CVSS VectorVendor: github

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

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

Why It Matters

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.

Business Impact: Severe
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.4%
Top 68% exploitable
Prevalence
Medium
standard SAML library for Ruby apps, common but language-specific footprint
Data Quality
3 sources
Confidence: Low

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.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Out-of-Cycle
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
Very High

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +46
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

Affected Products (CPE)CVE.org

cpe:2.3:a:onelogin:ruby-saml:*:*:*:*:*:*:*:*

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy