CVE-2024-38996

9.8 CRITICAL

📋 TL;DR

This CVE describes a prototype pollution vulnerability in ag-grid-community and ag-grid-enterprise versions 31.3.2 via the _.mergeDeep function. Attackers can inject arbitrary properties to execute arbitrary code or cause Denial of Service. Any application using these vulnerable versions is affected.

💻 Affected Systems

Products:
  • ag-grid-community
  • ag-grid-enterprise
Versions: 31.3.2
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability exists in the default configuration when using the _.mergeDeep function.

📦 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

Denial of Service causing application crashes or instability, potentially leading to data corruption.

🟢

If Mitigated

Limited impact if input validation and sanitization are implemented, though risk remains.

🌐 Internet-Facing: HIGH - Web applications using ag-grid are typically internet-facing, making them accessible to attackers.
🏢 Internal Only: MEDIUM - Internal applications are less exposed but still vulnerable to insider threats or lateral movement.

🎯 Exploit Status

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

Proof-of-concept code is publicly available in the provided gists, making exploitation straightforward.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 31.3.3 or later

Vendor Advisory: https://www.ag-grid.com/changelog/

Restart Required: Yes

Instructions:

1. Update ag-grid-community and ag-grid-enterprise to version 31.3.3 or later. 2. Run 'npm update ag-grid-community ag-grid-enterprise' or equivalent package manager command. 3. Restart the application server.

🔧 Temporary Workarounds

Input Validation and Sanitization

all

Implement strict input validation to reject any unexpected properties in objects passed to _.mergeDeep.

Use Object.freeze on Prototypes

all

Freeze Object.prototype to prevent prototype pollution, though this may break legitimate functionality.

Object.freeze(Object.prototype);

🧯 If You Can't Patch

  • Implement strict Content Security Policy (CSP) to limit script execution.
  • Use web application firewall (WAF) rules to block malicious payloads targeting prototype pollution.

🔍 How to Verify

Check if Vulnerable:

Check package.json or node_modules for ag-grid-community and ag-grid-enterprise version 31.3.2.

Check Version:

npm list ag-grid-community ag-grid-enterprise

Verify Fix Applied:

Verify that ag-grid-community and ag-grid-enterprise are updated to version 31.3.3 or later in package.json.

📡 Detection & Monitoring

Log Indicators:

  • Unusual error logs related to prototype pollution or unexpected object properties.
  • Application crashes or abnormal termination logs.

Network Indicators:

  • HTTP requests containing malicious payloads with __proto__ or constructor properties.

SIEM Query:

search 'ag-grid' AND ('prototype pollution' OR 'mergeDeep' OR 'CVE-2024-38996') in application logs

🔗 References

📤 Share & Export