CVE-2024-29415

8.1 HIGH

📋 TL;DR

The ip package through version 2.0.1 for Node.js improperly categorizes certain IP address formats (like 127.1, 01200034567, and IPv6 variations) as globally routable via its isPublic() function, allowing Server-Side Request Forgery (SSRF) attacks. This affects any Node.js application using the vulnerable ip package version to validate IP addresses for security purposes. This is an incomplete fix for CVE-2023-42282.

💻 Affected Systems

Products:
  • node-ip package
Versions: All versions through 2.0.1
Operating Systems: All platforms running Node.js
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects applications using the isPublic() function for security validation of IP addresses.

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

Attackers could bypass IP validation to make internal network requests, potentially accessing sensitive internal services, exfiltrating data, or performing internal reconnaissance.

🟠

Likely Case

SSRF attacks allowing access to internal services that should be restricted, potentially leading to data exposure or internal service abuse.

🟢

If Mitigated

Limited impact if proper network segmentation and additional validation layers exist beyond the ip package.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires the application to use isPublic() for security decisions. The GitHub issues show specific bypass examples.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.0.2

Vendor Advisory: https://github.com/indutny/node-ip/issues/150

Restart Required: Yes

Instructions:

1. Update package.json to specify 'ip': '^2.0.2'. 2. Run 'npm update ip' or 'yarn upgrade ip'. 3. Restart your Node.js application.

🔧 Temporary Workarounds

Implement custom IP validation

all

Add additional validation logic before relying on isPublic() function

🧯 If You Can't Patch

  • Implement network-level controls to restrict outbound connections from application servers
  • Add application-level validation using multiple methods beyond the ip package

🔍 How to Verify

Check if Vulnerable:

Check package.json or package-lock.json for ip package version ≤2.0.1

Check Version:

npm list ip | grep ip

Verify Fix Applied:

Verify ip package version is 2.0.2 or higher in package.json and test isPublic() with known bypass IPs

📡 Detection & Monitoring

Log Indicators:

  • Unusual outbound HTTP requests from application servers to internal IP ranges
  • Requests with unusual IP address formats

Network Indicators:

  • Outbound connections from application servers to internal services that should be restricted

SIEM Query:

source='application_logs' AND (http_request LIKE '%127.1%' OR http_request LIKE '%01200034567%' OR http_request LIKE '%::fFFf:127.0.0.1%')

🔗 References

📤 Share & Export