Server-side Request Forgery (SSRF) Affecting ip package, versions <1.1.9>=2.0.0 <2.0.1


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.08% (38th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Server-side Request Forgery (SSRF) vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-IP-6240864
  • published11 Feb 2024
  • disclosed8 Feb 2024
  • creditEmre Durmaz

Introduced: 8 Feb 2024

CVE-2023-42282  (opens in a new tab)
CWE-918  (opens in a new tab)

How to fix?

Upgrade ip to version 1.1.9, 2.0.1 or higher.

Overview

ip is a Node library.

Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) via the isPublic function, by failing to identify hex-encoded 0x7f.1 as equivalent to the private addess 127.0.0.1. An attacker can expose sensitive information, interact with internal services, or exploit other vulnerabilities within the network by exploiting this vulnerability.

PoC

var ip = require('ip');

console.log(ip.isPublic("0x7f.1"));
//This returns true. It should be false because 0x7f.1 == 127.0.0.1 == 0177.1

CVSS Scores

version 3.1