CVE-2024-57079

7.5 HIGH

📋 TL;DR

This vulnerability is a prototype pollution flaw in the lib.deepMerge function of @zag-js/core v0.50.0 that allows attackers to supply crafted payloads to cause Denial of Service (DoS). It affects applications using this specific version of the @zag-js/core library for JavaScript component development. The attack disrupts service availability by exploiting object manipulation.

💻 Affected Systems

Products:
  • @zag-js/core
Versions: v0.50.0
Operating Systems: All platforms running Node.js or JavaScript environments
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects applications that use the lib.deepMerge function from this specific version. Other versions may be unaffected.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete application unavailability due to DoS, potentially affecting all users and causing service disruption.

🟠

Likely Case

Partial or intermittent service degradation affecting specific application functions that use the vulnerable deepMerge function.

🟢

If Mitigated

Minimal impact with proper input validation and updated library versions.

🌐 Internet-Facing: HIGH - Web applications using this library are directly exposed to crafted payloads from external attackers.
🏢 Internal Only: MEDIUM - Internal applications are still vulnerable but have reduced attack surface compared to internet-facing systems.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires understanding of prototype pollution techniques and ability to supply crafted payloads to the deepMerge function.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: v0.50.1 or later

Vendor Advisory: https://github.com/chakra-ui/zag/releases

Restart Required: No

Instructions:

1. Update @zag-js/core dependency to v0.50.1 or later. 2. Run npm update @zag-js/core or yarn upgrade @zag-js/core. 3. Rebuild and redeploy application.

🔧 Temporary Workarounds

Input Validation

all

Implement strict input validation for objects passed to deepMerge function to reject malicious payloads.

Function Wrapper

all

Wrap deepMerge calls with sanitization logic to prevent prototype pollution.

🧯 If You Can't Patch

  • Implement Web Application Firewall (WAF) rules to detect and block prototype pollution patterns
  • Isolate affected services and implement rate limiting to reduce DoS impact

🔍 How to Verify

Check if Vulnerable:

Check package.json or package-lock.json for @zag-js/core version 0.50.0

Check Version:

npm list @zag-js/core or grep @zag-js/core package.json

Verify Fix Applied:

Verify @zag-js/core version is 0.50.1 or higher after update

📡 Detection & Monitoring

Log Indicators:

  • Unusual application crashes
  • High memory consumption alerts
  • DeepMerge function error logs

Network Indicators:

  • Increased error responses (5xx)
  • Unusual payload patterns in requests

SIEM Query:

source="application_logs" AND ("deepMerge" OR "prototype") AND (error OR crash)

🔗 References

📤 Share & Export