CVE-2020-7721

9.8 CRITICAL

📋 TL;DR

CVE-2020-7721 is a prototype pollution vulnerability in the node-oojs package that allows attackers to inject arbitrary properties into JavaScript objects, potentially leading to remote code execution or denial of service. This affects all applications using any version of node-oojs. Developers using this package in their Node.js applications are at risk.

💻 Affected Systems

Products:
  • node-oojs
Versions: All versions before 1.0.2
Operating Systems: All platforms running Node.js
Default Config Vulnerable: ⚠️ Yes
Notes: Any application using node-oojs with the vulnerable setPath function is affected regardless of configuration.

📦 What is this software?

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

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

🟠

Likely Case

Denial of service, privilege escalation, or data manipulation through object property injection.

🟢

If Mitigated

Limited impact with proper input validation and sandboxing, potentially only causing application crashes.

🌐 Internet-Facing: HIGH - Web applications using this package are directly exposed to exploitation.
🏢 Internal Only: MEDIUM - Internal applications are still vulnerable but have reduced attack surface.

🎯 Exploit Status

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

Simple proof-of-concept exploits exist demonstrating prototype pollution via the setPath function.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.0.2

Vendor Advisory: https://snyk.io/vuln/SNYK-JS-NODEOOJS-598678

Restart Required: Yes

Instructions:

1. Update package.json to require node-oojs version 1.0.2 or higher. 2. Run 'npm update node-oojs'. 3. Restart your Node.js application.

🔧 Temporary Workarounds

Input validation wrapper

all

Wrap setPath calls with validation to prevent prototype pollution

// Add validation before calling setPath
function safeSetPath(obj, path, value) {
  if (path.includes('__proto__') || path.includes('constructor') || path.includes('prototype')) {
    throw new Error('Invalid path');
  }
  return setPath(obj, path, value);
}

🧯 If You Can't Patch

  • Remove node-oojs dependency entirely if not essential
  • Implement strict input validation and sanitization for all user inputs

🔍 How to Verify

Check if Vulnerable:

Check package.json for node-oojs version: grep -A1 -B1 'node-oojs' package.json

Check Version:

npm list node-oojs

Verify Fix Applied:

Verify installed version: npm list node-oojs | grep node-oojs

📡 Detection & Monitoring

Log Indicators:

  • Unusual property assignments in objects
  • Application crashes with prototype-related errors
  • Unexpected object property modifications

Network Indicators:

  • HTTP requests with malicious payloads containing __proto__ or constructor strings

SIEM Query:

source="application.logs" AND ("__proto__" OR "constructor.prototype" OR "setPath")

🔗 References

📤 Share & Export