PortGate

Advisories · Node.js & Next.js

CVE-2023-42282 High CVSS 8.1

node-ip isPublic bypass

Disclosed 2023 · Last reviewed 2 Dec 2026

ip.isPublic could treat an address as public when it was actually a special-use address. Applications that used it as an allow-list could then fetch the wrong host.

What happened

The classifier missed some octal and short forms.

Affected and patched versions

Affected
The ip package before 1.1.9 and 2.0.1.
Patched
ip 1.1.9 and 2.0.1.

How to check your server

Check

npm ls ip

How to fix and harden

  1. Upgrade the ip package on the major you use.
  2. Do not use isPublic as the only check before a server-side fetch. Allow-list the hosts you intend to call.

Fix

npm ls ip

Sources

Version ranges and fixes follow the vendor advisory. When a distribution backports a fix, trust its security tracker over the upstream version number. New advisories: RSS · JSON