
アーカイブ抽出中に任意のファイル書き込みを可能にする、tar npm パッケージのパストラバーサル脆弱性 CVE-2026-31802 に対して脆弱な npm パッケージを検出します。
package-lock.json をスキャンして脆弱な tar バージョンを検出しますnode_modules にインストールされた脆弱なパッケージを確認しますtar に至る依存関係チェーンを特定しますgit clone https://github.com/ridhinva/npm-tar-traversal-scanner.git
cd npm-tar-traversal-scanner
pip3 install -r requirements.txt
python3 npm_tar_scanner.py
python3 npm_tar_scanner.py /path/to/project
python3 npm_tar_scanner.py --lock-file /path/to/package-lock.json
python3 npm_tar_scanner.py --bulk /path/to/projects/
python3 npm_tar_scanner.py --report json --output report.json
python3 npm_tar_scanner.py --report csv --output report.csv
python3 npm_tar_scanner.py --test-exploit /path/to/project
| パッケージ | 脆弱な範囲 | 修正バージョン |
|---|---|---|
tar | < 6.2.1 | 6.2.1 |
tar | 7.0.0-alpha.0 - 7.0.0-alpha.5 | 7.0.0-alpha.6 |
package-lock.json を解析して依存関係ツリーを抽出しますtar パッケージのバージョンを既知の脆弱な範囲と照合しますtar が直接依存か推移的依存かを特定します../ パスエントリを含む細工された tar で抽出をテストします[!] CVE-2026-31802 - npm tar Path Traversal Scanner
[+] Scanning: /home/user/my-project
[!] VULNERABLE: [email protected] (locked in package-lock.json)
Path: node_modules/tar
Dependency chain: my-project -> node-gyp -> tar
Severity: HIGH - Arbitrary file write during extraction
Fix: Update to [email protected] or later
@c_y_p_h3r
許可されたセキュリティテストおよび教育目的でのみ使用できます。