PT-2021-17985 · Npm · Netmask

John Jackson

+5

·

Published

2021-03-28

·

Updated

2024-02-11

·

CVE-2021-28918

CVSS v3.1

9.1

Critical

VectorAV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Name of the Vulnerable Software and Affected Versions: netmask npm package versions 1.0.6 and below netmask npm package versions 2.0.0
Description: The issue is related to improper input validation of octal strings in the netmask npm package, allowing unauthenticated remote attackers to perform server-side request forgery (SSRF), remote file inclusion (RFI), and local file inclusion (LFI) attacks. This vulnerability can be exploited to bypass packages relying on netmask to filter IPs and reach critical VPN or LAN hosts. The netmask package is used by over 270,000 projects and has around 3 million downloads per week.
Recommendations: For netmask npm package versions 1.0.6 and below: Upgrade to version 2.0.1 or later to ensure complete protection from this vulnerability. For netmask npm package version 2.0.0: Upgrade to version 2.0.1 or later, as the initial fix in version 2.0.0 was incomplete.

Exploit

Fix

Incorrect Type Conversion or Cast

RCE

Weakness Enumeration

Related Identifiers

CVE-2021-28918
GHSA-4C7M-WXVM-R7GC
GHSA-PCH5-WHG9-QR2R

Affected Products

Netmask