CVE-2023-26113
📋 TL;DR
This vulnerability allows attackers to perform prototype pollution attacks via the extend function in collection.js. It affects applications using collection.js versions before 6.8.1, potentially enabling modification of object prototypes that could lead to denial of service, remote code execution, or other security impacts.
💻 Affected Systems
- collection.js
📦 What is this software?
Collection.js by Collection.js Project
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution leading to complete system compromise, data theft, or service disruption.
Likely Case
Denial of service, application crashes, or unauthorized data manipulation.
If Mitigated
Limited impact with proper input validation and security controls in place.
🎯 Exploit Status
Proof of concept available in GitHub issues; exploitation requires attacker-controlled input to the extend function.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 6.8.1
Vendor Advisory: https://github.com/kobezzza/Collection/releases/tag/v6.8.1
Restart Required: No
Instructions:
1. Update collection.js to version 6.8.1 or later. 2. Run 'npm update collection.js' or update package.json to '^6.8.1'. 3. Test application functionality after update.
🔧 Temporary Workarounds
Input validation and sanitization
allImplement strict input validation for objects passed to the extend function to prevent prototype pollution.
🧯 If You Can't Patch
- Implement strict input validation and sanitization for all user inputs.
- Use object-freeze or similar techniques to prevent prototype modification.
🔍 How to Verify
Check if Vulnerable:
Check package.json or run 'npm list collection.js' to see if version is below 6.8.1.
Check Version:
npm list collection.js
Verify Fix Applied:
Verify collection.js version is 6.8.1 or higher using 'npm list collection.js'.
📡 Detection & Monitoring
Log Indicators:
- Unusual application crashes, unexpected object property modifications, or error logs related to prototype pollution.
Network Indicators:
- Unusual HTTP requests with crafted JSON objects targeting extend function endpoints.
SIEM Query:
Search for application logs containing 'extend' function calls with suspicious object structures.
🔗 References
- https://github.com/kobezzza/Collection/blob/be32c48e68f49d3be48a58e929d1ab8ff1d2d19c/dist/node/iterators/extend.js%23L324
- https://github.com/kobezzza/Collection/commit/d3d937645f62f37d3115d6aa90bb510fd856e6a2
- https://github.com/kobezzza/Collection/issues/27
- https://github.com/kobezzza/Collection/releases/tag/v6.8.1
- https://security.snyk.io/vuln/SNYK-JS-COLLECTIONJS-3185148
- https://github.com/kobezzza/Collection/blob/be32c48e68f49d3be48a58e929d1ab8ff1d2d19c/dist/node/iterators/extend.js%23L324
- https://github.com/kobezzza/Collection/commit/d3d937645f62f37d3115d6aa90bb510fd856e6a2
- https://github.com/kobezzza/Collection/issues/27
- https://github.com/kobezzza/Collection/releases/tag/v6.8.1
- https://security.snyk.io/vuln/SNYK-JS-COLLECTIONJS-3185148