CVE-2020-7719

9.8 CRITICAL

📋 TL;DR

CVE-2020-7719 is a prototype pollution vulnerability in the locutus JavaScript package's php.strings.parse_str function. This allows attackers to inject properties into JavaScript objects, potentially leading to remote code execution or denial of service. Any application using vulnerable versions of locutus is affected.

💻 Affected Systems

Products:
  • locutus
Versions: All versions before 2.0.12
Operating Systems: All platforms running Node.js/JavaScript
Default Config Vulnerable: ⚠️ Yes
Notes: Any application using the php.strings.parse_str function from locutus is vulnerable 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, 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

Exploitation requires user input to reach the vulnerable function, but no authentication is needed.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.0.12

Vendor Advisory: https://github.com/kvz/locutus/pull/418/

Restart Required: No

Instructions:

1. Update package.json to require locutus version 2.0.12 or higher. 2. Run 'npm update locutus' or 'yarn upgrade locutus'. 3. Test application functionality.

🔧 Temporary Workarounds

Input validation and sanitization

all

Implement strict input validation for all user inputs passed to parse_str function

Function replacement

all

Replace vulnerable parse_str function with a safe alternative

🧯 If You Can't Patch

  • Implement strict Content Security Policy (CSP) to limit script execution
  • Use web application firewall (WAF) rules to block suspicious input patterns

🔍 How to Verify

Check if Vulnerable:

Check package.json or package-lock.json for locutus version below 2.0.12

Check Version:

npm list locutus | grep locutus

Verify Fix Applied:

Verify locutus version is 2.0.12 or higher in package.json and node_modules

📡 Detection & Monitoring

Log Indicators:

  • Unusual parse_str function calls with complex nested objects
  • Application crashes or unexpected behavior after user input

Network Indicators:

  • HTTP requests containing specially crafted query strings or POST data

SIEM Query:

source="web_server" AND (uri_query CONTAINS "__proto__" OR body CONTAINS "__proto__")

🔗 References

📤 Share & Export