CVE-2021-28860
📋 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
- Node.js applications using mixme library
📦 What is this software?
Mixme by Adaltas
⚠️ 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.
🎯 Exploit Status
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
allImplement strict input validation to reject objects containing '__proto__' or similar prototype pollution vectors before passing to mixme functions.
Object freezing
allUse 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
- http://nodejs.com
- https://github.com/adaltas/node-mixme/commit/cfd5fbfc32368bcf7e06d1c5985ea60e34cd4028
- https://github.com/adaltas/node-mixme/issues/1
- https://github.com/adaltas/node-mixme/security/advisories/GHSA-79jw-6wg7-r9g4
- https://security.netapp.com/advisory/ntap-20210618-0005/
- https://www.npmjs.com/~david
- http://nodejs.com
- https://github.com/adaltas/node-mixme/commit/cfd5fbfc32368bcf7e06d1c5985ea60e34cd4028
- https://github.com/adaltas/node-mixme/issues/1
- https://github.com/adaltas/node-mixme/security/advisories/GHSA-79jw-6wg7-r9g4
- https://security.netapp.com/advisory/ntap-20210618-0005/
- https://www.npmjs.com/~david