NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · npm

CVE-2023-42282: NPM IP package incorrectly identifies some private IP addresses as public

lowGHSA-78xj-cgh5-2h22

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.

Published Feb 8, 2024 · Updated Mar 18, 2026

Affected packages

ip

Ecosystem
npm
Affected
= 2.0.0
Fixed in
2.0.1
Check
npm ls ip

ip

Ecosystem
npm
Affected
< 1.1.9
Fixed in
1.1.9
Check
npm ls ip

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

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.

Credited to G-Rath, levpachmanov, dotboris, iFreilicht.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology

More npm vulnerabilities

All npm entries