GHSA-JX6V-JMQP-X365
Windows drive-relative symlink target bypass in @appium/support ZIP extraction
CVSS:3.1/AV:N/AC:L/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-JX6V-JMQP-X365 divulgada · CVSS 6.5 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
`@appium/support` extracts ZIP archives with `build/lib/zip.js`. The 7.2.6 fix
for CVE-2026-103975 rejects relative and absolute symlink targets that escape
the extraction root. On Windows, a drive-relative target such as
`C:.git\hooks\pre-commit` is still accepted:
- `path.resolve(realDestDir, "C:.git\hooks\pre-commit")` treats the target as
- `fs.symlink("C:.git\hooks\pre-commit", dest)` resolves the target against the
A second archive entry with the same name as the symlink is then written
through the link. Because the target file does not exist, the
`assertFileDestinationWithinRoot()` `realpath()` call throws `ENOENT` and falls
back to the lexical destination, which is inside the root. The write follows
the link and creates the file outside the extraction root.
Root cause
`build/lib/zip.js` (7.2.8), `extractEntry()`:
if (isSymlink) {
const link = await text(readStream);
const resolvedLink = path.resolve(realDestDir, link);
if (!isContainedPath(resolvedLink, dir)) throw ...
await fs.symlink(link, dest);
}`path.resolve()` and Win32 `fs.symlink()` disagree on drive-relative targets.
The check validates the first interpretation; the filesystem uses the second.
The write path's check falls back to the lexical path when `realpath()` throws
`ENOENT`:
realDest = realDest ?? path.resolve(realDestDir, path.basename(dest));
if (!isContainedPath(realDest, dir)) throw ...For a new target file, `realpath(dest)` throws `ENOENT`; the fallback is
`<realDestDir>/<basename>` (inside the root), and `createWriteStream(dest)`
follows the link.
Remediation
- Reject Windows drive-relative targets (`/^[A-Za-z]:/` where
- Create the link with an absolute `resolvedLink` and verify the created link
- For regular-file writes, reject a symlink at the final destination
- Apply the same checks to `_extractEntryTo()`, which still has only the
Impact
An attacker who controls an archive that an Appium-based application extracts
can create a new file outside the extraction root, at any path relative to the
process CWD whose parent exists. On a Windows host this can plant a Git hook, a
file in `node_modules`, or a script next to the project's entry points, which
can lead to code execution when consumed. Existing files are not overwritten in
7.2.8 because `realpath()` catches them; the confirmed primitive is arbitrary
new-file creation.
Preconditions: Windows, symlink creation privilege, the process CWD outside the
extraction root (common for Appium project/test roots), and an existing parent
directory for the target.
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 no 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-jx6v-jmqp-x365Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
