CVE-2023-28119
📋 TL;DR
CVE-2023-28119 is a denial-of-service vulnerability in the crewjam/saml Go library where unlimited decompression of SAML requests can crash the server process. Any application using vulnerable versions of this library for SAML authentication is affected, particularly web applications and services implementing SAML SSO.
💻 Affected Systems
- crewjam/saml Go library
📦 What is this software?
Saml by Saml Project
⚠️ Risk & Real-World Impact
Worst Case
Complete service outage through repeated exploitation causing process termination, potentially leading to authentication failures and application downtime.
Likely Case
Service disruption through resource exhaustion, requiring process restart and causing temporary authentication failures.
If Mitigated
Minimal impact with proper input validation and resource limits in place, potentially causing degraded performance but no service disruption.
🎯 Exploit Status
Exploitation requires sending specially crafted SAML requests but no authentication is needed.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 0.4.13
Vendor Advisory: https://github.com/crewjam/saml/security/advisories/GHSA-5mqj-xc49-246p
Restart Required: Yes
Instructions:
1. Update go.mod to require github.com/crewjam/saml v0.4.13 or higher. 2. Run 'go mod tidy'. 3. Rebuild and redeploy application. 4. Restart affected services.
🔧 Temporary Workarounds
Input size limiting at reverse proxy
allConfigure reverse proxy to limit request body size for SAML endpoints
nginx: client_max_body_size 1m;
Apache: LimitRequestBody 1048576
Rate limiting SAML endpoints
allImplement rate limiting to prevent repeated exploitation attempts
nginx: limit_req_zone $binary_remote_addr zone=saml:10m rate=10r/s;
limit_req zone=saml burst=20 nodelay;
🧯 If You Can't Patch
- Implement WAF rules to block oversized SAML requests or suspicious compression patterns
- Deploy additional monitoring and alerting for process crashes related to SAML endpoints
🔍 How to Verify
Check if Vulnerable:
Check go.mod or vendor dependencies for crewjam/saml version <0.4.13
Check Version:
go list -m all | grep crewjam/saml
Verify Fix Applied:
Verify go.mod requires github.com/crewjam/saml v0.4.13+ and run 'go list -m all | grep saml'
📡 Detection & Monitoring
Log Indicators:
- Process crashes or restarts after SAML requests
- Unusually large HTTP requests to SAML endpoints
- High memory usage spikes
Network Indicators:
- Repeated POST requests to /saml/* endpoints with large payloads
- Requests with Content-Encoding: deflate and large size
SIEM Query:
source="application.logs" AND ("process terminated" OR "out of memory") AND uri_path="/saml/*"
🔗 References
- https://github.com/crewjam/saml/commit/8e9236867d176ad6338c870a84e2039aef8a5021
- https://github.com/crewjam/saml/security/advisories/GHSA-5mqj-xc49-246p
- https://github.com/crewjam/saml/commit/8e9236867d176ad6338c870a84e2039aef8a5021
- https://github.com/crewjam/saml/security/advisories/GHSA-5mqj-xc49-246p