Skip to main content

CVE-2025-25293: CWE-400: Uncontrolled Resource Consumption in SAML-Toolkits ruby-saml

High
VulnerabilityCVE-2025-25293cvecve-2025-25293cwe-400
Published: Wed Mar 12 2025 (03/12/2025, 20:11:08 UTC)
Source: CVE Database V5
Vendor/Project: SAML-Toolkits
Product: ruby-saml

Description

ruby-saml provides security assertion markup language (SAML) single sign-on (SSO) for Ruby. Prior to versions 1.12.4 and 1.18.0, ruby-saml is susceptible to remote Denial of Service (DoS) with compressed SAML responses. ruby-saml uses zlib to decompress SAML responses in case they're compressed. It is possible to bypass the message size check with a compressed assertion since the message size is checked before inflation and not after. This issue may lead to remote Denial of Service (DoS). Versions 1.12.4 and 1.18.0 fix the issue.

AI-Powered Analysis

AILast updated: 09/12/2025, 23:18:29 UTC

Technical Analysis

CVE-2025-25293 is a high-severity vulnerability affecting the ruby-saml library, a widely used Security Assertion Markup Language (SAML) toolkit for Ruby applications implementing single sign-on (SSO) functionality. The vulnerability arises from an uncontrolled resource consumption issue (CWE-400) related to the handling of compressed SAML responses. Specifically, ruby-saml uses the zlib compression library to decompress incoming SAML assertions. However, the library performs a size check on the compressed message before decompression rather than on the inflated data. This allows an attacker to craft a malicious compressed SAML response that bypasses the size check, resulting in excessive resource consumption during decompression. The consequence is a remote Denial of Service (DoS) attack, where the targeted application becomes unresponsive or crashes due to resource exhaustion. The vulnerability affects ruby-saml versions prior to 1.12.4 and versions from 1.13.0 up to but not including 1.18.0. The issue was addressed in versions 1.12.4 and 1.18.0 by correcting the size validation logic to account for decompressed data size. The CVSS 4.0 score is 7.7 (high), reflecting the network attack vector, no required privileges or user interaction, and a high impact on availability. No known exploits are currently reported in the wild, but the vulnerability is publicly disclosed and patchable.

Potential Impact

For European organizations, the impact of this vulnerability can be significant, especially for those relying on ruby-saml for SSO integration in web applications and enterprise identity management. Exploitation can lead to service outages, disrupting user authentication flows and potentially causing downtime for critical business applications. This can affect productivity, customer trust, and compliance with regulations such as GDPR if service availability is compromised. Additionally, repeated or large-scale DoS attacks could strain infrastructure resources, increasing operational costs. Since SAML is commonly used in federated identity scenarios across sectors like finance, healthcare, government, and education, the disruption could have cascading effects on inter-organizational workflows and access to essential services. The vulnerability does not directly compromise confidentiality or integrity but poses a high risk to availability, which is critical for maintaining continuous access to services.

Mitigation Recommendations

European organizations should immediately assess their use of ruby-saml and identify affected versions. The primary mitigation is to upgrade ruby-saml to version 1.12.4 or 1.18.0 or later, where the vulnerability is fixed. If immediate upgrade is not feasible, organizations should implement network-level protections such as rate limiting and filtering to detect and block suspicious SAML responses with abnormal compression characteristics. Application-level input validation enhancements can be considered to verify decompressed message sizes before processing. Monitoring application logs for unusual decompression errors or resource spikes can provide early detection of attempted exploitation. Additionally, organizations should review their SSO deployment architecture to ensure redundancy and failover capabilities to minimize downtime in case of DoS attempts. Coordinating with identity providers to enforce strict message size and compression policies can further reduce risk. Finally, maintaining up-to-date dependency management and vulnerability scanning processes will help prevent similar issues in the future.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
GitHub_M
Date Reserved
2025-02-06T17:13:33.122Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 68c4a9e26da8ad0abf36f2a3

Added to database: 9/12/2025, 11:16:50 PM

Last enriched: 9/12/2025, 11:18:29 PM

Last updated: 9/13/2025, 3:10:36 AM

Views: 3

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats