CVE-2025-3197

7.3 HIGH

📋 TL;DR

CVE-2025-3197 is a prototype pollution vulnerability in the expand-object npm package that allows attackers to modify JavaScript object prototypes by controlling input to the expand() function. This affects any application using expand-object version 0.0.0 or later to parse user-controlled data. Attackers can potentially execute arbitrary code, modify application behavior, or cause denial of service.

💻 Affected Systems

Products:
  • expand-object npm package
Versions: 0.0.0 and later
Operating Systems: All platforms running Node.js
Default Config Vulnerable: ⚠️ Yes
Notes: Any application using expand-object with untrusted input is vulnerable. The vulnerability exists in the default configuration.

⚠️ 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

Remote code execution leading to complete system compromise, data theft, or ransomware deployment.

🟠

Likely Case

Application instability, denial of service, or privilege escalation within the affected application.

🟢

If Mitigated

Limited impact with proper input validation and sandboxing, potentially only causing application crashes.

🌐 Internet-Facing: HIGH - Any web application using this package with user input is directly exploitable.
🏢 Internal Only: MEDIUM - Internal applications are still vulnerable but have reduced attack surface.

🎯 Exploit Status

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

Proof of concept available in security advisories. Exploitation requires attacker to control input to expand() function.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Check for updated version from maintainer (no specific version indicated in provided references)

Vendor Advisory: https://security.snyk.io/vuln/SNYK-JS-EXPANDOBJECT-5821390

Restart Required: Yes

Instructions:

1. Check current expand-object version. 2. Update to patched version when available. 3. Restart all affected Node.js applications. 4. Test functionality after update.

🔧 Temporary Workarounds

Input Validation and Sanitization

all

Implement strict input validation to reject any input containing __proto__ or constructor properties

Use Object.create(null)

all

Create objects without prototype chain using Object.create(null) before passing to expand()

const safeObject = Object.create(null);
const result = expand(input, safeObject);

🧯 If You Can't Patch

  • Implement strict input validation to reject any keys containing __proto__, constructor, or prototype
  • Isolate affected applications in containers or VMs with minimal privileges and network access

🔍 How to Verify

Check if Vulnerable:

Check package.json for expand-object dependency and verify version is 0.0.0 or later

Check Version:

npm list expand-object

Verify Fix Applied:

After update, test with malicious input containing __proto__ properties to ensure they are rejected

📡 Detection & Monitoring

Log Indicators:

  • Unusual application crashes
  • Unexpected property modifications in objects
  • Error logs mentioning prototype pollution

Network Indicators:

  • Unusual HTTP requests containing __proto__ in parameters
  • Suspicious input patterns to API endpoints using expand-object

SIEM Query:

search for 'expand-object' in application logs AND (__proto__ OR constructor OR prototype) in request parameters

🔗 References

📤 Share & Export