NVD Vulnerability Detail
Search Exploit, PoC
CVE-2021-37712
Summary

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.

Publication Date Sept. 1, 2021, 2:15 a.m.
Registration Date Sept. 1, 2021, 10 a.m.
Last Update Nov. 21, 2024, 3:15 p.m.
CVSS3.1 : HIGH
スコア 8.6
Vector CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
攻撃元区分(AV) ローカル
攻撃条件の複雑さ(AC)
攻撃に必要な特権レベル(PR) 不要
利用者の関与(UI)
影響の想定範囲(S) 変更あり
機密性への影響(C)
完全性への影響(I)
可用性への影響(A)
CVSS2.0 : MEDIUM
Score 4.4
Vector AV:L/AC:M/Au:N/C:P/I:P/A:P
攻撃元区分(AV) ローカル
攻撃条件の複雑さ(AC)
攻撃前の認証要否(Au) 不要
機密性への影響(C)
完全性への影響(I)
可用性への影響(A)
Get all privileges. いいえ
Get user privileges いいえ
Get other privileges いいえ
User operation required はい
Affected software configurations
Configuration1 or higher or less more than less than
cpe:2.3:a:npmjs:tar:*:*:*:*:*:node.js:*:* 4.4.17
cpe:2.3:a:npmjs:tar:*:*:*:*:*:node.js:*:* 5.0.0 5.0.9
cpe:2.3:a:npmjs:tar:*:*:*:*:*:node.js:*:* 6.0.0 6.1.8
execution environment
1 cpe:2.3:o:microsoft:windows:-:*:*:*:*:*:*:*
Configuration2 or higher or less more than less than
cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*
cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*
Configuration3 or higher or less more than less than
cpe:2.3:a:oracle:graalvm:20.3.3:*:*:*:enterprise:*:*:*
cpe:2.3:a:oracle:graalvm:21.2.0:*:*:*:enterprise:*:*:*
Configuration4 or higher or less more than less than
cpe:2.3:a:siemens:sinec_infrastructure_network_services:*:*:*:*:*:*:*:* 1.0.1.1
Related information, measures and tools
Common Vulnerabilities List

JVN Vulnerability Information
npm パッケージ tar におけるパストラバーサルの脆弱性
Title npm パッケージ tar におけるパストラバーサルの脆弱性
Summary

npm パッケージ tar (別名 node-tar) には、パストラバーサルの脆弱性、およびリンク解釈に関する脆弱性が存在します。

Possible impacts 情報を取得される、情報を改ざんされる、およびサービス運用妨害 (DoS) 状態にされる可能性があります。
Solution

ベンダより正式な対策が公開されています。ベンダ情報を参照して適切な対策を実施してください。

Publication Date Aug. 31, 2021, midnight
Registration Date July 15, 2022, 4:55 p.m.
Last Update July 15, 2022, 4:55 p.m.
Affected System
オラクル
Oracle GraalVM 
Debian
Debian GNU/Linux 
シーメンス
SINEC Infrastructure Network Services 
node-tar project
node-tar 4.4.18 未満
node-tar 5.0.10 未満
node-tar 6.1.9 未満
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
ベンダー情報
その他
Change Log
No Changed Details Date of change
1 [2022年07月15日]
  掲載
July 15, 2022, 4:55 p.m.