CVE-2022-24802

8.1 HIGH

📋 TL;DR

deepmerge-ts is vulnerable to Prototype Pollution, allowing attackers to modify object prototypes and potentially execute arbitrary code or cause denial of service. This affects any application using vulnerable versions of the deepmerge-ts TypeScript library for object merging operations.

💻 Affected Systems

Products:
  • deepmerge-ts
Versions: Versions before 4.0.2
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Any application using deepmerge-ts for object merging with untrusted input is vulnerable.

📦 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

Application crashes, data corruption, or privilege escalation within the affected application.

🟢

If Mitigated

Limited impact if input validation and sandboxing prevent malicious payloads from reaching the vulnerable function.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires attacker-controlled input to the deepmerge function.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 4.0.2

Vendor Advisory: https://github.com/RebeccaStevens/deepmerge-ts/security/advisories/GHSA-r9w3-g83q-m6hq

Restart Required: No

Instructions:

1. Update deepmerge-ts to version 4.0.2 or later using npm: npm update deepmerge-ts. 2. Verify no breaking changes in your application. 3. Test thoroughly after update.

🔧 Temporary Workarounds

Input validation and sanitization

all

Implement strict input validation to prevent malicious objects from reaching the deepmerge function.

🧯 If You Can't Patch

  • Implement strict input validation and sanitization for all objects passed to deepmerge functions.
  • Isolate the application using network segmentation and restrict access to minimize attack surface.

🔍 How to Verify

Check if Vulnerable:

Check package.json or node_modules for deepmerge-ts version. If version is below 4.0.2, it is vulnerable.

Check Version:

npm list deepmerge-ts

Verify Fix Applied:

After updating, verify deepmerge-ts version is 4.0.2 or higher using npm list deepmerge-ts.

📡 Detection & Monitoring

Log Indicators:

  • Unusual application crashes, unexpected object property modifications, or prototype pollution attempts in logs.

Network Indicators:

  • Unusual outbound connections from the application post-exploitation.

SIEM Query:

Search for application logs containing deepmerge function errors or unexpected object modifications.

🔗 References

📤 Share & Export