LowGHSA-78xj-cgh5-2h22CVE-2023-42282

NPM IP package incorrectly identifies some private IP addresses as public

Published 8 Feb 2024 · Updated 10 Sept 2026

Affected packages

ipnpm
Affected
>=2.0.0 <2.0.1
Fixed in
2.0.1
Update to the fixed version for your release line, for example:npm install ip@2.0.1
ipnpm
Affected
<1.1.9
Fixed in
1.1.9
Update to the fixed version for your release line, for example:npm install ip@1.1.9

Details

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.

Is GHSA-78xj-cgh5-2h22 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected ip, and gives you the command that fixes it.

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.