Absolute Path Traversal in tar - CVE-2021-32803

 

Absolute Path Traversal in tar - CVE-2021-32803

Published: November 17, 2021


Vulnerability identifier: #VU58206
CSH Severity: Medium
CVSS v4: 8.7 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N]
CVE-ID: CVE-2021-32803
CWE-ID: CWE-36
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to overwrite arbitrary files on the system.

The vulnerability exists due to a logic issue 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.


Affected software

tar
Planning Analytics Local
App Connect Enterprise Certified Container
QRadar User Behavior Analytics
QRadar Pulse App
QRadar Suite
IBM Watson Machine Learning Accelerator
QRadar Deployment Intelligence App
SUSE CaaS Platform
SUSE Manager Proxy
SUSE Manager Server
SUSE Manager Retail Branch Server
SUSE Enterprise Storage
Anolis OS
Red Hat Enterprise Linux for ARM 64
Red Hat Enterprise Linux for Power, little endian
Red Hat Enterprise Linux for x86_64
Red Hat Enterprise Linux for IBM z Systems
Red Hat Enterprise Linux for Power, little endian - Extended Update Support
Red Hat Enterprise Linux for x86_64 - Extended Update Support
Red Hat Enterprise Linux for IBM z Systems - Extended Update Support
Red Hat Enterprise Linux for ARM 64 - Extended Update Support
Red Hat Enterprise Linux Server - AUS
Red Hat Enterprise Linux Server - TUS
SUSE Linux Enterprise High Performance Computing
SUSE Linux Enterprise Module for Web Scripting
SUSE Linux Enterprise Server
SUSE Linux Enterprise Server for SAP Applications
SUSE Linux Enterprise Server for SAP
Ubuntu
IBM Edge Application Manager
node-tar (Ubuntu package)
nodejs-nodemon
nodejs-common
rh-nodejs14-nodejs-nodemon (Red Hat package)
rh-nodejs12-nodejs-nodemon (Red Hat package)
npm
nodejs8-docs
npm8
nodejs8
nodejs8-debuginfo
nodejs8-debugsource
nodejs8-devel
nodejs10
nodejs10-docs
npm10
nodejs10-devel
nodejs10-debugsource
nodejs10-debuginfo
nodejs-full-i18n
nodejs
nodejs-docs
nodejs-devel
rh-nodejs12-nodejs (Red Hat package)
nodejs12-debuginfo
nodejs12
nodejs12-docs
npm12
nodejs12-devel
nodejs12-debugsource
rh-nodejs14-nodejs (Red Hat package)
nodejs14-docs
nodejs14
nodejs14-debuginfo
nodejs14-debugsource
nodejs14-devel
npm14
nodejs-packaging
SINEC INS
IBM Cloud Pak System
IBM QRadar Data Synchronization App
OpenShift Data Foundation (formerly OpenShift Container Storage)

How to mitigate CVE-2021-32803

Install updates from vendor's website.

tar - addressed in versions 3.2.3, 4.4.15, 5.0.7, 6.1.2
App Connect Enterprise Certified Container - update to 2.1
QRadar Pulse App - update to 2.2.9
QRadar Suite - update to 1.10.17.0
node-tar (Ubuntu package) - update to 4.4.10+ds1-2ubuntu1+esm1
nodejs-nodemon - addressed in versions 1.18.3-1, 2.0.3-1
nodejs-common - update to 2.0-3.4.1
rh-nodejs14-nodejs-nodemon (Red Hat package) - update to 2.0.3-5.el7
rh-nodejs12-nodejs-nodemon (Red Hat package) - update to 2.0.3-5.el7
npm - addressed in versions 6.14.14-1.12.22.5.1, 6.14.14-1.14.17.5.1
nodejs8-docs - addressed in versions 8.17.0-3.54.2, 8.17.0-10.19.2
npm8 - addressed in versions 8.17.0-3.54.2, 8.17.0-10.19.2
nodejs8 - addressed in versions 8.17.0-3.54.2, 8.17.0-10.19.2
nodejs8-debuginfo - addressed in versions 8.17.0-3.54.2, 8.17.0-10.19.2
nodejs8-debugsource - addressed in versions 8.17.0-3.54.2, 8.17.0-10.19.2
nodejs8-devel - addressed in versions 8.17.0-3.54.2, 8.17.0-10.19.2
nodejs10 - update to 10.24.1-1.46.1
nodejs10-docs - update to 10.24.1-1.46.1
npm10 - update to 10.24.1-1.46.1
nodejs10-devel - update to 10.24.1-1.46.1
nodejs10-debugsource - update to 10.24.1-1.46.1
nodejs10-debuginfo - update to 10.24.1-1.46.1
nodejs-full-i18n - addressed in versions 12.22.5-1, 14.17.5-1
nodejs - addressed in versions 12.22.5-1, 14.17.5-1
nodejs-docs - addressed in versions 12.22.5-1, 14.17.5-1
nodejs-devel - addressed in versions 12.22.5-1, 14.17.5-1
rh-nodejs12-nodejs (Red Hat package) - update to 12.22.5-1.el7
nodejs12-debuginfo - addressed in versions 12.22.10-1.42.2, 12.22.10-4.29.3
nodejs12 - addressed in versions 12.22.10-1.42.2, 12.22.10-4.29.3
nodejs12-docs - addressed in versions 12.22.10-1.42.2, 12.22.10-4.29.3
npm12 - addressed in versions 12.22.10-1.42.2, 12.22.10-4.29.3
nodejs12-devel - addressed in versions 12.22.10-1.42.2, 12.22.10-4.29.3
nodejs12-debugsource - addressed in versions 12.22.10-1.42.2, 12.22.10-4.29.3
rh-nodejs14-nodejs (Red Hat package) - update to 14.17.5-1.el7
nodejs14-docs - addressed in versions 14.19.0-6.24.1, 14.19.0-15.27.1
nodejs14 - addressed in versions 14.19.0-6.24.1, 14.19.0-15.27.1
nodejs14-debuginfo - addressed in versions 14.19.0-6.24.1, 14.19.0-15.27.1
nodejs14-debugsource - addressed in versions 14.19.0-6.24.1, 14.19.0-15.27.1
nodejs14-devel - addressed in versions 14.19.0-6.24.1, 14.19.0-15.27.1
npm14 - addressed in versions 14.19.0-6.24.1, 14.19.0-15.27.1
nodejs-packaging - addressed in versions 17-3, 23-3
SINEC INS - update to 1.0.1.1
IBM Cloud Pak System - update to 2.3.3.5
IBM QRadar Data Synchronization App - update to 3.0.1
QRadar Deployment Intelligence App - update to 3.0.5
QRadar User Behavior Analytics - update to 4.1.11
OpenShift Data Foundation (formerly OpenShift Container Storage) - update to 4.9.0

External References

Related Security Bulletins