cve.bz

CVE-2021-32803 Link Following

8.1 highEPSS 7.8%Fix available

High (8.1). EPSS 7.8% estimated probability of exploitation activity in the next 30 days. Fixed in tar 3.2.3, 4.4.15, 5.0.7.

On this page
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.

Severity

CVSS 3.1

8.1 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H
EPSS
7.8% (unchanged from 7.8% a week ago; 7.8% 30 days ago) estimated probability of exploitation activity in the next 30 days; 95th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWEs
CWE-59 Improper Link Resolution Before File Access (Link Following)
CWE-22 Improper Limitation of a Pathname to a Restricted Directory (Path traversal)
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-32803 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-32803?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-32803?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-32803 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
tar_project:tarbefore 3.2.3
tar_project:tarfrom 4.0.0 before 4.4.15
tar_project:tarfrom 5.0.0 before 5.0.7
tar_project:tarfrom 6.0.0 before 6.1.2
oracle:graalvm20.3.3
oracle:graalvm21.2.0
siemens:sinec_infrastructure_network_servicesbefore 1.0.1.1

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-r628-mhmh-qjhwnpmtar>=3.0.0 <3.2.33.2.3
GHSA-r628-mhmh-qjhwnpmtar>=4.0.0 <4.4.154.4.15
GHSA-r628-mhmh-qjhwnpmtar>=5.0.0 <5.0.75.0.7
GHSA-r628-mhmh-qjhwnpmtar>=6.0.0 <6.1.26.1.2

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14node-tar6.1.7+~cs11.3.10-1DEBIAN-CVE-2021-32803
UbuntuPro:14.04:LTSnode-tarno fix listedUBUNTU-CVE-2021-32803
UbuntuPro:20.04:LTSnode-tar4.4.10+ds1-2ubuntu1+esm1UBUNTU-CVE-2021-32803 USN-5283-1
Red Hatenterprise_linux:8::appstreamnodejs, nodejs-docs, nodejs-devel and 3 more1:12.22.5-1.module+el8.4.0+12242+af52a4c7RHSA-2021:3623
Red Hatenterprise_linux:8::appstreamnodejs, nodejs-docs, nodejs-devel and 3 more1:14.17.5-1.module+el8.4.0+12247+e2879e58RHSA-2021:3666
Red Hatenterprise_linux:8::appstreamnodejs-nodemon0:2.0.3-1.module+el8.3.0+6519+9f98ed83RHSA-2021:3666
Red Hatenterprise_linux:8::appstreamnodejs-nodemon0:2.0.3-1.module+el8.4.0+11732+c668cc9fRHSA-2021:3623
Red Hatenterprise_linux:8::appstreamnodejs-packaging0:17-3.module+el8.1.0+3369+37ae6a45RHSA-2021:3623
Red Hatenterprise_linux:8::appstreamnodejs-packaging0:23-3.module+el8.3.0+6519+9f98ed83RHSA-2021:3666
Red Hatenterprise_linux:8::appstreamnpm1:6.14.14-1.12.22.5.1.module+el8.4.0+12242+af52a4c7RHSA-2021:3623
Red Hatenterprise_linux:8::appstreamnpm1:6.14.14-1.14.17.5.1.module+el8.4.0+12247+e2879e58RHSA-2021:3666
Red Hatrhel_eus:8.1::appstreamnodejs, nodejs-docs, nodejs-devel and 3 more1:12.22.5-1.module+el8.1.0+12238+63fe3aecRHSA-2021:3639
Red Hatrhel_eus:8.1::appstreamnodejs-nodemon0:1.18.3-1.module+el8.1.0+3369+37ae6a45RHSA-2021:3639
Red Hatrhel_eus:8.1::appstreamnodejs-packaging0:17-3.module+el8.1.0+3369+37ae6a45RHSA-2021:3639
Red Hatrhel_eus:8.1::appstreamnpm1:6.14.14-1.12.22.5.1.module+el8.1.0+12238+63fe3aecRHSA-2021:3639
10 more for Red Hat in the JSON and on Red Hat's page.
SUSEEnterprise Storage 6, Enterprise Storage 7, Linux Enterprise High Performance Computing 15 SP1-ESPOS and 16 morenodejs-common2.0-3.4.1SUSE-SU-2022:0704-1
SUSEEnterprise Storage 6, Enterprise Storage 7, Linux Enterprise High Performance Computing 15 SP1-ESPOS and 16 morenodejs1010.24.1-150000.1.44.1SUSE-SU-2022:1717-1
SUSEEnterprise Storage 6, Linux Enterprise High Performance Computing 15 SP1-ESPOS, Linux Enterprise High Performance Computing 15 SP1-LTSS and 7 morenodejs88.17.0-3.54.2SUSE-SU-2022:0563-1
SUSEEnterprise Storage 7, Linux Enterprise High Performance Computing 15 SP2-ESPOS, Linux Enterprise High Performance Computing 15 SP2-LTSS and 7 morenodejs1212.22.10-4.29.3SUSE-SU-2022:0657-1
SUSEEnterprise Storage 7, Linux Enterprise High Performance Computing 15 SP2-ESPOS, Linux Enterprise High Performance Computing 15 SP2-LTSS and 7 morenodejs1414.19.0-15.27.1SUSE-SU-2022:0715-1
SUSEEnterprise Storage 7, Linux Enterprise High Performance Computing 15 SP2-ESPOS, Linux Enterprise High Performance Computing 15 SP2-LTSS and 6 morenodejs88.17.0-10.19.2SUSE-SU-2022:0704-1
SUSELinux Enterprise Module for Web and Scripting 12nodejs1010.24.1-1.46.1SUSE-SU-2022:0570-1
SUSELinux Enterprise Module for Web and Scripting 12nodejs1212.22.10-1.42.2SUSE-SU-2022:0531-1
SUSELinux Enterprise Module for Web and Scripting 12nodejs1414.19.0-6.24.1SUSE-SU-2022:0569-1
openSUSELeap 15.3nodejs1212.22.10-4.29.3openSUSE-SU-2022:0657-1
openSUSELeap 15.3nodejs1414.19.0-15.27.1openSUSE-SU-2022:0715-1
openSUSELeap 15.3nodejs88.17.0-10.19.2openSUSE-SU-2022:0704-1
openSUSELeap 15.3, Leap 15.4nodejs1010.24.1-150000.1.44.1SUSE-SU-2022:1717-1
AlmaLinux8nodejs, nodejs-devel, nodejs-full-i18n1:12.22.5-1.module_el8.5.0+85+79a7b441ALSA-2021:3623
AlmaLinux8nodejs, nodejs-docs, nodejs-devel and 1 more1:12.22.5-1.module_el8.4.0+2529+af52a4c7ALSA-2021:3623
AlmaLinux8nodejs-nodemon2.0.3-1.module_el8.4.0+2521+c668cc9fALSA-2021:3623 ALSA-2021:3666
AlmaLinux8nodejs-packaging17-3.module_el8.3.0+2023+d2377ea3ALSA-2021:3623
AlmaLinux8nodejs-packaging17-3.module_el8.4.0+2224+b07ac28eALSA-2021:3623
AlmaLinux8nodejs-packaging17-3.module_el8.4.0+2521+c668cc9fALSA-2021:3623
AlmaLinux8nodejs-packaging23-3.module_el8.4.0+2522+3bd42762ALSA-2021:3666
AlmaLinux8nodejs-packaging23-3.module_el8.5.0+254+b4526b16ALSA-2021:3666
AlmaLinux8npm1:6.14.14-1.12.22.5.1.module_el8.4.0+2529+af52a4c7ALSA-2021:3623
AlmaLinux8npm1:6.14.14-1.12.22.5.1.module_el8.5.0+85+79a7b441ALSA-2021:3623
Rocky Linux8nodejs1:12.22.5-1.module+el8.4.0+647+e905fa21RLSA-2021:3623
Rocky Linux8nodejs1:14.17.5-1.module+el8.4.0+654+17ff1d38RLSA-2021:3666
Rocky Linux8nodejs-nodemon0:2.0.3-1.module+el8.3.0+100+234774f7RLSA-2021:3623 RLSA-2021:3666
Rocky Linux8nodejs-nodemon0:2.0.3-1.module+el8.4.0+638+5344c6f7RLSA-2021:3623 RLSA-2021:3666
Rocky Linux8nodejs-nodemon0:2.0.3-1.module+el8.6.0+982+9fdca2d4RLSA-2021:3623 RLSA-2021:3666
Rocky Linux8nodejs-packaging0:17-3.module+el8.3.0+101+f84c7154RLSA-2021:3623
Rocky Linux8nodejs-packaging0:23-3.module+el8.3.0+100+234774f7RLSA-2021:3666
Rocky Linux8nodejs-packaging0:23-3.module+el8.5.0+733+de4fee6cRLSA-2021:3666
Rocky Linux8nodejs-packaging0:23-3.module+el8.7.0+1071+4bdda2a8RLSA-2021:3666

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

