CVE-2023-45287
📋 TL;DR
This CVE describes a timing side-channel vulnerability in Go's RSA-based TLS key exchange implementation prior to version 1.20. Attackers could potentially recover session key bits by analyzing timing differences during PKCS#1 padding removal. This affects any application using Go's crypto/tls library with RSA key exchange for TLS connections.
💻 Affected Systems
- Go programming language
- Applications built with Go
📦 What is this software?
Go by Golang
⚠️ Risk & Real-World Impact
Worst Case
Full compromise of TLS session keys, allowing decryption of encrypted communications and potential man-in-the-middle attacks
Likely Case
Partial key recovery requiring sophisticated timing analysis and repeated connections to the same server
If Mitigated
Minimal impact with proper network segmentation and monitoring for unusual connection patterns
🎯 Exploit Status
Exploitation requires precise timing measurements and multiple TLS handshake attempts. The MARVIN attack demonstrates the theoretical vulnerability.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Go 1.20 or later
Vendor Advisory: https://groups.google.com/g/golang-announce/c/QMK8IQALDvA
Restart Required: Yes
Instructions:
1. Upgrade Go installation to version 1.20 or later. 2. Recompile all Go applications with the updated Go version. 3. Restart all Go-based services and applications.
🔧 Temporary Workarounds
Disable RSA key exchange
allConfigure TLS to use ECDHE or other non-RSA key exchange methods
// In Go code, configure TLS config with: tls.Config{CipherSuites: []uint16{tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384}}
🧯 If You Can't Patch
- Implement network-level protections like TLS inspection and intrusion detection
- Segment affected systems and limit exposure to untrusted networks
🔍 How to Verify
Check if Vulnerable:
Check Go version with 'go version'. If output shows version less than 1.20, system is vulnerable
Check Version:
go version
Verify Fix Applied:
Verify Go version is 1.20 or later and applications have been recompiled with the new version
📡 Detection & Monitoring
Log Indicators:
- Unusual number of TLS handshake failures
- Multiple rapid connection attempts to the same service
Network Indicators:
- High volume of TLS connections with RSA key exchange
- Unusual timing patterns in TLS handshakes
SIEM Query:
source="tls_logs" AND (event="handshake_failure" OR event="connection_reset") | stats count by src_ip dest_ip
🔗 References
- https://go.dev/cl/326012/26
- https://go.dev/issue/20654
- https://groups.google.com/g/golang-announce/c/QMK8IQALDvA
- https://people.redhat.com/~hkario/marvin/
- https://pkg.go.dev/vuln/GO-2023-2375
- https://security.netapp.com/advisory/ntap-20240112-0005/
- https://go.dev/cl/326012/26
- https://go.dev/issue/20654
- https://groups.google.com/g/golang-announce/c/QMK8IQALDvA
- https://people.redhat.com/~hkario/marvin/
- https://pkg.go.dev/vuln/GO-2023-2375
- https://security.netapp.com/advisory/ntap-20240112-0005/