CVE-2021-28918
JSON

9.1critical

Improper parsing of octal bytes in netmask

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

Description

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.

Affected

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

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
NVD9.1critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
NVD6.4medium CVSS:2.0AV:N/AC:L/Au:N/C:P/I:P/A:N

Classification

What each source says

CVE List

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.

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.

GitHub Advisory Database

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.

NVD (es)

Una comprobación inapropiada de entrada de cadenas octales en el paquete netmask npm versiones v1.0.6 y anteriores, permite a atacantes remotos no autenticados llevar a cabo ataques de tipo SSRF, RFI y LFI indeterminados en muchos de los paquetes dependientes. Un atacante remoto no autenticado puede omitir unos paquetes que dependen de la máscara de red para filtrar las direcciones IP y llegar a hosts críticos de VPN o LAN.

References

https://www.npmjs.com/package/netmaskproduct, third-party-advisory, web
https://github.com/rs/node-netmaskthird-party-advisory, web
https://www.bleepingcomputer.com/news/security/critical-netmask-networking-bug-impacts-thousands-of-applications/exploit, press/media-coverage, third-party-advisory
https://github.com/advisories/GHSA-pch5-whg9-qr2radvisory, third-party-advisory
https://github.com/sickcodes/security/blob/master/advisories/SICK-2021-011.mdexploit, third-party-advisory, web
https://security.netapp.com/advisory/ntap-20210528-0010/third-party-advisory
https://rootdaemon.com/2021/03/29/vulnerability-in-netmask-npm-package-affects-280000-projects/third-party-advisory
https://nvd.nist.gov/vuln/detail/CVE-2021-28918advisory
https://github.com/rs/node-netmask/blob/98294cb20695f2c6c36219a4fbcd4744fb8d0682/CHANGELOG.md#v110-mar-18-2021web
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

Related

Sources

SourceRecordLicence
CVE ListCVE-2021-28918 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-28918 changed 2026-06-17Public domain