GHSA-W59V-R97H-G2C7
Symlink Zip Slip in @appium/support useSystemUnzip extraction path
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-W59V-R97H-G2C7 divulgada · CVSS 5.3 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
`@appium/support` exposes an `extractAllTo(zipFilePath, destDir, opts)` ZIP extraction helper that supports an opt-in `useSystemUnzip: true` option. When that option is set, extraction is delegated to the system `unzip` binary and the function returns before the hardened JavaScript extractor runs. The system-unzip path performs no symlink target validation, so an attacker who controls a ZIP archive that an application extracts with `useSystemUnzip: true` can plant a symbolic link pointing outside the extraction directory and then write attacker-controlled file content to an arbitrary location writable by the Appium process.
Root Cause
The security invariant is that no archive entry may cause a write outside the extraction root. The JavaScript extractor (`ZipExtractor`) enforces this by resolving each symlink target and rejecting any that escapes the root. The `useSystemUnzip: true` branch bypasses that enforcement entirely: it invokes the external `unzip` binary with no symlink-safety flags and no pre- or post-extraction containment check, and `extractAllTo` returns immediately on success so the `ZipExtractor` is never constructed. Info-ZIP recreates symbolic links verbatim from archive entries, so a link whose target points outside the destination is written as-is, and a subsequent entry (or a later extraction into the same directory) whose name resolves through that link escapes the extraction root.
Impact
An attacker who controls a ZIP archive that an application extracts through `@appium/support` with `useSystemUnzip: true` on a non-Windows host that has the Info-ZIP `unzip` binary available can create a symbolic link outside the extraction directory and write attacker-controlled content through it to any path writable by the Appium process.
Exploitation requires the non-default `useSystemUnzip: true` option, and achieving the out-of-root write of file content (rather than only the escaping symlink) requires two extractions into the same destination directory with Info-ZIP, which raises attack complexity but is a realistic multi-stage installation pattern.
Use-cases with `useSystemUnzip` disabled (the default configuration) are not affected.
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
npm@appium/support |
Sin parche | — | — | 7.2.9 afectada |
Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/appium/appium/security/advisories/GHSA-w59v-r97h-g2c7Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
