CVE-2021-37712
CVE-2021-37712 — Arbitrary File Creation/Overwrite via insufficient symlink protection due to directory cache poisoning using symbolic links
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 modified by a symbolic link is not extracted. This is, in part, achieved by ensuring that extracted directories are not symlinks. Additionally, in order to prevent unnecessary stat calls to determine whether a given path is a directory, paths are cached when directories are created. This logic was insufficient when extracting tar files that contained both a directory and a symlink with names containing unicode values that normalized to the same value. Additionally, on Windows systems, long path portions would resolve to the same file system entities as their 8.3 "short path" counterparts. A specially crafted tar archive could thus include a directory with one…
Published Updated Sources: cvelistV5, GitHub_M
Triage
Is it exploited, how likely is exploitation, what does it touch, and how severe do the scoring sources call it.
Exploitation
Unreported
no source claims exploitation
EPSS
2%
chance of exploitation in 30 days
CVSS base
8.2
HIGH
Affected scope
The catalog records vendors and products as separate lists, not pairs, so which product belongs to which vendor is not something this page can say.
Vendors (1)
Products (1)
Every base score collected
Sources score independently and disagree; each row says who scored it and under which version.
| Score | Version | Severity | Expl. | Impact | Source |
|---|---|---|---|---|---|
| 8.2 | CVSS 3.1 | HIGH | — | — | cvelistV5 |
Weakness & attack patterns
- CWE-22
- CWE-59
Attack patterns reported against this CVE. The ATT&CK techniques below are inferred from its weakness class.
- T1547.009Boot or Logon Autostart Execution: Shortcut Modification
- T1574.005Hijack Execution Flow: Executable Installer File Permissions Weakness
- T1574.010Hijack Execution Flow: Services File Permissions Weakness
Detection
Read off the CVSS vector and the weakness class. Starting points, not rules we have tested.
- Search application, proxy, and WAF logs for requests touching /overwrite.
References
6 on the record
- www.npmjs.com/package/tar
reference
- github.com/npm/node-tar/security/advisories/GHSA-qq89-hq3f-393p
reference
- www.oracle.com/security-alerts/cpuoct2021.html
reference
- www.debian.org/security/2021/dsa-5008
vendor-advisory
- cert-portal.siemens.com/productcert/pdf/ssa-389290.pdf
reference
- lists.debian.org/debian-lts-announce/2022/12/msg00023.html
mailing-list
Elsewhere on this site
Not in any source we poll
Listed rather than left blank: an empty field and an unmeasured one look identical on screen, and only one is a reason to look elsewhere.
- No confirmed IOCs, IP addresses, domains, file hashes, or malware artifacts supplied.
- No organization-specific asset inventory, compensating-control status, or patch deployment evidence supplied.
- No exploit packet captures, log samples, or incident case IDs supplied.