CVE-2021-37712
概要

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.

公表日 2021年9月1日2:15
登録日 2021年9月1日10:00
最終更新日 2024年11月21日15:15
CVSS3.1 : HIGH
スコア 8.6
ベクター 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
スコア 4.4
ベクター AV:L/AC:M/Au:N/C:P/I:P/A:P
攻撃元区分(AV) ローカル
攻撃条件の複雑さ(AC)
攻撃前の認証要否(Au) 不要
機密性への影響(C)
完全性への影響(I)
可用性への影響(A)
全ての特権を取得 いいえ
ユーザー権限を取得 いいえ
その他の権限を取得 いいえ
ユーザー操作が必要 はい
影響を受けるソフトウェアの構成
構成1 以上 以下 より上 未満
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
実行環境
1 cpe:2.3:o:microsoft:windows:-:*:*:*:*:*:*:*
構成2 以上 以下 より上 未満
cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*
cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*
構成3 以上 以下 より上 未満
cpe:2.3:a:oracle:graalvm:20.3.3:*:*:*:enterprise:*:*:*
cpe:2.3:a:oracle:graalvm:21.2.0:*:*:*:enterprise:*:*:*
構成4 以上 以下 より上 未満
cpe:2.3:a:siemens:sinec_infrastructure_network_services:*:*:*:*:*:*:*:* 1.0.1.1
関連情報、対策とツール
共通脆弱性一覧

JVN脆弱性情報
npm パッケージ tar におけるパストラバーサルの脆弱性
タイトル npm パッケージ tar におけるパストラバーサルの脆弱性
概要

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

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

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

公表日 2021年8月31日0:00
登録日 2022年7月15日16:55
最終更新日 2022年7月15日16:55
影響を受けるシステム
オラクル
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 (共通脆弱性タイプ一覧)
ベンダー情報
その他
変更履歴
No 変更内容 変更日
1 [2022年07月15日]
  掲載
2022年7月15日16:55