The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2025-25291

CVE-2025-25291: Omniauth SAML Auth Bypass Vulnerability

CVE-2025-25291 is an authentication bypass flaw in ruby-saml caused by parser differential between ReXML and Nokogiri. Attackers can exploit this to bypass authentication. This article covers technical details, affected versions, impact, and mitigation strategies.

Updated: January 22, 2026

CVE-2025-25291 Overview

CVE-2025-25291 is a critical authentication bypass vulnerability in the ruby-saml library, which provides Security Assertion Markup Language (SAML) single sign-on (SSO) functionality for Ruby applications. The vulnerability stems from a parser differential between ReXML and Nokogiri XML parsing engines, which can generate entirely different document structures from the same XML input. This discrepancy allows attackers to execute a Signature Wrapping attack, effectively bypassing SAML authentication mechanisms.

Critical Impact

This authentication bypass vulnerability allows attackers to potentially sign in as any user by exploiting XML parser differentials, completely circumventing SAML SSO authentication controls.

Affected Products

  • onelogin ruby-saml (versions prior to 1.12.4 and 1.18.0)
  • omniauth omniauth_saml
  • netapp storagegrid

Discovery Timeline

  • 2025-03-12 - CVE-2025-25291 published to NVD
  • 2025-03-12 - GitLab releases security patch 17.9.2 addressing the vulnerability
  • 2025-11-03 - Last updated in NVD database

Technical Details for CVE-2025-25291

Vulnerability Analysis

The vulnerability exists in how ruby-saml processes SAML responses using two different XML parsing libraries: ReXML (Ruby's standard library XML parser) and Nokogiri (a popular Ruby XML/HTML parser). When parsing the same SAML XML document, these parsers can produce fundamentally different document structures. This parser differential creates an exploitable condition where an attacker can craft malicious SAML responses that pass signature validation using one parser's interpretation while being processed differently by the other parser.

The core issue relates to CWE-347 (Improper Verification of Cryptographic Signature), where the signature verification process can be bypassed due to the inconsistent handling of XML elements between parsers. In a Signature Wrapping attack, the attacker injects malicious content into the SAML response in a way that the legitimate signed content satisfies signature verification, but the malicious unsigned content is what gets processed for authentication decisions.

Root Cause

The root cause lies in the lack of consistent XML document handling across different parsing engines within ruby-saml. When SAML responses are validated, the signature verification may use one parser's document representation while the actual authentication assertion extraction uses another. This architectural flaw allows attackers to exploit the semantic differences between how ReXML and Nokogiri interpret namespace handling, element ordering, and document structure.

Attack Vector

The attack is network-based and requires no user interaction or prior authentication. An attacker with knowledge of a valid user identifier in the target system can craft a specially formed SAML response that exploits the parser differential. The malicious response contains both a legitimately signed portion (which passes signature verification) and an unsigned malicious assertion (which gets used for authentication). By exploiting how different parsers traverse and interpret the XML document tree, the attacker can effectively authenticate as any user without possessing valid credentials.

ruby
# Security patch in lib/onelogin/ruby-saml/response.rb
# Source: https://github.com/SAML-Toolkits/ruby-saml/commit/e76c5b36bac40aedbf1ba7ffaaf495be63328cd9

       #
       def validate_structure
         structure_error_msg = "Invalid SAML Response. Not match the saml-schema-protocol-2.0.xsd"
-        unless valid_saml?(document, soft)
+        check_malformed_doc = check_malformed_doc_enabled?
+        unless valid_saml?(document, soft, check_malformed_doc)
           return append_error(structure_error_msg)
         end
 
         unless decrypted_document.nil?
-          unless valid_saml?(decrypted_document, soft)
+          unless valid_saml?(decrypted_document, soft, check_malformed_doc)
             return append_error(structure_error_msg)
           end
         end

The patch introduces a check_malformed_doc parameter that enables additional validation to detect XML documents that could be interpreted differently by various parsers, preventing the exploitation of parser differentials.

Detection Methods for CVE-2025-25291

Indicators of Compromise

  • Unusual SAML response structures containing duplicate or nested assertion elements
  • Authentication events where the authenticated user identity doesn't match expected request patterns
  • SAML responses with XML structures that appear malformed or contain unexpected namespace declarations
  • Successful authentications from users without corresponding identity provider (IdP) session creation

Detection Strategies

  • Monitor SAML authentication logs for anomalies such as multiple assertions in a single response or unexpected element ordering
  • Implement deep XML inspection on SAML responses to detect signature wrapping attempts
  • Compare authenticated user identities against expected authentication flows and IdP records
  • Deploy web application firewalls (WAF) with rules to detect malformed SAML assertions

Monitoring Recommendations

  • Enable verbose logging for all SAML authentication events including full response payloads
  • Set up alerts for authentication bypass indicators such as successful logins without matching IdP confirmations
  • Monitor for unusual patterns in user authentication timing and source IP addresses
  • Track ruby-saml library version usage across all applications and flag instances running vulnerable versions

How to Mitigate CVE-2025-25291

Immediate Actions Required

  • Upgrade ruby-saml to version 1.12.4 or 1.18.0 immediately
  • Audit all Ruby applications using SAML authentication for vulnerable library versions
  • Review authentication logs for any suspicious activity that may indicate exploitation
  • Consider temporarily disabling SAML SSO if immediate patching is not possible and assess alternative authentication mechanisms

Patch Information

Security patches are available in ruby-saml versions 1.12.4 and 1.18.0. The patches introduce a check_malformed_doc validation parameter that ensures consistent XML document interpretation across parsers, effectively preventing Signature Wrapping attacks. For detailed patch information, see the ruby-saml Security Advisory GHSA-4vc4-m8qh-g8jm.

GitLab users should upgrade to version 17.9.2 or later, as documented in the GitLab Patch Release 17.9.2. NetApp StorageGRID users should consult the NetApp Security Advisory ntap-20250314-0010 for vendor-specific guidance.

Workarounds

  • If patching is not immediately feasible, implement strict XML structure validation before SAML responses reach ruby-saml
  • Consider using a single consistent XML parser throughout the SAML processing chain
  • Deploy network-level controls to inspect and reject SAML responses with suspicious XML structures
  • Implement additional authentication factors as a defense-in-depth measure until patching is complete
bash
# Update ruby-saml using Bundler
bundle update ruby-saml

# Verify installed version
bundle show ruby-saml
# Should output: ruby-saml (1.12.4) or ruby-saml (1.18.0) or higher

# For omniauth-saml users
bundle update omniauth-saml

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeAuth Bypass

  • Vendor/TechOmniauth

  • SeverityCRITICAL

  • CVSS Score9.3

  • EPSS Probability13.85%

  • Known ExploitedNo
  • CVSS Vector
  • 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-347
  • Technical References
  • GitHub Security Bypass Advisory

  • ruby-saml Release v1.12.4

  • ruby-saml Release v1.18.0

  • PortSwigger SAML Roulette Analysis

  • GitHub Security Advisory GHSL-2024-329

  • Debian LTS Security Announcement

  • Hacker News Discussion

  • NetApp Security Advisory ntap-20250314-0010
  • Vendor Resources
  • GitLab Patch Release 17.9.2

  • ruby-saml Commit e76c5b36

  • ruby-saml Commit e9c1cdbd0

  • ruby-saml Security Advisory GHSA-4vc4-m8qh-g8jm

  • omniauth-saml Security Advisory GHSA-hw46-3hmr-x9xv
  • Related CVEs
  • CVE-2025-25292: Omniauth SAML Auth Bypass Vulnerability

  • CVE-2025-25293: Omniauth SAML DoS Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English