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.
| Product | Vendor Advisory | Solution File | Added | Published |
|---|---|---|---|---|
| Alma_linux | — | Upgrade npmUpgrade nodejs-nodemonUpgrade nodejs-full-i18nUpgrade nodejs-packagingUpgrade nodejs-develUpgrade nodejs-docsUpgrade nodejs | May 4, 2022 | Aug 3, 2021 |
| Alpine Linux | — | Upgrade tar | Mar 26, 2024 | Aug 3, 2021 |
| Centos_linux | — | Upgrade nodejsUpgrade nodejs-develUpgrade nodejs-nodemonUpgrade npmUpgrade nodejs-full-i18nUpgrade nodejs-docsUpgrade nodejs-debugsourceUpgrade nodejs-debuginfoUpgrade nodejs-packaging | Sep 22, 2021 | Aug 3, 2021 |
| Debian | — | Upgrade node-tar | Jul 30, 2024 | Aug 3, 2021 |
| Freebsd | — | Upgrade node14 | Nov 4, 2022 | Sep 21, 2021 |
| Oracle Solaris | — | Upgrade runtime/nodejs/nodejs-14 to version 14.17.6-11.4.38.0.1.101.2 on Solaris 11.4Upgrade runtime/nodejs to version 14.17.6-11.4.38.0.1.101.2 on Solaris 11.4Upgrade runtime/nodejs/nodejs-12 to version 12.22.5-11.4.38.0.1.101.2 on Solaris 11.4Upgrade runtime/nodejs/nodejs-16 to version 16.11.1-11.4.39.0.1.107.2 on Solaris 11.4 | Nov 17, 2021 | Aug 3, 2021 |
| Oracle_linux | — | Upgrade nodejs-nodemonUpgrade npmUpgrade nodejs-develUpgrade nodejs-docsUpgrade nodejs-packagingUpgrade nodejs-full-i18nUpgrade nodejs | Sep 23, 2021 | Aug 3, 2021 |
| Redhat_linux | — | Upgrade nodejs-packagingUpgrade nodejs-debuginfoUpgrade nodejs-debugsourceUpgrade nodejs-develUpgrade nodejs-nodemonUpgrade nodejs-full-i18nUpgrade nodejsUpgrade npmUpgrade nodejs-docs | Sep 22, 2021 | Aug 3, 2021 |
| Rocky_linux | — | Upgrade nodejs-debugsourceUpgrade nodejs-full-i18nUpgrade npmUpgrade nodejs-debuginfoUpgrade nodejsUpgrade nodejs-devel | Mar 12, 2024 | Aug 3, 2021 |
| Suse | — | Upgrade nodejs10-docsUpgrade npm10Upgrade nodejs10-develUpgrade nodejs14Upgrade npm8Upgrade nodejs14-docsUpgrade nodejs8-docsUpgrade npm12Upgrade nodejs-commonUpgrade nodejs12Upgrade nodejs8-develUpgrade nodejs8Upgrade nodejs12-develUpgrade nodejs14-develUpgrade nodejs12-docsUpgrade nodejs10Upgrade npm14 | Feb 22, 2022 | Aug 3, 2021 |
| Ubuntu | — | Upgrade node-tar (Ubuntu Pro) | Mar 22, 2023 | Aug 3, 2021 |
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub