Advisory

GHSA-78xj-cgh5-2h22

Also known as: CVE-2023-42282

Summary

NPM IP package incorrectly identifies some private IP addresses as public

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.

Severity

Low Basis: The source's own band: LOW

Dates

Published
2024-02-08 18:30 UTC
Modified
2026-09-10 03:50 UTC

Affected packages and fixes

ip

npm · All systems

Affected

  • introduced 2.0.0, fixed 2.0.1 (semver)

Fixed versions

2.0.1

Fix

ip

npm · All systems

Affected

  • introduced 0, fixed 1.1.9 (semver)

Fixed versions

1.1.9

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences