CVE-2021-28860

9.1 CRITICAL

📋 TL;DR

This vulnerability in the Node.js mixme library allows attackers to perform prototype pollution attacks through the mutate() and merge() functions. By manipulating '__proto__' properties, attackers can add or alter object properties that affect all objects in the program, potentially causing denial of service. This affects any application using vulnerable versions of the mixme library.

💻 Affected Systems

Products:
  • Node.js applications using mixme library
Versions: All versions prior to 0.5.1
Operating Systems: All platforms running Node.js
Default Config Vulnerable: ⚠️ Yes
Notes: Any application using mixme's mutate() or merge() functions with untrusted input is vulnerable. The vulnerability is in the library itself, not dependent on specific configurations.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete application denial of service through prototype pollution leading to crashes, memory exhaustion, or unpredictable behavior affecting all objects in the program.

🟠

Likely Case

Application instability, crashes, or degraded performance due to polluted object prototypes affecting multiple parts of the system.

🟢

If Mitigated

Limited impact if input validation prevents malicious payloads from reaching vulnerable functions, though risk remains if untrusted data is processed.

🌐 Internet-Facing: HIGH - Web applications processing user input through mixme functions are directly exposed to exploitation attempts.
🏢 Internal Only: MEDIUM - Internal applications may still be vulnerable if processing untrusted data, though attack surface is reduced.

🎯 Exploit Status

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

Exploitation is straightforward - attackers can send specially crafted objects with '__proto__' properties to vulnerable endpoints. Public proof-of-concept exists in GitHub advisory.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 0.5.1 and later

Vendor Advisory: https://github.com/adaltas/node-mixme/security/advisories/GHSA-79jw-6wg7-r9g4

Restart Required: Yes

Instructions:

1. Update mixme dependency to version 0.5.1 or later in package.json. 2. Run 'npm update mixme' or 'yarn upgrade mixme'. 3. Restart the Node.js application. 4. Test application functionality.

🔧 Temporary Workarounds

Input validation and sanitization

all

Implement strict input validation to reject objects containing '__proto__' or similar prototype pollution vectors before passing to mixme functions.

Object freezing

all

Use Object.freeze() on critical objects or Object.prototype to prevent prototype pollution, though this may break legitimate functionality.

🧯 If You Can't Patch

  • Implement strict input validation to reject any objects containing '__proto__', 'constructor', or 'prototype' properties
  • Use alternative libraries or custom implementations instead of mixme's mutate() and merge() functions for processing untrusted data

🔍 How to Verify

Check if Vulnerable:

Check package.json or package-lock.json for mixme version. If version is below 0.5.1, the application is vulnerable.

Check Version:

npm list mixme | grep mixme OR node -e "console.log(require('mixme/package.json').version)"

Verify Fix Applied:

After updating, verify mixme version is 0.5.1 or higher using 'npm list mixme' or check package.json. Test with known safe inputs to ensure functionality.

📡 Detection & Monitoring

Log Indicators:

  • Unusual application crashes, memory exhaustion errors, unexpected property assignments in objects
  • Requests containing '__proto__' in payloads

Network Indicators:

  • HTTP requests with JSON payloads containing '__proto__' properties
  • Unusual patterns of requests to endpoints using mixme functions

SIEM Query:

source="application_logs" AND ("__proto__" OR "prototype pollution" OR "mixme")

🔗 References

📤 Share & Export