CVE-2021-37713
published high CVSS 3.1 · 8.2Arbitrary File Creation/Overwrite on Windows via insufficient relative path sanitization
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| npm | — | node-tar< 4.4.18 · >= 5.0.0, < 5.0.10 · >= 6.0.0, < 6.1.9 | Affected | Not stated | GitHub_M |
| Alpine Linux | edge | nodejs | Fixed | 14.17.6-r0 | Package fix record |
| SUSE / openSUSE | SLE-12 | nodejs12aarch64 | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| Alpine Linux | v3.11 | nodejs | Fixed | 12.22.6-r0 | Package fix record |
| Alpine Linux | v3.12 | nodejs | Fixed | 12.22.6-r0 | Package fix record |
| Alpine Linux | v3.13 | nodejs | Fixed | 14.17.6-r0 | Package fix record |
| Alpine Linux | v3.14 | nodejs | Fixed | 14.17.6-r0 | Package fix record |
| Alpine Linux | v3.15 | nodejs | Fixed | 14.17.6-r0 | Package fix record |
Show 93 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Alpine Linux | v3.16 | nodejs | Fixed | 14.17.6-r0 | Package fix record |
| Alpine Linux | v3.17 | nodejs | Fixed | 14.17.6-r0 | Package fix record |
| Alpine Linux | v3.18 | nodejs | Fixed | 14.17.6-r0 | Package fix record |
| Alpine Linux | v3.19 | nodejs | Fixed | 14.17.6-r0 | Package fix record |
| Alpine Linux | v3.20 | nodejs | Fixed | 14.17.6-r0 | Package fix record |
| Alpine Linux | v3.21 | nodejs | Fixed | 14.17.6-r0 | Package fix record |
| Alpine Linux | v3.22 | nodejs | Fixed | 14.17.6-r0 | Package fix record |
| Alpine Linux | v3.23 | nodejs | Fixed | 14.17.6-r0 | Package fix record |
| Alpine Linux | v3.24 | nodejs | Fixed | 14.17.6-r0 | Package fix record |
| SUSE / openSUSE | SLE-12 | nodejs12ppc64le | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12 | nodejs12s390x | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12 | nodejs12x86_64 | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12 | nodejs12-develaarch64 | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12 | nodejs12-develppc64le | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12 | nodejs12-devels390x | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12 | nodejs12-develx86_64 | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12 | nodejs12-docsnoarch | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12 | nodejs14aarch64 | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12 | nodejs14ppc64le | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12 | nodejs14s390x | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12 | nodejs14x86_64 | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12 | nodejs14-develaarch64 | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12 | nodejs14-develppc64le | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12 | nodejs14-devels390x | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12 | nodejs14-develx86_64 | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12 | nodejs14-docsnoarch | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12 | npm12aarch64 | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12 | npm12ppc64le | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12 | npm12s390x | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12 | npm12x86_64 | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12 | npm14aarch64 | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12 | npm14ppc64le | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12 | npm14s390x | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12 | npm14x86_64 | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12-SP3 | nodejs12aarch64 | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12-SP3 | nodejs12ppc64le | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12-SP3 | nodejs12s390x | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12-SP3 | nodejs12x86_64 | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12-SP3 | nodejs12-develaarch64 | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12-SP3 | nodejs12-develppc64le | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12-SP3 | nodejs12-devels390x | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12-SP3 | nodejs12-develx86_64 | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12-SP3 | nodejs12-docsnoarch | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12-SP3 | nodejs14aarch64 | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12-SP3 | nodejs14ppc64le | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12-SP3 | nodejs14s390x | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12-SP3 | nodejs14x86_64 | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12-SP3 | nodejs14-develaarch64 | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12-SP3 | nodejs14-develppc64le | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12-SP3 | nodejs14-devels390x | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12-SP3 | nodejs14-develx86_64 | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12-SP3 | nodejs14-docsnoarch | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12-SP3 | npm12aarch64 | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12-SP3 | npm12ppc64le | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12-SP3 | npm12s390x | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12-SP3 | npm12x86_64 | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12-SP3 | npm14aarch64 | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12-SP3 | npm14ppc64le | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12-SP3 | npm14s390x | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12-SP3 | npm14x86_64 | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12-SP4 | nodejs12aarch64 | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12-SP4 | nodejs12ppc64le | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12-SP4 | nodejs12s390x | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12-SP4 | nodejs12x86_64 | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12-SP4 | nodejs12-develaarch64 | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12-SP4 | nodejs12-develppc64le | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12-SP4 | nodejs12-devels390x | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12-SP4 | nodejs12-develx86_64 | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12-SP4 | nodejs12-docsnoarch | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12-SP4 | nodejs14aarch64 | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12-SP4 | nodejs14ppc64le | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12-SP4 | nodejs14s390x | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12-SP4 | nodejs14x86_64 | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12-SP4 | nodejs14-develaarch64 | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12-SP4 | nodejs14-develppc64le | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12-SP4 | nodejs14-devels390x | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12-SP4 | nodejs14-develx86_64 | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12-SP4 | nodejs14-docsnoarch | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12-SP4 | npm12aarch64 | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12-SP4 | npm12ppc64le | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12-SP4 | npm12s390x | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12-SP4 | npm12x86_64 | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12-SP4 | npm14aarch64 | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12-SP4 | npm14ppc64le | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12-SP4 | npm14s390x | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12-SP4 | npm14x86_64 | Advisory build | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
| SUSE / openSUSE | SLE-12-SP5 | nodejs12aarch64 | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12-SP5 | nodejs12ppc64le | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12-SP5 | nodejs12s390x | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12-SP5 | nodejs12x86_64 | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12-SP5 | nodejs12-develaarch64 | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12-SP5 | nodejs12-develppc64le | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SUSE / openSUSE | SLE-12-SP5 | nodejs12-devels390x | Advisory build | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
Package entries are limited to the first 100 builds and 100 linked advisories.
Description
The npm package "tar" (aka node-tar) before versions 4.4.18, 5.0.10, and 6.1.9 has an arbitrary file creation/overwrite and arbitrary code execution vulnerability. node-tar aims to guarantee that any file whose location would be outside of the extraction target directory is not extracted. This is, in part, accomplished by sanitizing absolute paths of entries within the archive, skipping archive entries that contain `..` path portions, and resolving the sanitized paths against the extraction target directory. This logic was insufficient on Windows systems when extracting tar files that contained a path that was not an absolute path, but specified a drive letter different from the extraction target, such as `C:some\path`. If the drive letter does not match the extraction target, for example `D:\extraction\dir`, then the result of `path.resolve(extractionDirectory, entryPath)` would resolve against the current working directory on the `C:` drive, rather than the extraction target directory. Additionally, a `..` portion of the path could occur immediately after the drive letter, such as `C:../foo`, and was not properly sanitized by the logic that checked for `..` within the normalized and split portions of the path. This only affects users of `node-tar` on Windows systems. These issues were addressed in releases 4.4.18, 5.0.10 and 6.1.9. The v3 branch of node-tar has been deprecated and did not receive patches for these issues. If you are still using a v3 release we recommend you update to a more recent version of node-tar. There is no reasonable way to work around this issue without performing the same path normalization procedures that node-tar now does. Users are encouraged to upgrade to the latest patched versions of node-tar, rather than attempt to sanitize paths themselves.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 8.2 / 10
- Severity
- high
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| npm | node-tar | < 4.4.18 (affected)>= 5.0.0, < 5.0.10 (affected)>= 6.0.0, < 6.1.9 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-22 CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
References
4Provider assertions
2GitHub_M · cna
Arbitrary File Creation/Overwrite on Windows via insufficient relative path sanitization
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- a195aaf04c4edcb87442313b52b2ff758d0f4185859a9f5621289e6f7fb54bd4
- Ingested
- 23 Sep 2026, 07:55:20 UTC
- Source record
- Official CVE record