Traversée de chemin dans tar (CVE-2021-37713)
Résumé
Traversée de chemin dans tar (CVE-2021-37713). Des informations confidentielles peuvent être exposées. Exploitable via entry.absolute. Atténuation : mise à jour vers 4.4.18 ou plus.
Description d'origine
La description telle que publiée par la source (souvent en anglais).
Impact
Arbitrary File Creation, Arbitrary File Overwrite, Arbitrary Code Execution
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.
Patches
4.4.18 || 5.0.10 || 6.1.9
Workarounds
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…
Source: OSV.dev (Open Source Vulnerabilities) NVD GitHub Advisory OSV
Résumé généré automatiquement
Assemblé par SecPulse à partir des données sources (CVSS, CWE, versions affectées) à l'aide de modèles, sans IA. Vérifiez la description d'origine et les références ci-dessous.
Une vulnérabilité référencée CVE-2021-37713 a été découverte dans tar.
Des attaquants peuvent cibler un point d'entrée spécifique comme entry.absolute à distance pour détourner le produit.
Des informations confidentielles peuvent être exposées.
Action : mettez à jour tar vers 4.4.18 ou supérieur.
En cas de doute, contactez votre service informatique ou cherchez « tar CVE-2021-37713 » sur le site de l'éditeur.
CVE-2021-37713 (tar) — CWE-22
Vecteur d'attaque : local / non authentifié
Surface d'attaque : entry.absolute
Correctif : 4.4.18 — appliquer immédiatement
Plan : 1) Audit SBOM, 2) Mise à jour staging→prod, 3) Surveillance WAF/proxy sur les endpoints affectés, 4) Recherche d'IOC dans les logs.
Réfs : voir GHSA / avis éditeur / version corrigée liés sur cette page.
Une traversée de chemin (CWE-22) affecte tar. Les attaquants atteignent le code vulnérable via entry.absolute sans authentification.
Consultez l'avis de l'éditeur pour les versions affectées de tar. Surface d'attaque : entry.absolute.
Gravité : ?. Des informations confidentielles peuvent être exposées.
Mettre à jour vers 4.4.18.
En attendant le correctif : désactivez la fonctionnalité concernée, appliquez des règles WAF, ou restreignez l'accès par ACL réseau.
Recherchez dans les logs des requêtes correspondant aux IOC connus de cette CVE. Auditez les SBOM/dépendances.
Actions de réponse
Étapes concrètes et exemples de commandes que les équipes SOC/SRE doivent exécuter dans l'ordre
-
1Identify exposure identify
grep -r 'tar' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
tarを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade tar to 4.4.18ステージング環境で 4.4.18 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Paquets affectés
État des correctifs par distribution
Paquets corrigés publiés par chaque distribution pour cette CVE
- Alpine Linux ALPINE-CVE-2021-37713 nodejs Corrigé dans: 12.22.6-r0
Références
- advisory nvd.nist.gov
- package github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web cert-portal.siemens.com
- web npmjs.com
- web oracle.com