CVE-2021-29418
JSON

5.3medium

Improper parsing of octal bytes in netmask

Severity
5.3medium CVSS:3.1 by NVD
Exploit likelihood
1.51% (higher than 75% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre
Also known as
GHSA-4c7m-wxvm-r7gcGHSA-pch5-whg9-qr2r

Description

The netmask package before 2.0.1 for Node.js mishandles certain unexpected characters in an IP address string, such as an octal digit of 9. This (in some situations) allows attackers to bypass access control that is based on IP addresses. NOTE: this issue exists because of an incomplete fix for CVE-2021-28918.

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
netmask (npm)before 1.1.0, before 2.0.1GitHub Advisory Database
netmask_project netmaskbefore 2.0.1NVD

All scores

GitHub9.1critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
GitHub5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
NVD5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
NVD5.0medium CVSS:2.0AV:N/AC:L/Au:N/C:N/I:P/A:N

Classification

What each source says

CVE List

The netmask package before 2.0.1 for Node.js mishandles certain unexpected characters in an IP address string, such as an octal digit of 9. This (in some situations) allows attackers to bypass access control that is based on IP addresses. NOTE: this issue exists because of an incomplete fix for CVE-2021-28918.

GitHub Advisory Database

Improper input validation of octal strings in netmask npm package v1.0.6 and below allows unauthenticated remote attackers to perform indeterminate SSRF, RFI, and LFI attacks on many of the dependent packages. A remote unauthenticated attacker can bypass packages relying on netmask to filter IPs and reach critical VPN or LAN hosts.

:exclamation: NOTE: The fix for this issue was incomplete. A subsequent fix was made in version 2.0.1 which was assigned CVE-2021-29418 / GHSA-pch5-whg9-qr2r. For complete protection from this vulnerability an upgrade to version 2.0.1 or later is recommended.

NVD (es)

El paquete netmask versiones anteriores a 2.0.1 para Node.js, maneja inapropiadamente determinados caracteres inesperados en una cadena de direcciones IP, como un dígito octal de 9. Esto (en algunas situaciones) permite a atacantes omitir el control de acceso que es basado en direcciones IP. NOTA: este problema se presenta debido a una corrección incompleta para el CVE-2021-28918.

References

https://github.com/rs/node-netmask/commit/3f19a056c4eb808ea4a29f234274c67bc5a848f4patch, third-party-advisory, web
https://vuln.ryotak.me/advisories/6third-party-advisory, web
https://security.netapp.com/advisory/ntap-20210604-0001/third-party-advisory
https://nvd.nist.gov/vuln/detail/CVE-2021-28918advisory
https://github.com/advisories/GHSA-pch5-whg9-qr2radvisory
https://github.com/rs/node-netmaskweb
https://github.com/rs/node-netmask/blob/98294cb20695f2c6c36219a4fbcd4744fb8d0682/CHANGELOG.md#v110-mar-18-2021web
https://github.com/sickcodes/security/blob/master/advisories/SICK-2021-011.mdweb
https://rootdaemon.com/2021/03/29/vulnerability-in-netmask-npm-package-affects-280000-projectsweb
https://security.netapp.com/advisory/ntap-20210528-0010web
https://www.bleepingcomputer.com/news/security/critical-netmask-networking-bug-impacts-thousands-of-applicationsweb
https://www.npmjs.com/package/netmaskweb

Related

Sources

SourceRecordLicence
CVE ListCVE-2021-29418 changed 2024-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-4c7m-wxvm-r7gc changed 2026-09-10CC-BY-4.0
GitHub Advisory DatabaseGHSA-pch5-whg9-qr2r changed 2026-09-10CC-BY-4.0
NVDCVE-2021-29418 changed 2026-06-17Public domain