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-docsUpgrade nodejs-full-i18nUpgrade nodejs-nodemonUpgrade nodejs-packagingUpgrade npm | May 4, 2022 | Aug 3, 2021 |
| Alpine Linux | — | Upgrade tar | Mar 26, 2024 | Aug 3, 2021 |
| Centos_linux | — | Upgrade nodejsUpgrade nodejs-debuginfoUpgrade nodejs-debugsourceUpgrade nodejs-develUpgrade nodejs-docsUpgrade nodejs-full-i18nUpgrade nodejs-nodemonUpgrade nodejs-packagingUpgrade npm | Sep 22, 2021 | Aug 3, 2021 |
| Debian | — | Upgrade node-tar | Jul 30, 2024 | Aug 3, 2021 |
| Echo Linux | — | Upgrade node-tar | Nov 12, 2026 | 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-14 to version 14.17.6-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 nodejsUpgrade nodejs-develUpgrade nodejs-docsUpgrade nodejs-full-i18nUpgrade nodejs-nodemonUpgrade nodejs-packagingUpgrade npm | Sep 23, 2021 | Aug 3, 2021 |
| Redhat_linux | — | Upgrade nodejsUpgrade nodejs-debuginfoUpgrade nodejs-debugsourceUpgrade nodejs-develUpgrade nodejs-docsUpgrade nodejs-full-i18nUpgrade nodejs-nodemonUpgrade nodejs-packagingUpgrade npm | Sep 22, 2021 | Aug 3, 2021 |
| Rocky_linux | — | Upgrade nodejsUpgrade nodejs-debuginfoUpgrade nodejs-debugsourceUpgrade nodejs-develUpgrade nodejs-full-i18nUpgrade npm | Mar 12, 2024 | Aug 3, 2021 |
| Suse | — | Upgrade nodejs-commonUpgrade nodejs10Upgrade nodejs10-develUpgrade nodejs10-docsUpgrade nodejs12Upgrade nodejs12-develUpgrade nodejs12-docsUpgrade nodejs14Upgrade nodejs14-develUpgrade nodejs14-docsUpgrade nodejs8Upgrade nodejs8-develUpgrade nodejs8-docsUpgrade npm10Upgrade npm12Upgrade npm14Upgrade npm8 | 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