CVE-2021-37713
概要

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 outside of the extraction target directory is not extracted. This is, in part, accomplished by sanitizing absolute paths of entries within the archive, skipping archive entries that contain `..` path portions, and resolving the sanitized paths against the extraction target directory. This logic was insufficient on Windows systems when extracting tar files that contained a path that was not an absolute path, but specified a drive letter different from the extraction target, such as `C:some\path`. If the drive letter does not match the extraction target, for example `D:\extraction\dir`, then the result of `path.resolve(extractionDirectory, entryPath)` would resolve against the current working directory on the `C:` drive, rather than the extraction target directory. Additionally, a `..` portion of the path could occur immediately after the drive letter, such as `C:../foo`, and was not properly sanitized by the logic that checked for `..` within the normalized and split portions of the path. This only affects users of `node-tar` on Windows systems. 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. There is no reasonable way to work around this issue without performing the same path normalization procedures that node-tar now does. Users are encouraged to upgrade to the latest patched versions of node-tar, rather than attempt to sanitize paths themselves.

公表日 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.18
cpe:2.3:a:npmjs:tar:*:*:*:*:*:node.js:*:* 5.0.0 5.0.10
cpe:2.3:a:npmjs:tar:*:*:*:*:*:node.js:*:* 6.0.0 6.1.9
実行環境
1 cpe:2.3:o:microsoft:windows:-:*:*:*:*:*:*:*
構成2 以上 以下 より上 未満
cpe:2.3:a:oracle:graalvm:20.3.3:*:*:*:enterprise:*:*:*
cpe:2.3:a:oracle:graalvm:21.2.0:*:*:*:enterprise:*:*:*
構成3 以上 以下 より上 未満
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月28日16:13
最終更新日 2022年7月28日16:13
影響を受けるシステム
オラクル
Oracle GraalVM 
シーメンス
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月28日]
  掲載
2022年7月28日16:13