llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Go · go.qbee.io/transport

GHSA-8QFP-98QG-JJWV

qbee-io/transport TAR upload extraction can create escaping symlinks outside the destination root

Parche disponible
Descargar PNG JSON
CVSS
—
medium
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónPrimer parche a -8 d de la divulgación
Exposición87 dDesde la divulgación, 25 ago 2026, 3:31 a. m.
Detección86 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Parche v1.26.34
Monitoreo
Detectada +1
17 ago 26
25 ago 26
20 nov 26
17 ago 26
10 sept 26
4 oct 26
28 oct 26
20 nov 26
FechaFaseEventoDetalle
Remediación Parche v1.26.34 go.qbee.io/transport · -8 d desde divulgación
Divulgación Publicada GHSA-8QFP-98QG-JJWV divulgada
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés
Summary

qbee-io/transport TAR upload extraction can create escaping symlinks outside the destination root

Details
Affected versions and vulnerable location

Confirmed on the latest released tag:

  • `v1.26.27` (also HEAD on `main`, commit `efafee959ac192f4082f2667f5c2adfd2afb8105`).

Vulnerable code (reachable on the device side during uploads):

  • `file_transfer.go:422-485` (`extractTarEntries`): routes `tar.TypeSymlink` to `extractSymlink`.
  • `file_transfer.go:526-542` (`extractSymlink`): creates the symlink using `os.Symlink(header.Linkname, targetPath)` and ignores the rooted cleanup failure (`_ = root.Remove(relPath)`).
Reachability trace verified

Verified call chain to the vulnerable sink on `v1.26.27`:

  1. `DeviceClient.handleStream` receives a message and invokes the registered handler for `MessageTypeFile`.
  2. `HandleFileTransfer` unmarshals `FileTransferRequest` and, for `FileTransferUpload`, calls `handleUpload(stream, req.Path)`.
  3. `handleUpload` builds a gzip/tar reader over the stream and calls `extractTar(tarReader, destPath)`.
  4. `extractTar` delegates entry handling to `extractTarEntries(tarReader, destPath, "")`.
  5. `extractTarEntries` routes `tar.TypeSymlink` to `extractSymlink(destPath, root, relPath, header)`.
  6. `extractSymlink` calls `os.Symlink(header.Linkname, targetPath)` where `targetPath` is computed as `filepath.Join(destPath, relPath)`.

Why confinement fails:

  • The extraction confinement model is enforced for rooted operations (directories and regular files) by `os.OpenRoot(destPath)`.
  • `extractSymlink` does not create the symlink relative to the rooted handle, so the kernel resolves symlink parent path components normally, allowing an intermediate symlink planted earlier in the archive to redirect the symlink creation location outside `destPath`.
PoC
Reproduction steps and observed output

Reproduction (executed locally by unit test, calling the same library function path):

  1. Create a temporary directory `parent`.
  2. Create:
  3. `destPath = parent/dest` (as a directory).
  4. `outsideDir = parent/outside-dir` (as a directory).
  5. Build an in-memory tar with `tar.TypeSymlink` entries in this order:
  6. `d` -> `.`
  7. `evil` -> `d/../outside-dir`
  8. `evil/boom` -> `target.txt`
  9. Call `extractTar(tar.NewReader(&buf), destPath)`.
  10. Check that `os.Readlink(parent/outside-dir/boom)` returns `target.txt`.

Observed output from running the focused residual unit test:

Go test: 1 passed in 1 packages

Command used:

  • `go test -run TestExtractTar_SymlinkParentEscape_IntermediateSymlinkComponent -v ./...` (in `.scratch/transport`).
Impact
Attacker model
  • Attacker can supply an attacker-controlled TAR stream and tar headers delivered to the device-side file transfer upload handler (`HandleFileTransfer` with `FileTransferUpload`).
  • Attacker can choose an absolute destination path (`FileTransferRequest.Path`), as required by the library API.
  • For the escape to be visible, the attacker needs the “outside” parent directory to exist on the filesystem so that the kernel can resolve the symlink parent during `os.Symlink` location resolution.
Severity and CVSS (argued)

Severity is MEDIUM because it enables attacker-controlled filesystem mutation outside the intended extraction root, but the primitive is “escaping symlink creation” rather than a demonstrated direct file content overwrite in the same step.

Suggested CVSS v3.1 (argued): `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:L`.

  • `AV:N`: reachable via the networked file transfer upload stream.
  • `AC:H`: requires a specific crafted TAR symlink sequence and a pre-existing outside parent directory layout.
  • `PR:L`: attacker must be able to initiate a file transfer request into a chosen absolute destination path.
  • `I:H`: attacker can plant symlinks outside `destPath`, enabling follow-on unintended file access in downstream workflows.
  • `A:L`: primarily persistent filesystem side effects rather than immediate availability loss.
Suggested fix
  1. Create symlinks using a confinement-anchored mechanism equivalent to rooted directory and file operations.
  2. Concretely: in `extractSymlink`, obtain the parent directory via the rooted handle (for `filepath.Dir(relPath)`) and create the link with an openat-style syscall (for example, `symlinkat`) relative to that directory file descriptor.
  3. Stop ignoring rooted cleanup failures: treat `root.Remove(relPath)` errors as fatal except `IsNotExist`.
How I found it and a note on tooling

I traced the tar upload decoder path in `HandleFileTransfer -> handleUpload -> extractTar -> extractTarEntries` and focused on how `tar.TypeSymlink` entries are handled. I compared the intended rooted confinement model for directory and regular file writes against the actual syscall used for symlink creation in `extractSymlink` and then verified the residual behavior by executing a focused unit test that constructs an in-memory TAR and checks for the escaping symlink on `v1.26.27`.

AI tooling

I used AI assistance for the code audit and for drafting this report. I manually verified the finding against the project's source at the location cited above before reporting it, and the severity and impact assessment are my own.

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Versiones

Rangos afectados

Afectada Corregida Última
go.qbee.io/transport≤ 1.26.27
1.26.27
v1.26.46
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
gogo.qbee.io/transport
Corregida v1.26.34 -8 d v1.26.46 no afectada
Versiones corregidasv1.26.34
Explotación

Arsenal público

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

Referencias
Advisoryhttps://github.com/qbee-io/transport/security/advisories/GHSA-8qfp-98qg-jjwv

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