Skip to main content

ruby-saml CVE-2025-66568

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
    Reach SAML SP login endpoint
  2. Delivery
    Craft invalid XML causing canonicalization to empty string
  3. Exploit
    Compute/replay signature over empty canonical form
  4. Execution
    Perform signature wrapping with forged assertion
  5. Impact
    Bypass 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.

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

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

Alert me

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

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

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

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.

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

Why It Matters

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.

Business Impact: High
Compensating Controls

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

EPSS Score
0.2%
Top 87% exploitable
Prevalence
Medium
popular Ruby SAML library, but scoped to Ruby apps using SAML SSO
Data Quality
4 sources
Confidence: Medium

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.2%
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
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
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