CVE-2024-57081

7.5 HIGH

📋 TL;DR

This CVE describes a prototype pollution vulnerability in underscore-contrib's lib.fromQuery function that allows attackers to manipulate JavaScript object prototypes. When exploited, it can cause Denial of Service (DoS) by crashing the application. This affects any application using underscore-contrib v0.3.0.

💻 Affected Systems

Products:
  • underscore-contrib
Versions: v0.3.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Any application using underscore-contrib v0.3.0 with the lib.fromQuery function is vulnerable by default.

⚠️ 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 extended service unavailability, potentially requiring manual intervention to restart services.

🟠

Likely Case

Application instability and temporary service disruption until automatic restart mechanisms recover the service.

🟢

If Mitigated

Minimal impact with proper input validation and monitoring that detects and blocks malicious payloads before they reach the vulnerable function.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires crafting specific payloads to trigger prototype pollution in the fromQuery function.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: v0.3.1 or later

Vendor Advisory: https://gist.github.com/tariqhawis/4b2c7273054f0d70ef162aa5b6daec01

Restart Required: No

Instructions:

1. Update underscore-contrib to v0.3.1 or later using npm update underscore-contrib. 2. Verify the update with npm list underscore-contrib. 3. Test application functionality after update.

🔧 Temporary Workarounds

Input Validation Filter

all

Implement strict input validation to reject malformed query strings before they reach the lib.fromQuery function.

🧯 If You Can't Patch

  • Implement WAF rules to block suspicious query string patterns that could trigger prototype pollution.
  • Monitor application logs for unusual query string patterns and implement rate limiting on affected endpoints.

🔍 How to Verify

Check if Vulnerable:

Check package.json or run npm list underscore-contrib to see if version 0.3.0 is installed.

Check Version:

npm list underscore-contrib

Verify Fix Applied:

Run npm list underscore-contrib and verify version is 0.3.1 or higher.

📡 Detection & Monitoring

Log Indicators:

  • Application crash logs with stack traces pointing to lib.fromQuery
  • Unusual query string patterns in request logs

Network Indicators:

  • HTTP requests with unusually long or complex query strings
  • Sudden spikes in 500 error responses

SIEM Query:

source="application_logs" AND ("lib.fromQuery" OR "prototype pollution")

🔗 References

📤 Share & Export