ID CVE-2021-32803
Summary The npm package "tar" (aka node-tar) before versions 6.1.2, 5.0.7, 4.4.15, and 3.2.3 has an arbitrary File Creation/Overwrite vulnerability via insufficient symlink protection. `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 the same name as the directory. This order of operations resulted in the directory being created and added to the `node-tar` directory cache. When a directory is present in the directory cache, subsequent calls to mkdir for that directory are skipped. However, this is also where `node-tar` checks for symlinks occur. By first creating a directory, and then replacing that directory with a symlink, it was thus possible to bypass `node-tar` symlink checks on directories, essentially allowing an untrusted tar file to symlink into an arbitrary location and subsequently extracting arbitrary files into that location, thus allowing arbitrary file creation and overwrite. This issue was addressed in releases 3.2.3, 4.4.15, 5.0.7 and 6.1.2.
References
Vulnerable Configurations
  • cpe:2.3:a:tar_project:tar:5.0.0:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:5.0.0:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:5.0.1:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:5.0.1:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:5.0.2:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:5.0.2:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:5.0.3:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:5.0.3:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:5.0.4:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:5.0.4:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:5.0.5:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:5.0.5:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:5.0.6:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:5.0.6:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:0.1.0:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:0.1.0:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:0.1.2:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:0.1.2:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:0.1.3:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:0.1.3:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:0.1.5:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:0.1.5:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:0.1.6:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:0.1.6:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:0.1.7:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:0.1.7:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:0.1.8:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:0.1.8:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:0.1.9:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:0.1.9:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:0.1.10:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:0.1.10:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:0.1.11:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:0.1.11:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:0.1.12:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:0.1.12:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:0.1.13:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:0.1.13:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:0.1.14:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:0.1.14:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:0.1.15:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:0.1.15:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:0.1.16:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:0.1.16:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:0.1.17:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:0.1.17:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:0.1.18:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:0.1.18:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:0.1.19:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:0.1.19:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:0.1.20:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:0.1.20:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:1.0.0:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:1.0.0:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:1.0.1:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:1.0.1:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:1.0.2:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:1.0.2:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:1.0.3:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:1.0.3:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:2.0.0:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:2.0.0:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:2.0.1:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:2.0.1:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:2.1.0:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:2.1.0:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:2.1.1:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:2.1.1:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:2.2.1:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:2.2.1:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:2.2.2:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:2.2.2:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:3.0.0:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:3.0.0:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:3.0.1:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:3.0.1:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:3.1.0:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:3.1.0:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:3.1.1:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:3.1.1:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:3.1.2:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:3.1.2:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:3.1.3:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:3.1.3:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:3.1.4:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:3.1.4:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:3.1.5:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:3.1.5:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:3.1.6:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:3.1.6:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:3.1.7:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:3.1.7:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:3.1.8:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:3.1.8:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:3.1.9:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:3.1.9:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:3.1.10:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:3.1.10:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:3.1.11:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:3.1.11:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:3.1.12:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:3.1.12:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:3.1.13:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:3.1.13:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:3.1.14:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:3.1.14:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:3.1.15:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:3.1.15:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:3.2.0:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:3.2.0:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:3.2.1:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:3.2.1:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:3.2.2:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:3.2.2:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:4.0.0:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:4.0.0:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:4.0.1:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:4.0.1:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:4.0.2:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:4.0.2:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:4.1.0:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:4.1.0:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:4.1.1:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:4.1.1:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:4.1.2:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:4.1.2:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:4.2.0:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:4.2.0:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:4.3.0:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:4.3.0:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:4.3.1:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:4.3.1:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:4.3.2:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:4.3.2:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:4.3.3:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:4.3.3:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:4.4.0:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:4.4.0:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:4.4.1:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:4.4.1:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:4.4.2:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:4.4.2:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:4.4.3:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:4.4.3:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:4.4.4:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:4.4.4:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:4.4.5:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:4.4.5:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:4.4.6:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:4.4.6:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:4.4.7:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:4.4.7:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:4.4.8:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:4.4.8:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:4.4.9:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:4.4.9:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:4.4.10:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:4.4.10:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:4.4.11:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:4.4.11:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:4.4.12:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:4.4.12:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:4.4.13:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:4.4.13:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:4.4.14:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:4.4.14:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:6.0.0:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:6.0.0:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:6.0.1:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:6.0.1:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:6.0.2:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:6.0.2:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:6.0.3:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:6.0.3:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:6.0.4:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:6.0.4:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:6.0.5:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:6.0.5:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:6.1.0:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:6.1.0:*:*:*:*:node.js:*:*
  • cpe:2.3:a:tar_project:tar:6.1.1:*:*:*:*:node.js:*:*
    cpe:2.3:a:tar_project:tar:6.1.1:*:*:*:*:node.js:*:*
  • cpe:2.3:a:oracle:graalvm:20.3.3:*:*:*:enterprise:*:*:*
    cpe:2.3:a:oracle:graalvm:20.3.3:*:*:*:enterprise:*:*:*
  • cpe:2.3:a:oracle:graalvm:21.2.0:*:*:*:enterprise:*:*:*
    cpe:2.3:a:oracle:graalvm:21.2.0:*:*:*:enterprise:*:*:*
  • cpe:2.3:a:siemens:sinec_infrastructure_network_services:-:*:*:*:*:*:*:*
    cpe:2.3:a:siemens:sinec_infrastructure_network_services:-:*:*:*:*:*:*:*
CVSS
Base: 5.8 (as of 02-07-2022 - 18:28)
Impact:
Exploitability:
CWE CWE-59
CAPEC
  • Manipulating Web Input to File System Calls
    An attacker manipulates inputs to the target software which the target software passes to file system calls in the OS. The goal is to gain access to, and perhaps modify, areas of the file system that the target software did not intend to be accessible.
  • Leverage Executable Code in Non-Executable Files
    An attack of this type exploits a system's trust in configuration and resource files. When the executable loads the resource (such as an image file or configuration file) the attacker has modified the file to either execute malicious code directly or manipulate the target process (e.g. application server) to execute based on the malicious configuration parameters. Since systems are increasingly interrelated mashing up resources from local and remote sources the possibility of this attack occurring is high.
  • Using Malicious Files
    An attack of this type exploits a system's configuration that allows an attacker to either directly access an executable file, for example through shell access; or in a possible worst case allows an attacker to upload a file and then execute it. Web servers, ftp servers, and message oriented middleware systems which have many integration points are particularly vulnerable, because both the programmers and the administrators must be in synch regarding the interfaces and the correct privileges for each interface.
  • Symlink Attack
    An attacker positions a symbolic link in such a manner that the targeted user or application accesses the link's endpoint, assuming that it is accessing a file with the link's name. The endpoint file may be either output or input. If the file is output, the result is that the endpoint is modified, instead of a file at the intended location. Modifications to the endpoint file may include appending, overwriting, corrupting, changing permissions, or other modifications. In some variants of this attack the attacker may be able to control the change to a file while in other cases they cannot. The former is especially damaging since the attacker may be able to grant themselves increased privileges or insert false information, but the latter can also be damaging as it can expose sensitive information or corrupt or destroy vital system or application files. Alternatively, the endpoint file may serve as input to the targeted application. This can be used to feed malformed input into the target or to cause the target to process different information, possibly allowing the attacker to control the actions of the target or to cause the target to expose information to the attacker. Moreover, the actions taken on the endpoint file are undertaken with the permissions of the targeted user or application, which may exceed the permissions that the attacker would normally have.
Access
VectorComplexityAuthentication
NETWORK MEDIUM NONE
Impact
ConfidentialityIntegrityAvailability
NONE PARTIAL PARTIAL
cvss-vector via4 AV:N/AC:M/Au:N/C:N/I:P/A:P
Last major update 02-07-2022 - 18:28
Published 03-08-2021 - 19:15
Last modified 02-07-2022 - 18:28
Back to Top