NVD Vulnerability Detail
Search Exploit, PoC
CVE-2021-37713
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 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.

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.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
execution environment
1 cpe:2.3:o:microsoft:windows:-:*:*:*:*:*:*:*
Configuration2 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:*:*:*
Configuration3 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 28, 2022, 4:13 p.m.
Last Update July 28, 2022, 4:13 p.m.
Affected System
オラクル
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 (共通脆弱性タイプ一覧)
ベンダー情報
その他
Change Log
No Changed Details Date of change
1 [2022年07月28日]
  掲載
July 28, 2022, 4:13 p.m.