CVE-2021-37712 Arbitrary File Creation/Overwrite via insufficient symlink protection due to directory cache poisoning using symbolic links
- Published
- Updated
- Exploit status
- No public exploit known
- Technology
- UbuntuDebianRed Hat
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 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 form of the path, followed by a symbolic link with a different string that resolves to the same file system entity, followed by a file using the first form. By first creating a directory, and then replacing that directory with a symlink that had a different apparent name that resolved to the same entry in the filesystem, 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. 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. If this is not possible, a workaround is available in the referenced GHSA-qq89-hq3f-393p.
Upgrade path
93 packages: 23 fixed, 67 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| redhat/nodejs:12-8010020220518102644.c27ad7f8(Red Hat rhel_e4s 8.1) | All versions | No fix listed | No fix yet |
| redhat/nodejs:12-8020020220523154454.4cda2c84(Red Hat rhel_eus 8.2) | All versions | No fix listed | No fix yet |
| redhat/nodejs:12-8040020220523155137.522a0ee4(Red Hat rhel_eus 8.4) | All versions | No fix listed | No fix yet |
| redhat/nodejs:12-8060020220523160029.ad008a3a(Red Hat enterprise_linux 8) | All versions | No fix listed | No fix yet |
| redhat/nodejs:14-8040020211213111158.522a0ee4(Red Hat rhel_eus 8.4) | All versions | No fix listed | No fix yet |
| redhat/nodejs:14-8050020211213115342.c5368500(Red Hat enterprise_linux 8) | All versions | No fix listed | No fix yet |
| redhat/ocs4/mcg-core-rhel8(Red Hat openshift_container_storage 4) | All versions | No fix listed | No fix yet |
| redhat/odf/odf-multicluster-rhel8-operator:4.9-30.007b3d8.release_4.9(Red Hat openshift_data_foundation 4.9 el8) | All versions | No fix listed | No fix yet |
| redhat/odf4/cephcsi-rhel8:4.9-164.57484e3.release_4.9(Red Hat openshift_data_foundation 4.9 el8) | All versions | No fix listed | No fix yet |
| redhat/odf4/ocs-must-gather-rhel8:4.9-257.4181add.release_4.9(Red Hat openshift_data_foundation 4.9 el8) | All versions | No fix listed | No fix yet |
| redhat/odf4/ocs-operator-bundle:4.9.0-5(Red Hat openshift_data_foundation 4.9 el8) | All versions | No fix listed | No fix yet |
| redhat/odf4/ocs-rhel8-operator:4.9-257.4181add.release_4.9(Red Hat openshift_data_foundation 4.9 el8) | All versions | No fix listed | No fix yet |
| redhat/odf4/odf-console-rhel8:4.9-39.0f2fa23.release_4.9(Red Hat openshift_data_foundation 4.9 el8) | All versions | No fix listed | No fix yet |
| redhat/odf4/odf-multicluster-operator-bundle:4.9.0-5(Red Hat openshift_data_foundation 4.9 el8) | All versions | No fix listed | No fix yet |
| redhat/odf4/odf-multicluster-rhel8-operator:4.9-30.007b3d8.release_4.9(Red Hat openshift_data_foundation 4.9 el8) | All versions | No fix listed | No fix yet |
| redhat/odf4/odf-operator-bundle:4.9.0-5(Red Hat openshift_data_foundation 4.9 el8) | All versions | No fix listed | No fix yet |
| redhat/odf4/odf-rhel8-operator:4.9-59.c8bbc1f.release_4.9(Red Hat openshift_data_foundation 4.9 el8) | All versions | No fix listed | No fix yet |
| redhat/odf4/odr-cluster-operator-bundle:4.9.0-5(Red Hat openshift_data_foundation 4.9 el8) | All versions | No fix listed | No fix yet |
| redhat/odf4/odr-hub-operator-bundle:4.9.0-5(Red Hat openshift_data_foundation 4.9 el8) | All versions | No fix listed | No fix yet |
| redhat/odf4/odr-rhel8-operator:4.9-27.3d037cc.release_4.9(Red Hat openshift_data_foundation 4.9 el8) | All versions | No fix listed | No fix yet |
| redhat/odf4/rook-ceph-rhel8-operator:4.9-219.c3f67c6.release_4.9(Red Hat openshift_data_foundation 4.9 el8) | All versions | No fix listed | No fix yet |
| redhat/odf4/volume-replication-rhel8-operator:4.9-28.82f68db.release_4.9(Red Hat openshift_data_foundation 4.9 el8) | All versions | No fix listed | No fix yet |
| redhat/odf5/cephcsi-rhel9-operator:1795073546(Red Hat openshift_data_foundation 5.0 el9) | All versions | No fix listed | No fix yet |
| redhat/odf5/cephcsi-rhel9:1795073870(Red Hat openshift_data_foundation 5.0 el9) | All versions | No fix listed | No fix yet |
| redhat/odf5/devicefinder-rhel9:1795073967(Red Hat openshift_data_foundation 5.0 el9) | All versions | No fix listed | No fix yet |
| redhat/odf5/mcg-core-rhel9:1795074158(Red Hat openshift_data_foundation 5.0 el9) | All versions | No fix listed | No fix yet |
| redhat/odf5/mcg-rhel9-operator:1795074167(Red Hat openshift_data_foundation 5.0 el9) | All versions | No fix listed | No fix yet |
| redhat/odf5/ocs-client-console-rhel9:1795074655(Red Hat openshift_data_foundation 5.0 el9) | All versions | No fix listed | No fix yet |
| redhat/odf5/ocs-client-rhel9-operator:1795074170(Red Hat openshift_data_foundation 5.0 el9) | All versions | No fix listed | No fix yet |
| redhat/odf5/ocs-metrics-exporter-rhel9:1795074383(Red Hat openshift_data_foundation 5.0 el9) | All versions | No fix listed | No fix yet |
… and 63 more packages.
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| npm tar(npm) | >= 5.0.0, < 5.0.10 | 5.0.10 |
| npm tar(npm) | >= 6.0.0, < 6.1.9 | 6.1.9 |
| npm tar(npm) | >= 3.0.0, < 4.4.18 | 4.4.18 |
| debian/node-tar(Debian:12) | < 6.1.11+~cs11.3.10-1 | 6.1.11+~cs11.3.10-1 |
| debian/node-tar(Debian:13) | < 6.1.11+~cs11.3.10-1 | 6.1.11+~cs11.3.10-1 |
| debian/node-tar(Debian:14) | < 6.1.11+~cs11.3.10-1 | 6.1.11+~cs11.3.10-1 |
| ubuntu/node-tar(Ubuntu:22.04) | All versions | No fix listed |
| npmjs tar | <= 4.4.17 | No fix listed |
| npmjs tar | >= 5.0.0, <= 5.0.9 | No fix listed |
| npmjs tar | >= 6.0.0, <= 6.1.8 | No fix listed |
| debian linux | = 10.0 | No fix listed |
| debian linux | = 11.0 | No fix listed |
| oracle graalvm | = 20.3.3 | No fix listed |
| oracle graalvm | = 21.2.0 | No fix listed |
| Siemens sinec infrastructure network services | < 1.0.1.1 | 1.0.1.1 |
| alpine/nodejs(Alpine:v3.11) | < 12.22.6-r0 | 12.22.6-r0 |
| alpine/nodejs(Alpine:v3.12) | < 12.22.6-r0 | 12.22.6-r0 |
| alpine/nodejs(Alpine:v3.13) | < 14.17.6-r0 | 14.17.6-r0 |
| alpine/nodejs(Alpine:v3.14) | < 14.17.6-r0 | 14.17.6-r0 |
| alpine/nodejs(Alpine:v3.15) | < 14.17.6-r0 | 14.17.6-r0 |
| alpine/nodejs(Alpine:v3.16) | < 14.17.6-r0 | 14.17.6-r0 |
| alpine/nodejs(Alpine:v3.17) | < 14.17.6-r0 | 14.17.6-r0 |
| alpine/nodejs(Alpine:v3.18) | < 14.17.6-r0 | 14.17.6-r0 |
| alpine/nodejs(Alpine:v3.19) | < 14.17.6-r0 | 14.17.6-r0 |
| alpine/nodejs(Alpine:v3.20) | < 14.17.6-r0 | 14.17.6-r0 |
Show 96 more
| Product | Affected versions | Fixed in |
|---|---|---|
| alpine/nodejs(Alpine:v3.21) | < 14.17.6-r0 | 14.17.6-r0 |
| alpine/nodejs(Alpine:v3.22) | < 14.17.6-r0 | 14.17.6-r0 |
| alpine/nodejs(Alpine:v3.23) | < 14.17.6-r0 | 14.17.6-r0 |
| alpine/nodejs(Alpine:v3.24) | < 14.17.6-r0 | 14.17.6-r0 |
| ubuntu/node-tar(Ubuntu:24.04) | All versions | No fix listed |
| ubuntu/node-tar(Ubuntu:26.04) | All versions | No fix listed |
| npm node-tar | = < 4.4.18 | No fix listed |
| npm node-tar | = >= 5.0.0, < 5.0.10 | No fix listed |
| npm node-tar | = >= 6.0.0, < 6.1.9 | No fix listed |
| ubuntu/node-tar(Ubuntu:26.10) | All versions | No fix listed |
| ubuntu/node-tar(Ubuntu:Pro:14.04) | All versions | No fix listed |
| ubuntu/node-tar(Ubuntu:Pro:14.04) | = 0.1.18-1 | No fix listed |
| ubuntu/node-tar(Ubuntu:Pro:14.04) | = 0.1.18-1ubuntu0.1~esm1 | No fix listed |
| ubuntu/node-tar(Ubuntu:Pro:16.04) | All versions | No fix listed |
| ubuntu/node-tar(Ubuntu:Pro:16.04) | = 1.0.3-2 | No fix listed |
| ubuntu/node-tar(Ubuntu:Pro:16.04) | = 1.0.3-2ubuntu0.1~esm1 | No fix listed |
| ubuntu/node-tar(Ubuntu:18.04) | All versions | No fix listed |
| ubuntu/node-tar(Ubuntu:18.04) | = 2.2.1-1 | No fix listed |
| ubuntu/node-tar(Ubuntu:Pro:20.04) | All versions | No fix listed |
| ubuntu/node-tar(Ubuntu:Pro:20.04) | = 4.4.10+ds1-2 | No fix listed |
| ubuntu/node-tar(Ubuntu:Pro:20.04) | = 4.4.10+ds1-2ubuntu1 | No fix listed |
| ubuntu/node-tar(Ubuntu:Pro:20.04) | = 4.4.10+ds1-2ubuntu1+esm1 | No fix listed |
| ubuntu/node-tar(Ubuntu:22.04) | = 6.1.7+~cs11.3.10-1 | No fix listed |
| ubuntu/node-tar(Ubuntu:22.04) | = 6.1.11+~cs11.3.10-1 | No fix listed |
| ubuntu/node-tar(Ubuntu:22.04) | = 6.1.11+ds1+~cs6.0.6-1 | No fix listed |
| ubuntu/node-tar(Ubuntu:24.04) | = 6.1.13+~cs7.0.5-1 | No fix listed |
| ubuntu/node-tar(Ubuntu:24.04) | = 6.1.13+~cs7.0.5-3 | No fix listed |
| ubuntu/node-tar(Ubuntu:25.10) | All versions | No fix listed |
| ubuntu/node-tar(Ubuntu:25.10) | = 6.2.1+~cs7.0.8-1 | No fix listed |
| ubuntu/node-tar(Ubuntu:26.10) | = 6.2.1+ds1+~cs6.1.13-10 | No fix listed |
| ubuntu/node-tar(Ubuntu:26.10) | = 7.5.22+~4.0.1-1 | No fix listed |
| ubuntu/node-tar(Ubuntu:26.04) | = 6.2.1+~cs7.0.8-1 | No fix listed |
| ubuntu/node-tar(Ubuntu:26.04) | = 6.2.1+ds1+~cs6.1.13-6 | No fix listed |
| ubuntu/node-tar(Ubuntu:26.04) | = 6.2.1+ds1+~cs6.1.13-7 | No fix listed |
| ubuntu/node-tar(Ubuntu:26.04) | = 6.2.1+ds1+~cs6.1.13-10 | No fix listed |
| redhat/nodejs:12-8060020220523160029.ad008a3a(Red Hat:enterprise_linux:8) | All versions | No fix listed |
| redhat/nodejs:14-8050020211213115342.c5368500(Red Hat:enterprise_linux:8) | All versions | No fix listed |
| redhat/nodejs:12-8010020220518102644.c27ad7f8(Red Hat:rhel_e4s:8.1) | All versions | No fix listed |
| redhat/nodejs:12-8020020220523154454.4cda2c84(Red Hat:rhel_eus:8.2) | All versions | No fix listed |
| redhat/nodejs:12-8040020220523155137.522a0ee4(Red Hat:rhel_eus:8.4) | All versions | No fix listed |
| redhat/nodejs:14-8040020211213111158.522a0ee4(Red Hat:rhel_eus:8.4) | All versions | No fix listed |
| redhat/odf4/cephcsi-rhel8:4.9-164.57484e3.release_4.9(Red Hat:openshift_data_foundation:4.9::el8) | All versions | No fix listed |
| redhat/odf4/ocs-must-gather-rhel8:4.9-257.4181add.release_4.9(Red Hat:openshift_data_foundation:4.9::el8) | All versions | No fix listed |
| redhat/odf4/ocs-operator-bundle:4.9.0-5(Red Hat:openshift_data_foundation:4.9::el8) | All versions | No fix listed |
| redhat/odf4/ocs-rhel8-operator:4.9-257.4181add.release_4.9(Red Hat:openshift_data_foundation:4.9::el8) | All versions | No fix listed |
| redhat/odf4/odf-console-rhel8:4.9-39.0f2fa23.release_4.9(Red Hat:openshift_data_foundation:4.9::el8) | All versions | No fix listed |
| redhat/odf4/odf-multicluster-operator-bundle:4.9.0-5(Red Hat:openshift_data_foundation:4.9::el8) | All versions | No fix listed |
| redhat/odf4/odf-multicluster-rhel8-operator:4.9-30.007b3d8.release_4.9(Red Hat:openshift_data_foundation:4.9::el8) | All versions | No fix listed |
| redhat/odf4/odf-operator-bundle:4.9.0-5(Red Hat:openshift_data_foundation:4.9::el8) | All versions | No fix listed |
| redhat/odf4/odf-rhel8-operator:4.9-59.c8bbc1f.release_4.9(Red Hat:openshift_data_foundation:4.9::el8) | All versions | No fix listed |
| redhat/odf4/odr-cluster-operator-bundle:4.9.0-5(Red Hat:openshift_data_foundation:4.9::el8) | All versions | No fix listed |
| redhat/odf4/odr-hub-operator-bundle:4.9.0-5(Red Hat:openshift_data_foundation:4.9::el8) | All versions | No fix listed |
| redhat/odf4/odr-rhel8-operator:4.9-27.3d037cc.release_4.9(Red Hat:openshift_data_foundation:4.9::el8) | All versions | No fix listed |
| redhat/odf4/rook-ceph-rhel8-operator:4.9-219.c3f67c6.release_4.9(Red Hat:openshift_data_foundation:4.9::el8) | All versions | No fix listed |
| redhat/odf4/volume-replication-rhel8-operator:4.9-28.82f68db.release_4.9(Red Hat:openshift_data_foundation:4.9::el8) | All versions | No fix listed |
| redhat/odf/odf-multicluster-rhel8-operator:4.9-30.007b3d8.release_4.9(Red Hat:openshift_data_foundation:4.9::el8) | All versions | No fix listed |
| redhat/rh-nodejs14-nodejs(Red Hat:rhel_software_collections:3::el7) | < 14.18.2-1.el7 | 14.18.2-1.el7 |
| redhat/rh-nodejs14-nodejs-nodemon(Red Hat:rhel_software_collections:3::el7) | < 2.0.3-6.el7 | 2.0.3-6.el7 |
| redhat/rh-nodejs12-nodejs(Red Hat:rhel_software_collections:3::el7) | < 12.22.12-2.el7 | 12.22.12-2.el7 |
| redhat/odf5/cephcsi-rhel9:1795073870(Red Hat:openshift_data_foundation:5.0::el9) | All versions | No fix listed |
| redhat/odf5/cephcsi-rhel9-operator:1795073546(Red Hat:openshift_data_foundation:5.0::el9) | All versions | No fix listed |
| redhat/odf5/devicefinder-rhel9:1795073967(Red Hat:openshift_data_foundation:5.0::el9) | All versions | No fix listed |
| redhat/odf5/mcg-core-rhel9:1795074158(Red Hat:openshift_data_foundation:5.0::el9) | All versions | No fix listed |
| redhat/odf5/mcg-rhel9-operator:1795074167(Red Hat:openshift_data_foundation:5.0::el9) | All versions | No fix listed |
| redhat/odf5/ocs-client-console-rhel9:1795074655(Red Hat:openshift_data_foundation:5.0::el9) | All versions | No fix listed |
| redhat/odf5/ocs-client-rhel9-operator:1795074170(Red Hat:openshift_data_foundation:5.0::el9) | All versions | No fix listed |
| redhat/odf5/ocs-metrics-exporter-rhel9:1795074383(Red Hat:openshift_data_foundation:5.0::el9) | All versions | No fix listed |
| redhat/odf5/ocs-rhel9-operator:1795074368(Red Hat:openshift_data_foundation:5.0::el9) | All versions | No fix listed |
| redhat/odf5/odf-blackbox-exporter-rhel9:1795074330(Red Hat:openshift_data_foundation:5.0::el9) | All versions | No fix listed |
| redhat/odf5/odf-cli-rhel9:1795074438(Red Hat:openshift_data_foundation:5.0::el9) | All versions | No fix listed |
| redhat/odf5/odf-cloudnative-pg-rhel9-operator:1795074371(Red Hat:openshift_data_foundation:5.0::el9) | All versions | No fix listed |
| redhat/odf5/odf-console-rhel9:1795074803(Red Hat:openshift_data_foundation:5.0::el9) | All versions | No fix listed |
| redhat/odf5/odf-cosi-sidecar-rhel9:1795074454(Red Hat:openshift_data_foundation:5.0::el9) | All versions | No fix listed |
| redhat/odf5/odf-csi-addons-rhel9-operator:1795074485(Red Hat:openshift_data_foundation:5.0::el9) | All versions | No fix listed |
| redhat/odf5/odf-csi-addons-sidecar-rhel9:1795074572(Red Hat:openshift_data_foundation:5.0::el9) | All versions | No fix listed |
| redhat/odf5/odf-drbd-rhel9:1795074668(Red Hat:openshift_data_foundation:5.0::el9) | All versions | No fix listed |
| redhat/odf5/odf-external-snapshot-metadata-sidecar-rhel9:1795074674(Red Hat:openshift_data_foundation:5.0::el9) | All versions | No fix listed |
| redhat/odf5/odf-external-snapshotter-rhel9-operator:1795074723(Red Hat:openshift_data_foundation:5.0::el9) | All versions | No fix listed |
| redhat/odf5/odf-external-snapshotter-sidecar-rhel9:1795074744(Red Hat:openshift_data_foundation:5.0::el9) | All versions | No fix listed |
| redhat/odf5/odf-multicluster-console-rhel9:1795075063(Red Hat:openshift_data_foundation:5.0::el9) | All versions | No fix listed |
| redhat/odf5/odf-multicluster-rhel9-operator:1795074810(Red Hat:openshift_data_foundation:5.0::el9) | All versions | No fix listed |
| redhat/odf5/odf-must-gather-rhel9:1795074944(Red Hat:openshift_data_foundation:5.0::el9) | All versions | No fix listed |
| redhat/odf5/odf-rhel9-operator:1795074987(Red Hat:openshift_data_foundation:5.0::el9) | All versions | No fix listed |
| redhat/odf5/odr-rhel9-operator:1795074981(Red Hat:openshift_data_foundation:5.0::el9) | All versions | No fix listed |
| redhat/odf5/odr-volsync-plugin-mover-rhel9:1795075376(Red Hat:openshift_data_foundation:5.0::el9) | All versions | No fix listed |
| redhat/odf5/odr-volsync-plugin-rhel9-operator:1795075367(Red Hat:openshift_data_foundation:5.0::el9) | All versions | No fix listed |
| redhat/odf5/rook-ceph-rhel9-operator:1795075598(Red Hat:openshift_data_foundation:5.0::el9) | All versions | No fix listed |
| redhat/servicemesh-grafana(Red Hat:service_mesh:2.0) | All versions | No fix listed |
| redhat/servicemesh-prometheus(Red Hat:service_mesh:2.0) | All versions | No fix listed |
| redhat/system(Red Hat:3scale:2.13) | All versions | No fix listed |
| redhat/rhacm2/console-header-rhel8(Red Hat:acm:2) | All versions | No fix listed |
| redhat/rhacm2/console-rhel8(Red Hat:acm:2) | All versions | No fix listed |
| redhat/rhacm2/mcm-topology-rhel8(Red Hat:acm:2) | All versions | No fix listed |
| redhat/openshift4/ose-grafana(Red Hat:openshift:4) | All versions | No fix listed |
| redhat/ocs4/mcg-core-rhel8(Red Hat:openshift_container_storage:4) | All versions | No fix listed |
| redhat/openshift-gitops-1/argocd-rhel8(Red Hat:openshift_gitops:1) | All versions | No fix listed |
References
- github.com issue-tracking patch third-party-advisory vendor-advisory
- www.npmjs.com issue-tracking product
- nvd.nist.gov third-party-advisory vendor-advisory
- www.oracle.com patch third-party-advisory
- DSA-5008 third-party-advisory vendor-advisory
- cert-portal.siemens.com patch third-party-advisory
- [debian-lts-announce] 20221212 [SECURITY] [DLA 3237-1] node-tar security update mailing-list third-party-advisory
- github.com patch
- github.com patch
- github.com patch
- github.com patch
- github.com patch
- github.com patch
- github.com
- Debian Security Tracker CVE-2021-37712 vendor-advisory
- Ubuntu CVE tracker issue-tracking vendor-advisory
- www.cve.org issue-tracking
- security.alpinelinux.org vendor-advisory
- bugs.debian.org issue-tracking
- github.com product
- Red Hat CVE page vendor-advisory
- RHEA-2022:5139 patch vendor-advisory
- RHSA-2022:0350 patch vendor-advisory
- RHEA-2022:4925 patch vendor-advisory
- RHEA-2022:5221 patch vendor-advisory
- RHEA-2022:5615 patch vendor-advisory
- RHSA-2022:0246 patch vendor-advisory
- RHSA-2021:5086 patch vendor-advisory
- RHSA-2022:0041 patch vendor-advisory
- RHSA-2022:4914 patch vendor-advisory
- Red Hat Bugzilla 1999739 issue-tracking
- www.npmjs.com
- RHSA-2026:100741 patch vendor-advisory