CVE-2023-42282 is a critical-severity (CVSS 9.8) Server-Side Request Forgery (SSRF) vulnerability in ip. 2 public exploit or proof-of-concept references are indexed, so weaponization risk is real. A fix is available for ip — see the affected versions and patch details below.
NPM IP package incorrectly identifies some private IP addresses as public
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- A successful exploit gives an attacker total control of the affected component, not partial access.
Exploitation and automatability from CISA’s SSVC triage for CVE-2023-42282.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
ipnpmDescription
The isPublic() function in the NPM package ip doesn't correctly identify certain private IP addresses in uncommon formats such as 0x7F.1 as private. Instead, it reports them as public by returning true. This can lead to security issues such as Server-Side Request Forgery (SSRF) if isPublic() is used to protect sensitive code paths when passed user input. Versions 1.1.9 and 2.0.1 fix the issue.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | ip | ≥ 2.0.0&&< 2.0.1 | 2.0.1npm install ip@2.0.1 |
| 📦npm | ip | all versions | 1.1.9npm install ip@1.1.9 |
Affected Products
ipfedorindutnyResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for ip, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update ip to 2.0.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2023-42282 is resolved across your whole dependency graph.
Workarounds
Restrict outbound requests from the affected component to an allowlist of hosts, block access to link-local and internal address ranges at the network layer, and require authentication on internal services so a forged request cannot reach them unauthenticated.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
It appears that npm does not utilize the bundled code therefore Red Hat Enterprise Linux is not affected by this vulnerability. While the vulnerability in the NPM IP Package presents a significant security concern, it's categorized as important rather than critical due to several factors. Firstly, the…
Mitigation for this issue is either not available or the currently available options don't meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.Source: Red Hat security advisory for CVE-2023-42282 (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| HawtIO 4.0.0 for Red Hat build of Apache Camel 4 | see advisory | RHSA-2024:3550 |
| Migration Toolkit for Virtualization 2.5 | migration-toolkit-virtualization/mtv-console-plugin-rhel9:2.5.6-4 | RHBA-2024:1440 |
| NETWORK-OBSERVABILITY-1.6.0-RHEL-9 | network-observability/network-observability-cli-rhel9:v1.6.0-66 | RHSA-2024:3868 |
| Red Hat OpenShift Dev Spaces 3 Containers | devspaces/code-rhel8:3.17-19 | RHSA-2024:10236 |
| RHDH-1.1-RHEL-9 | rhdh/rhdh-hub-rhel9:1.1-97 | RHEA-2024:1366 |
| RHODF-4.15-RHEL-9 | odf4/mcg-core-rhel9:v4.15.0-68 | RHSA-2024:1383 |
Frequently Asked Questions
Is CVE-2023-42282 in your dependencies?
Find it across npm, including transitive dependencies.