All reports
Low

NPM IP package incorrectly identifies some private IP addresses as public

Affected versions

npmip
Affected versions
< 1.1.9
Fixed version
1.1.9
npmip
Affected versions
= 2.0.0
Fixed version
2.0.1
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported

Exploitation

CVE-2023-42282

Probability of exploitation in the next 30 days: 1.61%

FIRST EPSS · 2026-11-20

Description

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.

Links

Credits

  • G-Rath
  • levpachmanov
  • dotboris
  • iFreilicht