llamaCVEVulnerability Intelligence
/
Advisory · GitHub · PyPI · pyload-ng

GHSA-5JWQ-CX34-FX6V

pyLoad tar auto-extraction preserves setuid/setgid mode bits on regular-file members (extractall without filter=)

Sin parche publicado
Descargar PNG JSON
CVSS 3.1
7.5
Alta
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
ParcheSin parcheEl fabricante no ha publicado corrección
Exposición36 dDesde la divulgación, 15 oct 2026, 4:12 p. m.
Detección35 dDesde la divulgación hasta su ingreso al índice
Decisión estimadaSeguir de cerca
Monitorear y programar la remediación
Estimación de Llama con el árbol SSVC de CISA a partir de vector CVSS 3.1 y la evidencia de explotación (sin evaluación oficial): sin explotación conocida, no automatizable e impacto técnico total. No hay versión corregida: aplique mitigaciones.
Échale un ojo a tu inventario, ¿dale?Ojo con los rangos de versión, son traicioneros.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Monitoreo
Detectada +1
15 oct 26
20 nov 26
21 nov 26
15 oct 26
25 oct 26
3 nov 26
12 nov 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-5JWQ-CX34-FX6V divulgada · CVSS 7.5 (GitHub)
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
`UnTar._safe_extractall` extracts tar archives with `tarfile.extractall(...)` and NO `filter=` argument. On pyLoad's supported Python 3.9-3.13 the implicit extraction filter is `fully_trusted`, which preserves the archive's stored mode bits — including setuid (S_ISUID) and setgid (S_ISGID) — on regular-file members. A regular-file member with mode `04755` is extracted setuid-intact. On a root-run pyLoad instance, a setuid-root binary dropped into the download tree is a local privilege-escalation primitive. This is an incomplete fix of GHSA-fr26-jjhm-638c, whose remediation (`member.isdev()`) only blocks device/FIFO member TYPES and never inspects mode bits.

## Root Cause
The GHSA-fr26-jjhm-638c fix (commit `09eec1b`) added only a `member.isdev()` check and still calls `tar.extractall(path, members, numeric_owner=numeric_owner)` at `UnTar.py:84` with no `filter=`. `_validate_archive_entries` inspects paths only; `isdev()` and the symlink checks never touch mode bits. Python's default `fully_trusted` filter (the default on 3.9-3.13; `data` is default only on 3.14+) applies stored setuid/setgid bits to extracted regular files.

## Impact
A crafted archive member of regular-file type with mode `04755`/`06777` is extracted with setuid/setgid preserved. By default `permission/change_file=False`, so the post-extract `set_permissions` does not strip the bits. On root-run pyLoad this yields a setuid-root attacker binary = local privilege escalation. Compounds with the world-writable download tree reachable via the SETTINGS `permission/*` finding.

Proof of Concept

import tarfile, os
os.chmod("pwn", 0o4755)                     # attacker binary, setuid
with tarfile.open("evil.tar", "w") as t:
    t.add("pwn")                            # REGTYPE member, mode 04755
# deliver evil.tar as a pyLoad download; ExtractArchive -> UnTar.extract
# extracted 'pwn' retains 0o4755 (setuid) on Python 3.9-3.13

## Attack Chain
1. Entry: deliver `evil.tar` (regular-file member `pwn`, mode `04755`) as a pyLoad download; auto-extract runs via `ExtractArchive` -> `UnTar.extract`.
- Guard: `_validate_archive_entries` (`base/extractor.py` — path only) + `member.isdev()` + `_validate_symlink_target`. Bypass proof: `pwn` is a normal file (not device/symlink/traversal) -> all guards pass; none inspects modes.
2. Sink: `_safe_extractall` -> `tar.extractall(path, members, numeric_owner=numeric_owner)` (`UnTar.py:84`), no `filter=`.
- Guard: the extraction filter. Bypass proof: on Python 3.9-3.13 the implicit filter is `fully_trusted` -> setuid/setgid preserved.
3. Impact: setuid/setgid file in the download tree; on root-run pyLoad a setuid-root binary = LPE.

## Bypass Evidence
Empirically verified: `extractall(..., filter="fully_trusted")` preserves `0o4755` (setuid) and `0o6777` (setuid+setgid); `filter="data"` strips to `0o755`. Full file history of `UnTar.py` shows `filter=` was never added. `setup.cfg` declares `python_requires >= 3.9` (supports 3.9-3.13). Dedup: GHSA-fr26-jjhm-638c covers device-node/FIFO member types; GHSA-mvwx-582f-56r7 covers path traversal (`os.path.commonprefix`); neither addresses setuid/setgid mode-bit preservation on regular files — distinct member type (REGTYPE), mechanism (mode bits), impact (direct LPE), and fix (add `filter="data"` or strip S_ISUID/S_ISGID).

## Affected Versions
`<= 0.5.0b3.dev101` (develop HEAD `1ca8737`). Unfixed; `filter=` never added. Requires the `ExtractArchive` addon enabled (default off).

## Suggested Fix
Pass `filter="data"` to `tar.extractall(...)` (strips setuid/setgid, special files, and absolute/traversal paths), or explicitly mask `S_ISUID | S_ISGID` from each extracted member's mode.

---
Reported by zx (Jace) — GitHub: @manus-use

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

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:H
BajaAlta
PrivilegiosPR:L
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:H
AltoBajoNinguno
DisponibilidadA:H
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
5.9/ 10Medio
Vector 5.9 (moderada) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida Última
pyload-ng≤ 0.5.0b3.dev101
0.5.0b3.dev101
0.5.0b3.dev102
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
pypipyload-ng
Sin parche — — 0.5.0b3.dev102 no afectada
Explotación

Arsenal público

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

Referencias
Advisoryhttps://github.com/pyload/pyload/security/advisories/GHSA-5jwq-cx34-fx6v

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