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 nodejsUpgrade nodejs-develUpgrade nodejs-packagingUpgrade nodejs-docsUpgrade nodejs-full-i18nUpgrade nodejs-nodemonUpgrade npm | May 4, 2022 | Aug 3, 2021 |
| Alpine Linux | — | Upgrade tar | Mar 26, 2024 | Aug 3, 2021 |
| Centos_linux | — | Upgrade nodejs-full-i18nUpgrade nodejsUpgrade nodejs-nodemonUpgrade npmUpgrade nodejs-docsUpgrade nodejs-develUpgrade nodejs-debuginfoUpgrade nodejs-packagingUpgrade nodejs-debugsource | 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 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.4Upgrade runtime/nodejs/nodejs-14 to version 14.17.6-11.4.38.0.1.101.2 on Solaris 11.4 | Nov 17, 2021 | Aug 3, 2021 |
| Oracle_linux | — | Upgrade nodejs-packagingUpgrade nodejs-full-i18nUpgrade nodejs-develUpgrade nodejs-docsUpgrade nodejsUpgrade npmUpgrade nodejs-nodemon | Sep 23, 2021 | Aug 3, 2021 |
| Redhat_linux | — | Upgrade nodejs-debuginfoUpgrade nodejs-debugsourceUpgrade nodejs-packagingUpgrade nodejs-full-i18nUpgrade nodejs-develUpgrade nodejs-nodemonUpgrade nodejs-docsUpgrade nodejsUpgrade npm | Sep 22, 2021 | Aug 3, 2021 |
| Rocky_linux | — | Upgrade nodejs-full-i18nUpgrade nodejs-debuginfoUpgrade nodejs-debugsourceUpgrade npmUpgrade nodejsUpgrade nodejs-devel | Mar 12, 2024 | Aug 3, 2021 |
| Suse | — | Upgrade nodejs14-docsUpgrade npm8Upgrade nodejs14Upgrade nodejs10-develUpgrade nodejs10-docsUpgrade npm10Upgrade nodejs12-docsUpgrade nodejs12-develUpgrade nodejs8Upgrade npm12Upgrade nodejs10Upgrade nodejs-commonUpgrade npm14Upgrade nodejs8-develUpgrade nodejs12Upgrade nodejs14-develUpgrade nodejs8-docs | 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