CVE-2024-57066

7.5 HIGH

📋 TL;DR

This vulnerability allows attackers to perform prototype pollution in the lib.deep function of @ndhoule/defaults library version 2.0.1, potentially causing Denial of Service (DoS) by supplying a specially crafted payload. Any application using this vulnerable version of the library is affected, particularly Node.js applications that handle untrusted user input.

💻 Affected Systems

Products:
  • @ndhoule/defaults
Versions: 2.0.1
Operating Systems: All platforms running Node.js
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects applications that use the lib.deep function with untrusted input. The vulnerability is in the library itself, not dependent on specific configurations.

⚠️ 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

Complete application crash leading to sustained downtime, potentially affecting multiple services if the library is widely used in a microservices architecture.

🟠

Likely Case

Application instability or crashes when processing malicious input, resulting in intermittent service disruption.

🟢

If Mitigated

Minimal impact with proper input validation and sanitization in place before data reaches the vulnerable function.

🌐 Internet-Facing: MEDIUM - Applications accepting user input and passing it to the vulnerable function could be exploited, but requires specific conditions.
🏢 Internal Only: LOW - Internal systems typically process trusted data, reducing exposure unless handling external inputs.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires understanding of prototype pollution techniques and ability to craft specific payloads that trigger the vulnerability in the lib.deep function.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.0.2 or later

Vendor Advisory: https://github.com/ndhoule/defaults

Restart Required: No

Instructions:

1. Check current version: npm list @ndhoule/defaults
2. Update package: npm update @ndhoule/defaults
3. Verify update: npm list @ndhoule/defaults should show version 2.0.2 or higher

🔧 Temporary Workarounds

Input Validation Wrapper

all

Implement input validation and sanitization before passing data to the lib.deep function

🧯 If You Can't Patch

  • Implement strict input validation to prevent malicious payloads from reaching the vulnerable function
  • Monitor application logs for unusual patterns or crashes that might indicate exploitation attempts

🔍 How to Verify

Check if Vulnerable:

Check package.json or run: npm list @ndhoule/defaults | grep 2.0.1

Check Version:

npm list @ndhoule/defaults

Verify Fix Applied:

Run: npm list @ndhoule/defaults and verify version is 2.0.2 or higher

📡 Detection & Monitoring

Log Indicators:

  • Application crashes or abnormal terminations
  • Unusual memory consumption patterns
  • Error messages related to prototype pollution

Network Indicators:

  • Unusual payload patterns in incoming requests
  • Repeated requests causing application instability

SIEM Query:

source="application.logs" AND ("prototype pollution" OR "lib.deep" OR "@ndhoule/defaults") AND severity=ERROR

🔗 References

📤 Share & Export