CVE-2023-39533

7.5 HIGH

📋 TL;DR

This vulnerability allows malicious peers to perform resource exhaustion attacks by sending large RSA keys during Noise handshake or x509 extension verification in go-libp2p. Affected systems include applications using vulnerable versions of go-libp2p for peer-to-peer networking, potentially leading to denial of service.

💻 Affected Systems

Products:
  • go-libp2p
  • applications using go-libp2p for networking
Versions: go-libp2p versions <0.27.8, <0.28.2, <0.29.1
Operating Systems: All platforms running Go applications
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability exists in core/crypto module during Noise handshake and x509 extension verification.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete denial of service through CPU exhaustion, rendering the node unresponsive and disrupting network connectivity.

🟠

Likely Case

Degraded performance and increased resource consumption during handshake processes with malicious peers.

🟢

If Mitigated

Minimal impact with proper patching and updated Go compiler versions preventing large RSA key processing.

🌐 Internet-Facing: HIGH - Internet-facing nodes are directly exposed to malicious peers sending crafted RSA keys.
🏢 Internal Only: MEDIUM - Internal nodes could still be affected by compromised internal peers or lateral movement.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Attack requires sending specially crafted RSA keys during handshake, which is straightforward for malicious peers.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: go-libp2p 0.27.8, 0.28.2, or 0.29.1

Vendor Advisory: https://github.com/libp2p/go-libp2p/security/advisories

Restart Required: Yes

Instructions:

1. Update go-libp2p to version 0.27.8, 0.28.2, or 0.29.1. 2. Update Go compiler to version 1.20.7 or 1.19.12. 3. Rebuild and redeploy application. 4. Restart all affected services.

🔧 Temporary Workarounds

No known workarounds

all

The vendor states there are no known workarounds for this vulnerability.

🧯 If You Can't Patch

  • Implement network-level controls to limit connections from untrusted peers
  • Monitor CPU usage and restart services if abnormal resource consumption is detected

🔍 How to Verify

Check if Vulnerable:

Check go.mod or vendor dependencies for go-libp2p versions below 0.27.8, 0.28.2, or 0.29.1

Check Version:

go list -m github.com/libp2p/go-libp2p

Verify Fix Applied:

Verify go-libp2p version is >=0.27.8, >=0.28.2, or >=0.29.1 and Go compiler is >=1.20.7 or >=1.19.12

📡 Detection & Monitoring

Log Indicators:

  • High CPU usage during handshake processes
  • Failed handshake attempts with large key sizes

Network Indicators:

  • Unusually large RSA key exchanges during Noise handshake

SIEM Query:

process.cpu.usage > 90% AND process.name contains 'libp2p' OR 'go'

🔗 References

📤 Share & Export