CVE-2022-45597
📋 TL;DR
ComponentSpace.Saml2 4.4.0 fails to validate SSL certificates at the application layer during SAML authentication, allowing man-in-the-middle attacks. This affects applications using this library for SAML-based single sign-on. The vendor disputes this as a vulnerability, claiming certificate validation is unnecessary within trusted relationships.
💻 Affected Systems
- ComponentSpace.Saml2
📦 What is this software?
Saml by Componentspace
⚠️ Risk & Real-World Impact
Worst Case
Attackers intercept SAML assertions, impersonate users, gain unauthorized access to federated applications, and potentially compromise entire identity federation systems.
Likely Case
Man-in-the-middle attackers in privileged network positions could intercept and modify SAML traffic to impersonate legitimate users.
If Mitigated
With proper network segmentation and certificate validation enabled, risk reduces to trusted internal attacks only.
🎯 Exploit Status
Requires man-in-the-middle position; exploitation depends on network access to SAML traffic.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: None
Vendor Advisory: None
Restart Required: No
Instructions:
Vendor does not consider this a vulnerability; no official patch exists. Consider implementing certificate validation manually or using alternative SAML libraries.
🔧 Temporary Workarounds
Implement custom certificate validation
allAdd certificate validation logic in SAML configuration to verify certificate chains and signatures
Implement custom CertificateValidator class and configure Saml2Configuration.CertificateValidator
Use transport layer encryption
allEnsure all SAML traffic uses HTTPS with proper certificate validation at transport layer
Configure application to require HTTPS and validate TLS certificates
🧯 If You Can't Patch
- Isolate SAML traffic to trusted network segments only
- Implement network monitoring for unusual SAML traffic patterns
🔍 How to Verify
Check if Vulnerable:
Check if using ComponentSpace.Saml2 version 4.4.0 and review SAML configuration for certificate validation settings
Check Version:
Check package reference in .csproj file or NuGet package manager for ComponentSpace.Saml2 version
Verify Fix Applied:
Test SAML authentication with invalid certificates; system should reject them
📡 Detection & Monitoring
Log Indicators:
- Failed SAML authentication attempts with invalid certificates
- Unusual SAML assertion sources
Network Indicators:
- SAML traffic over unencrypted channels
- SAML assertions from unexpected IP addresses
SIEM Query:
source="saml" AND (certificate_validation="false" OR protocol!="https")
🔗 References
- http://componentspace.com
- http://componentspacesaml2.com
- https://www.componentspace.com/documentation/saml-for-asp-net-core/ComponentSpace%20SAML%20for%20ASP.NET%20Core%20Release%20Notes.pdf
- http://componentspace.com
- http://componentspacesaml2.com
- https://www.componentspace.com/documentation/saml-for-asp-net-core/ComponentSpace%20SAML%20for%20ASP.NET%20Core%20Release%20Notes.pdf