CVE-2020-7775

9.8 CRITICAL

📋 TL;DR

CVE-2020-7775 is a critical OS command injection vulnerability in the freediskspace npm package. Attackers can execute arbitrary commands on affected systems by injecting malicious arguments. All applications using freediskspace are vulnerable.

💻 Affected Systems

Products:
  • freediskspace npm package
Versions: All versions before 3.0.2
Operating Systems: All platforms where Node.js runs
Default Config Vulnerable: ⚠️ Yes
Notes: Any application that uses freediskspace with user-controlled input is vulnerable.

📦 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

Full system compromise with remote code execution, allowing attackers to install malware, exfiltrate data, or pivot to other systems.

🟠

Likely Case

Arbitrary command execution with the privileges of the application using freediskspace, potentially leading to data theft or service disruption.

🟢

If Mitigated

Limited impact if application runs with minimal privileges and proper input validation is implemented.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation is straightforward when user input reaches the vulnerable function without proper sanitization.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 3.0.2

Vendor Advisory: https://snyk.io/vuln/SNYK-JS-FREEDISKSPACE-1040716

Restart Required: No

Instructions:

1. Update package.json to specify 'freediskspace': '^3.0.2'. 2. Run 'npm update freediskspace'. 3. Test application functionality.

🔧 Temporary Workarounds

Input Validation

all

Implement strict input validation to prevent command injection before passing arguments to freediskspace.

Remove Package

all

If freediskspace functionality is not essential, remove the package entirely.

npm uninstall freediskspace

🧯 If You Can't Patch

  • Run application with minimal privileges (non-root user)
  • Implement network segmentation to limit potential lateral movement

🔍 How to Verify

Check if Vulnerable:

Check package.json or package-lock.json for freediskspace version below 3.0.2

Check Version:

npm list freediskspace

Verify Fix Applied:

Verify freediskspace version is 3.0.2 or higher using 'npm list freediskspace'

📡 Detection & Monitoring

Log Indicators:

  • Unusual command execution patterns
  • Unexpected child process spawns from Node.js application

Network Indicators:

  • Unexpected outbound connections from application server

SIEM Query:

process.name:node AND process.args:*freediskspace* AND process.args:*;* OR process.args:*&* OR process.args:*|*

🔗 References

📤 Share & Export