CVE-2024-45409

10.0 CRITICAL

📋 TL;DR

CVE-2024-45409 is a critical authentication bypass vulnerability in the Ruby SAML library where SAML response signatures are not properly verified. This allows unauthenticated attackers with access to any signed SAML document to forge SAML responses and log in as arbitrary users. All applications using vulnerable versions of ruby-saml or omniauth-saml are affected.

💻 Affected Systems

Products:
  • ruby-saml
  • omniauth-saml
Versions: ruby-saml <= 1.12.2 and 1.13.0 <= 1.16.0
Operating Systems: All operating systems running Ruby applications
Default Config Vulnerable: ⚠️ Yes
Notes: Any Ruby application using SAML authentication with vulnerable library versions is affected regardless of configuration.

📦 What is this software?

Gitlab by Gitlab

GitLab is a complete DevOps platform providing source code management, CI/CD pipelines, security scanning, container registry, and collaboration tools used by millions of developers and thousands of enterprises worldwide. As both a cloud-hosted SaaS offering (GitLab.com) and self-managed software, G...

Learn more about Gitlab →

Gitlab by Gitlab

GitLab is a complete DevOps platform providing source code management, CI/CD pipelines, security scanning, container registry, and collaboration tools used by millions of developers and thousands of enterprises worldwide. As both a cloud-hosted SaaS offering (GitLab.com) and self-managed software, G...

Learn more about Gitlab →

Gitlab by Gitlab

GitLab is a complete DevOps platform providing source code management, CI/CD pipelines, security scanning, container registry, and collaboration tools used by millions of developers and thousands of enterprises worldwide. As both a cloud-hosted SaaS offering (GitLab.com) and self-managed software, G...

Learn more about Gitlab →

Gitlab by Gitlab

GitLab is a complete DevOps platform providing source code management, CI/CD pipelines, security scanning, container registry, and collaboration tools used by millions of developers and thousands of enterprises worldwide. As both a cloud-hosted SaaS offering (GitLab.com) and self-managed software, G...

Learn more about Gitlab →

Gitlab by Gitlab

GitLab is a complete DevOps platform providing source code management, CI/CD pipelines, security scanning, container registry, and collaboration tools used by millions of developers and thousands of enterprises worldwide. As both a cloud-hosted SaaS offering (GitLab.com) and self-managed software, G...

Learn more about Gitlab →

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete compromise of SAML-based authentication systems allowing attackers to impersonate any user, including administrators, leading to full system takeover.

🟠

Likely Case

Attackers gain unauthorized access to user accounts, potentially accessing sensitive data and performing privileged actions.

🟢

If Mitigated

With proper network segmentation and monitoring, impact is limited to the affected SAML service with potential for detection of anomalous authentication patterns.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires access to a signed SAML document from the IdP, but the vulnerability makes forgery trivial once this is obtained.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: ruby-saml 1.17.0 or 1.12.3

Vendor Advisory: https://github.com/SAML-Toolkits/ruby-saml/security/advisories/GHSA-jw9c-mfg7-9rx2

Restart Required: Yes

Instructions:

1. Update Gemfile to require 'ruby-saml', '>= 1.17.0' or '>= 1.12.3, < 1.13.0'. 2. Run 'bundle update ruby-saml'. 3. Restart your Ruby application server.

🔧 Temporary Workarounds

Temporary signature validation override

all

Implement custom signature validation in application code as temporary mitigation

# Add custom validation logic in SAML response handler
# This is complex and error-prone - patching is strongly preferred

🧯 If You Can't Patch

  • Implement additional authentication factors (MFA) for all users
  • Monitor authentication logs for suspicious patterns and implement rate limiting

🔍 How to Verify

Check if Vulnerable:

Check Gemfile.lock or run 'bundle show ruby-saml' to see installed version

Check Version:

bundle show ruby-saml | grep -o '\d\.\d\+\.\d+'

Verify Fix Applied:

Verify version is 1.17.0+ or 1.12.3 with 'bundle show ruby-saml' and test SAML authentication

📡 Detection & Monitoring

Log Indicators:

  • Multiple failed authentication attempts followed by successful login from same IP
  • Unusual user agent strings during SAML authentication
  • Authentication from unexpected geographic locations

Network Indicators:

  • Unusual SAML response sizes or patterns
  • Multiple authentication requests from single source

SIEM Query:

source="application.log" AND ("SAML" OR "authentication") AND (status="success" OR user="*") | stats count by src_ip, user

🔗 References

📤 Share & Export