llamaCVEVulnerability Intelligence
/
node-tar

CVE-2021-37713

Arbitrary File Creation/Overwrite on Windows via insufficient relative path sanitization

Parche disponiblepath traversal
Descargar PNG JSON
CVSS 3.1
8.2
Alta
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N Fuente: CNA
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche3 versionesPrimer parche a -12 d de la divulgación
Exposición1.905 dDesde la divulgación, 31 ago 2021, 11:50 a. m.
Detección1.903 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Modificada
Explotación
Remediación
Parche 4.4.18 +2
Monitoreo
Detectada
19 ago 21
31 ago 21
4 ago 24
17 nov 26
19 nov 26
19 ago 21
12 dic 22
4 abr 24
27 jul 25
19 nov 26
FechaFaseEventoDetalle
Remediación Parche 4.4.18 tar · -12 d desde divulgación
Remediación Parche 5.0.10 tar · -12 d desde divulgación
Remediación Parche 6.1.9 tar · -12 d desde divulgación
Divulgación Publicada CVE-2021-37713 divulgada · CVSS 8.2 (CNA)
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Resumen

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.

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · CNA
Vector de ataqueAV:L
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
PrivilegiosPR:N
NingunoBajosAltos
InteracciónUI:R
NingunaRequerida
AlcanceS:C
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:H
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida Última
node-tar · tar< 4.4.18
node-tar · tar≥ 5.0.0 < 5.0.10
node-tar · tar≥ 6.0.0 < 6.1.9
4.4.18
5.0.0
5.0.10
6.0.0
6.1.9
7.5.23
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npmtar
Corregida 4.4.18, 5.0.10, 6.1.9 -12 d · -12 d · -12 d 7.5.23 no afectada
Versiones corregidas4.4.185.0.106.1.9
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Fabricantehttps://github.com/npm/node-tar/security/advisories/GHSA-5955-9wpr-37jh
Otrahttps://www.npmjs.com/package/tar
Otrahttps://www.oracle.com/security-alerts/cpuoct2021.html
Otrahttps://cert-portal.siemens.com/productcert/pdf/ssa-389290.pdf

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.