Red Hat Quay 3.3 uses an affected version of nodejs-tar. However Quay 3.3 is in extended life phase and a fix will not be delivered[1]. More recent versions of Red Hat Quay do not include nodejs-tar and are not affected.

1. https://access.redhat.com/support/policy/updates/rhquay

Red Hat Enterprise Linux version 8 and Red Hat Software Collection both embed node-tar in the npm command. However, npm explicitly prevents the extraction of symlink via a filter. npm might still be affected via node-gyp, if the attacker is able to control the target URL.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 8nodejs:12-8040020210817133458.522a0ee4Fixed 2021-09-21RHSA-2021:3623
Red Hat Enterprise Linux 8nodejs:14-8040020210817165654.522a0ee4Fixed 2021-09-27RHSA-2021:3666
Red Hat Enterprise Linux 8.1 Extended Update Supportnodejs:12-8010020210817113128.c27ad7f8Fixed 2021-09-22RHSA-2021:3639
Red Hat Enterprise Linux 8.2 Extended Update Supportnodejs:12-8020020210817125332.4cda2c84Fixed 2021-09-22RHSA-2021:3638
Red Hat OpenShift Data Foundation 4.9.0 on RHEL-8odf4/cephcsi-rhel8:4.9-164.57484e3.release_4.9Fixed 2021-12-13RHSA-2021:5086
Red Hat OpenShift Data Foundation 4.9.0 on RHEL-8odf4/ocs-must-gather-rhel8:4.9-257.4181add.release_4.9Fixed 2021-12-13RHSA-2021:5086
Red Hat OpenShift Data Foundation 4.9.0 on RHEL-8odf4/ocs-operator-bundle:4.9.0-5Fixed 2021-12-13RHSA-2021:5086
Red Hat OpenShift Data Foundation 4.9.0 on RHEL-8odf4/ocs-rhel8-operator:4.9-257.4181add.release_4.9Fixed 2021-12-13RHSA-2021:5086
Red Hat OpenShift Data Foundation 4.9.0 on RHEL-8odf4/odf-console-rhel8:4.9-39.0f2fa23.release_4.9Fixed 2021-12-13RHSA-2021:5086
Red Hat OpenShift Data Foundation 4.9.0 on RHEL-8odf4/odf-multicluster-operator-bundle:4.9.0-5Fixed 2021-12-13RHSA-2021:5086
OpenShift Service Mesh 2.0servicemesh-grafanaAffected
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/application-ui-rhel8Not affected
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/console-header-rhel8Fix deferred
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/console-rhel8Fix deferred
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/console-ui-rhel8Fix deferred
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/grc-ui-rhel8Affected
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/kui-web-terminal-rhel8Fix deferred
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/mcm-topology-rhel8Fix deferred
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/search-ui-rhel8Affected
Red Hat Enterprise Linux 8nodejs:16/nodejsNot affected
22 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-32803.

ICS advisories (CISA)

AdvisoryTitlePublishedSectorsAffectedFixed
ICSA-22-069-09Siemens SINEC INS2022-03-08MultipleSINEC INSnone listed

From CISA's ICS advisories (CSAF), provided under CISA's notification. Only the facts are shown; each advisory is on CISA's page. Credits.

Attack patterns (CAPEC)

  • CAPEC-17 Using Malicious Files Likelihood: High · Severity: Very High
  • CAPEC-35 Leverage Executable Code in Non-Executable Files Likelihood: High · Severity: Very High
  • CAPEC-76 Manipulating Web Input to File System Calls Likelihood: High · Severity: Very High
  • CAPEC-132 Symlink Attack Likelihood: Low · Severity: High
  • CAPEC-64 Using Slashes and URL Encoding Combined to Bypass Validation Logic Likelihood: High · Severity: High
  • CAPEC-78 Using Escaped Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-79 Using Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-126 Path Traversal Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON