CVE-2025-59464

7.5 HIGH

📋 TL;DR

A memory leak vulnerability in Node.js's OpenSSL integration allows remote attackers to cause denial of service through resource exhaustion. When applications call socket.getPeerCertificate(true) with detailed certificate information, each TLS connection leaks memory, leading to steady memory growth over time. This affects any Node.js application using TLS connections with detailed certificate retrieval.

💻 Affected Systems

Products:
  • Node.js
Versions: All versions prior to security releases in December 2025
Operating Systems: All platforms running Node.js
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects applications using TLS connections and calling socket.getPeerCertificate(true) with the detailed parameter set to true.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete denial of service due to memory exhaustion, causing application crashes and service unavailability.

🟠

Likely Case

Gradual performance degradation and eventual service disruption requiring restarts.

🟢

If Mitigated

Minimal impact with proper monitoring and restart policies in place.

🌐 Internet-Facing: HIGH - Remote unauthenticated attackers can trigger the memory leak through repeated TLS connections.
🏢 Internal Only: MEDIUM - Internal clients could still exploit, but attack surface is more limited.

🎯 Exploit Status

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

Exploitation requires establishing repeated TLS connections, which is trivial for attackers.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: December 2025 security releases (specific version numbers in advisory)

Vendor Advisory: https://nodejs.org/en/blog/vulnerability/december-2025-security-releases

Restart Required: Yes

Instructions:

1. Check current Node.js version
2. Update to patched version from December 2025 security releases
3. Restart all Node.js applications
4. Verify the fix is applied

🔧 Temporary Workarounds

Avoid detailed certificate retrieval

all

Modify applications to use socket.getPeerCertificate() without the detailed parameter or with it set to false

// Change from: socket.getPeerCertificate(true)
// To: socket.getPeerCertificate() or socket.getPeerCertificate(false)

Connection rate limiting

all

Implement rate limiting on TLS connections to reduce memory leak accumulation

🧯 If You Can't Patch

  • Implement connection rate limiting and monitoring for memory growth
  • Schedule regular application restarts to clear accumulated memory leaks

🔍 How to Verify

Check if Vulnerable:

Check if application code calls socket.getPeerCertificate(true) and runs on affected Node.js versions

Check Version:

node --version

Verify Fix Applied:

Verify Node.js version is from December 2025 security releases or later, and monitor memory usage during TLS connections

📡 Detection & Monitoring

Log Indicators:

  • Unusual memory growth patterns
  • Frequent garbage collection events
  • Application restarts due to memory exhaustion

Network Indicators:

  • High volume of short-lived TLS connections from single sources
  • Connection patterns designed to trigger certificate retrieval

SIEM Query:

source="nodejs" AND ("memory" OR "heap") AND ("growth" OR "exhaustion" OR "OOM")

🔗 References

📤 Share & Export