CVE-2021-25944

9.8 CRITICAL

📋 TL;DR

CVE-2021-25944 is a prototype pollution vulnerability in the 'deep-defaults' npm package versions 1.0.0 through 1.0.5. This allows attackers to modify object prototypes, potentially leading to denial of service or remote code execution. Any application using these vulnerable versions is affected.

💻 Affected Systems

Products:
  • deep-defaults npm package
Versions: 1.0.0 through 1.0.5
Operating Systems: All operating systems running Node.js
Default Config Vulnerable: ⚠️ Yes
Notes: Any Node.js application using vulnerable deep-defaults versions is affected regardless of configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete system compromise, data theft, or ransomware deployment.

🟠

Likely Case

Denial of service through application crashes or instability, with potential for limited code execution in specific configurations.

🟢

If Mitigated

Limited impact if input validation and sandboxing prevent prototype pollution exploitation.

🌐 Internet-Facing: HIGH - Web applications using this package could be exploited remotely without authentication.
🏢 Internal Only: MEDIUM - Internal applications could be exploited by authenticated users or through other attack vectors.

🎯 Exploit Status

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

Prototype pollution vulnerabilities are well-understood with public proof-of-concept code available.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.0.6 and later

Vendor Advisory: https://www.npmjs.com/advisories/1741

Restart Required: Yes

Instructions:

1. Update package.json to specify 'deep-defaults': '^1.0.6' 2. Run 'npm update deep-defaults' 3. Restart all Node.js applications using this package 4. Test application functionality

🔧 Temporary Workarounds

Input validation and sanitization

all

Implement strict input validation to prevent malicious object manipulation

Package replacement

all

Replace deep-defaults with alternative libraries like lodash.defaultsdeep

npm uninstall deep-defaults
npm install lodash.defaultsdeep

🧯 If You Can't Patch

  • Implement WAF rules to detect and block prototype pollution patterns
  • Isolate affected applications in network segments with strict egress filtering

🔍 How to Verify

Check if Vulnerable:

Check package.json or package-lock.json for deep-defaults version 1.0.0-1.0.5, or run 'npm list deep-defaults'

Check Version:

npm list deep-defaults | grep deep-defaults

Verify Fix Applied:

Confirm deep-defaults version is 1.0.6+ with 'npm list deep-defaults' and test application with known exploit payloads

📡 Detection & Monitoring

Log Indicators:

  • Unexpected application crashes
  • Unusual object property modifications
  • Memory exhaustion errors

Network Indicators:

  • HTTP requests with specially crafted JSON objects
  • Unusual outbound connections from Node.js processes

SIEM Query:

process.name:node.exe AND (event_data.CommandLine:*deep-defaults* OR event_data.ImagePath:*node*)

🔗 References

📤 Share & Export