Description

The ruby-saml library was found to contain two critical authentication bypass flaws, tracked as CVE-2025-66567 and CVE-2025-66568, which allow attackers to impersonate any user without valid credentials. These issues affect applications that rely on SAML-based single sign-on through ruby-saml. By exploiting these weaknesses, an attacker can craft malicious SAML responses that appear valid to the application, enabling unauthorized access and full account takeover. The vulnerabilities stem from weaknesses in how XML parsing and canonicalization are handled inside the library. In the first flaw, different XML parsers interpret the same data inconsistently, enabling signature-wrapping attacks. In the second flaw, improper canonicalization through libxml2 allows an attacker to generate signatures over empty or malformed structures that the validation logic still accepts as legitimate. Together, these flaws break core SAML integrity controls and pose a high-risk authentication bypass scenario for any Ruby application using vulnerable versions. Immediate remediation involves upgrading ruby-saml to the latest fixed release. Organizations should also audit all systems using SAML-SSO integrations, review authentication logs for suspicious login behavior, and apply strict hardening around SAML endpoints. Additional layers such as MFA, network restrictions, and rigorous input validation further reduce exposure. Early patching is strongly recommended, given the critical severity and potential for silent exploitation.