CVE-2021-28918
Improper parsing of octal bytes in netmask
Also known as CVE-2021-29418, GHSA-4c7m-wxvm-r7gc, GHSA-pch5-whg9-qr2r
Mitigation
- Upgrade netmask to one of 1.1.0, 2.0.1 (or later in the same release line).
Who should check
- Projects that depend on npm package netmask (< 1.1.0)
- Anyone running n/a (versions: see the vendor advisory)
Vulnerability facts
- Affected
- netmask < 1.1.0
- Fixed in
- 1.1.0, 2.0.1
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- Yes: see the exploit references below
- Remote exploitation
- Remote, no login needed
- CVSS
- 5.3 (v3.1, NVD)CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: None
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: None
- Integrity impact: Low
- Availability impact: None
- EPSS
- 15.16% chance of exploitation in 30 days (percentile 97, 2026-11-26)
- CWE
- CWE-20
- Modified
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 and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| npm netmask | < 1.1.0 | 1.1.0, 2.0.1 | osv |
| n/a | — | — | nvd |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2021-28918. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2021-28918.md Affected: netmask < 1.1.0 Fixed in: 1.1.0, 2.0.1 Steps: 1. Search this machine and project for netmask (npm), n/a: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
Exploits and PoCs
Other
- https://www.npmjs.com/package/netmask
- https://github.com/rs/node-netmask
- https://security.netapp.com/advisory/ntap-20210528-0010/
- https://rootdaemon.com/2021/03/29/vulnerability-in-netmask-npm-package-affects-280000-projects/
- https://vuln.ryotak.me/advisories/6
- https://security.netapp.com/advisory/ntap-20210604-0001/
- https://github.com/rs/node-netmask/blob/98294cb20695f2c6c36219a4fbcd4744fb8d0682/CHANGELOG.md#v110-mar-18-2021
- https://rootdaemon.com/2021/03/29/vulnerability-in-netmask-npm-package-affects-280000-projects
- https://security.netapp.com/advisory/ntap-20210528-0010
- https://www.bleepingcomputer.com/news/security/critical-netmask-networking-bug-impacts-thousands-of-applications
- https://security.netapp.com/advisory/ntap-20210604-0001
- https://sick.codes/sick-2021-011
- https://sick.codes/universal-netmask-npm-package-used-by-270000-projects-vulnerable-to-octal-input-data-server-side-request-forgery-remote-file-inclusion-local-file-inclusion-and-more-cve-2021-28918
FAQ
Is CVE-2021-28918 being exploited?
There is no confirmed exploitation: CVE-2021-28918 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 15.16% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2021-28918?
Medium: CVSS 5.3 (v3.1, scored by NVD). Remote, no login needed.
Which versions are affected by CVE-2021-28918?
netmask < 1.1.0.
Is there a fix for CVE-2021-28918?
Yes. Fixed in 1.1.0, 2.0.1. Upgrade netmask to one of 1.1.0, 2.0.1 (or later in the same release line).
How do I check if I'm affected by CVE-2021-28918?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.