CVE-2024-25718

9.8 CRITICAL

📋 TL;DR

This vulnerability in the Samly package for Elixir allows expired authentication sessions to remain valid, potentially enabling unauthorized access to protected resources. It affects applications using Samly for SAML-based authentication before version 1.4.0. Attackers could exploit this to bypass access controls and gain privileges they shouldn't have.

💻 Affected Systems

Products:
  • Samly package for Elixir
Versions: All versions before 1.4.0
Operating Systems: Any OS running Elixir applications with Samly
Default Config Vulnerable: ⚠️ Yes
Notes: Affects any Elixir application using Samly for SAML authentication with default configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise where attackers gain administrative access to all protected resources, potentially leading to data theft, privilege escalation, and full control over affected applications.

🟠

Likely Case

Unauthorized access to protected resources and data, allowing attackers to impersonate legitimate users and bypass authentication mechanisms.

🟢

If Mitigated

Limited impact with proper session management controls and monitoring, though authentication bypass remains possible.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires access to expired session data but is straightforward once obtained.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.4.0

Vendor Advisory: https://github.com/dropbox/samly/pull/13

Restart Required: Yes

Instructions:

1. Update mix.exs to require samly ~> 1.4.0
2. Run 'mix deps.update samly'
3. Recompile and restart your application
4. Verify session expiration is now properly enforced

🔧 Temporary Workarounds

Manual session validation

all

Implement custom session validation to check expiration timestamps before accepting sessions

Implement custom AuthHandler with explicit session expiration checks

🧯 If You Can't Patch

  • Implement additional authentication layers or multi-factor authentication
  • Reduce session lifetimes and implement aggressive session cleanup

🔍 How to Verify

Check if Vulnerable:

Check your mix.lock or mix.exs for samly version < 1.4.0

Check Version:

mix deps | grep samly

Verify Fix Applied:

Test that expired sessions are properly rejected and new sessions are required after expiration

📡 Detection & Monitoring

Log Indicators:

  • Multiple authentication attempts with same session ID after expiration
  • Session validation failures

Network Indicators:

  • Unusual authentication patterns
  • Session reuse after expected expiration

SIEM Query:

source="application_logs" AND (session_expired OR auth_bypass OR invalid_session)

🔗 References

📤 Share & Export