CVE-2024-30171

5.9 MEDIUM

📋 TL;DR

This vulnerability in Bouncy Castle's Java TLS implementation allows timing-based side-channel attacks during RSA handshakes. Attackers can potentially recover private keys by analyzing timing differences in exception processing. Affects applications using Bouncy Castle's TLS API or JSSE Provider for RSA-based TLS connections.

💻 Affected Systems

Products:
  • Bouncy Castle Java TLS API
  • Bouncy Castle JSSE Provider
Versions: All versions before 1.78
Operating Systems: All platforms running Java with affected Bouncy Castle libraries
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects RSA-based TLS handshakes. ECC-based handshakes are not vulnerable.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full compromise of TLS private keys leading to decryption of intercepted traffic, impersonation of servers, or man-in-the-middle attacks.

🟠

Likely Case

Partial key recovery requiring significant computational resources and network access, potentially enabling targeted decryption of specific sessions.

🟢

If Mitigated

Minimal impact with proper network segmentation, key rotation, and monitoring for unusual TLS handshake patterns.

🌐 Internet-Facing: MEDIUM
🏢 Internal Only: LOW

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: HIGH

Requires precise timing measurements and multiple handshake attempts. Practical exploitation is challenging but theoretically possible.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.78

Vendor Advisory: https://www.bouncycastle.org/latest_releases.html

Restart Required: Yes

Instructions:

1. Download Bouncy Castle 1.78 from official repository. 2. Replace existing bcprov-jdk*.jar and bctls-jdk*.jar files. 3. Update Maven/Gradle dependencies to version 1.78. 4. Restart affected Java applications.

🔧 Temporary Workarounds

Disable RSA-based TLS

all

Configure TLS to use ECC cipher suites only, avoiding RSA handshakes

java -Dhttps.cipherSuites=TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256

🧯 If You Can't Patch

  • Implement network segmentation to limit access to vulnerable TLS endpoints
  • Enable TLS session resumption to reduce handshake frequency and exposure

🔍 How to Verify

Check if Vulnerable:

Check Bouncy Castle library version in classpath: java -cp bcprov-jdk*.jar org.bouncycastle.jce.provider.BouncyCastleProvider | grep version

Check Version:

java -cp bcprov-jdk*.jar org.bouncycastle.jce.provider.BouncyCastleProvider | grep 'BouncyCastle Security Provider v'

Verify Fix Applied:

Verify installed version is 1.78 or higher using same command

📡 Detection & Monitoring

Log Indicators:

  • Unusual number of failed TLS handshakes
  • Multiple connection attempts from single source with timing patterns

Network Indicators:

  • High volume of TLS handshake requests to specific endpoints
  • Unusual timing patterns in TLS negotiation packets

SIEM Query:

source="*tls*" AND (event="handshake_failure" OR event="protocol_version") | stats count by src_ip dest_ip

🔗 References

📤 Share & Export