CVE-2024-21484

7.5 HIGH

📋 TL;DR

This vulnerability allows attackers to decrypt RSA-encrypted data by exploiting timing discrepancies in the jsrsasign library's PKCS1.5 and RSAOAEP decryption implementations. Systems using jsrsasign versions before 11.0.0 for RSA decryption operations are affected, particularly those where attackers can observe many ciphertexts encrypted with the same key.

💻 Affected Systems

Products:
  • jsrsasign library
Versions: All versions before 11.0.0
Operating Systems: All platforms using jsrsasign
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems using RSA PKCS1.5 or RSAOAEP decryption functions from jsrsasign library.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete compromise of encrypted data confidentiality, allowing attackers to decrypt sensitive information protected by RSA encryption.

🟠

Likely Case

Targeted decryption of specific encrypted messages or data after observing sufficient ciphertexts, potentially exposing sensitive information.

🟢

If Mitigated

Limited impact with proper key rotation, rate limiting, and monitoring for unusual decryption patterns.

🌐 Internet-Facing: MEDIUM - Requires attacker to have access to many ciphertexts encrypted with same key, which may be possible on public APIs or services.
🏢 Internal Only: LOW - Internal systems typically have more controlled access, making large-scale ciphertext collection harder.

🎯 Exploit Status

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

Exploitation requires collecting many ciphertexts encrypted with same key and performing timing analysis (Marvin attack).

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 11.0.0

Vendor Advisory: https://github.com/kjur/jsrsasign/releases/tag/11.0.0

Restart Required: No

Instructions:

1. Update jsrsasign dependency to version 11.0.0 or later. 2. Update package.json to specify 'jsrsasign': '^11.0.0'. 3. Run npm update or equivalent package manager command. 4. Test RSA decryption functionality.

🔧 Temporary Workarounds

Replace RSA decryption with alternative library

all

Replace jsrsasign RSA PKCS1.5 and RSAOAEP decryption calls with equivalent functions from a different cryptographic library that is not vulnerable.

🧯 If You Can't Patch

  • Implement strict rate limiting on decryption operations to prevent collection of sufficient ciphertexts for timing analysis
  • Rotate RSA keys frequently to limit window for ciphertext collection and analysis

🔍 How to Verify

Check if Vulnerable:

Check package.json or package-lock.json for jsrsasign version. If version is below 11.0.0 and RSA decryption is used, system is vulnerable.

Check Version:

npm list jsrsasign or check package.json for version

Verify Fix Applied:

Verify jsrsasign version is 11.0.0 or higher in package.json and confirm RSA decryption functions work correctly after update.

📡 Detection & Monitoring

Log Indicators:

  • Unusually high volume of RSA decryption requests
  • Multiple failed decryption attempts with timing patterns

Network Indicators:

  • High volume of encrypted traffic to decryption endpoints
  • Repeated similar-sized encrypted payloads

SIEM Query:

source=application_logs 'RSA.*decrypt' | stats count by src_ip, user | where count > threshold

🔗 References

📤 Share & Export