Ruby-SAML, Denial-of-Service, CVE-2023-38103 (Critical)

Listen to this Post

How the CVE Works

The vulnerability in ruby-saml arises from improper validation order when processing SAML responses. The library first checks if the input is Base64-encoded using a regex pattern (!!string.gsub(/[\r\n]|\\r|\\n|\s/, "").match(BASE64_FORMAT) before verifying the message size via message_max_bytesize. Attackers can exploit this by sending excessively large payloads, forcing the application to perform costly regex operations, leading to CPU/memory exhaustion and denial-of-service.

DailyCVE Form

Platform: Ruby-SAML
Version: < 1.15.0
Vulnerability: DoS via regex
Severity: Critical
Date: 2023-08-15

Prediction: Patch by 2023-09-10

What Undercode Say

git clone https://github.com/SAML-Toolkits/ruby-saml
cd ruby-saml
grep -r "base64_encoded?" lib/
PoC: Malformed large SAML payload
payload = "A" 10_000_000
response = OneLogin::RubySaml::Response.new(payload)

How Exploit

  • Craft oversized SAML response
  • Bypass `message_max_bytesize` check
  • Trigger CPU/memory exhaustion

Protection from this CVE

  • Update to >= 1.15.0
  • Reorder validation logic

Impact

  • Service disruption
  • Resource starvation
  • Application crashes

🎯Let’s Practice Exploiting & Learn Patching For Free:

Sources:

Reported By: github.com
Extra Source Hub:
Undercode

🔐JOIN OUR CYBER WORLD [ CVE News • HackMonitor • UndercodeNews ]

💬 Whatsapp | 💬 Telegram

📢 Follow DailyCVE & Stay Tuned:

𝕏 formerly Twitter 🐦 | @ Threads | 🔗 Linkedin Featured Image

Scroll to Top