CVE-2024-21523

7.5 HIGH

📋 TL;DR

The 'images' npm package is vulnerable to Denial of Service (DoS) attacks when unexpected input types are provided to certain functions. Attackers can trigger process crashes by sending specific integer values (like 0) to the size function, causing segmentation faults. This affects all applications using any version of the 'images' package.

💻 Affected Systems

Products:
  • node-images npm package
Versions: All versions
Operating Systems: All platforms running Node.js
Default Config Vulnerable: ⚠️ Yes
Notes: Any application using the 'images' package for image processing is vulnerable regardless of 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

Complete service disruption through repeated process crashes, leading to extended downtime and potential data loss in processing pipelines.

🟠

Likely Case

Intermittent service interruptions when malicious inputs cause individual process crashes, requiring manual restarts.

🟢

If Mitigated

Minimal impact with proper input validation and process isolation in place, allowing for graceful degradation.

🌐 Internet-Facing: HIGH - Web applications processing user-uploaded images are directly exposed to exploitation.
🏢 Internal Only: MEDIUM - Internal services using the package could be exploited by authenticated users or through supply chain attacks.

🎯 Exploit Status

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

Exploitation requires sending specific integer values (like 0) to vulnerable functions, which is trivial to automate.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: None available

Vendor Advisory: No official vendor advisory found

Restart Required: Yes

Instructions:

1. Remove the 'images' package from your project. 2. Use an alternative image processing library like 'sharp' or 'jimp'. 3. Update package.json dependencies. 4. Restart all affected services.

🔧 Temporary Workarounds

Input validation wrapper

all

Wrap all calls to 'images' functions with strict input validation to reject unexpected types and specific integer values.

Process isolation

all

Run image processing in isolated worker processes or containers to limit crash impact to individual requests.

🧯 If You Can't Patch

  • Implement strict input validation at application boundaries to filter malicious values before reaching vulnerable functions.
  • Deploy rate limiting and monitoring to detect and block repeated crash attempts.

🔍 How to Verify

Check if Vulnerable:

Check if 'images' package is in package.json or node_modules: grep -r 'images' package.json && npm list images

Check Version:

npm list images | grep images

Verify Fix Applied:

Confirm 'images' package is removed: npm list images should show 'empty' and package.json should not contain 'images' dependency.

📡 Detection & Monitoring

Log Indicators:

  • Process crashes with segmentation fault errors
  • Abnormal termination of Node.js processes handling images
  • Error logs containing 'assert' failures

Network Indicators:

  • Repeated requests with unusual integer parameters to image processing endpoints
  • Sudden spikes in 5xx errors from image services

SIEM Query:

source="application.logs" AND ("segmentation fault" OR "assert failed" OR "process crashed") AND "images"

🔗 References

📤 Share & Export