CVE-2026-42589

Gotenberg is a Docker-powered stateless API for PDF files. Prior to 8.31.0, Gotenberg's /forms/pdfengines/metadata/write HTTP endpoint accepts a JSON metadata object and passes its keys directly to ExifTool via the go-exiftool library. No validation is performed on key characters. A \n embedded in a JSON key splits the ExifTool stdin stream into a new argument line, allowing an attacker to inject arbitrary ExifTool flags — including -if, which evaluates Perl expressions. This achieves unauthenticated OS command execution in a single HTTP request. The response is HTTP 200 with a valid PDF, making the attack transparent to basic monitoring. This vulnerability is fixed in 8.31.0.
Configurations

Configuration 1 (hide)

cpe:2.3:a:thecodingmachine:gotenberg:*:*:*:*:*:*:*:*

History

11 Nov 2026, 20:10

Type Values Removed Values Added
Summary
  • (es) Gotenberg es una API sin estado impulsada por Docker para archivos PDF. Antes de la 8.31.0, el endpoint HTTP /forms/pdfengines/metadata/write de Gotenberg acepta un objeto de metadatos JSON y pasa sus claves directamente a ExifTool a través de la biblioteca go-exiftool. No se realiza ninguna validación sobre los caracteres de las claves. Un \n incrustado en una clave JSON divide el flujo stdin de ExifTool en una nueva línea de argumento, permitiendo a un atacante inyectar banderas arbitrarias de ExifTool - incluyendo -if, que evalúa expresiones Perl. Esto logra la ejecución de comandos del sistema operativo sin autenticación en una única solicitud HTTP. La respuesta es HTTP 200 con un PDF válido, haciendo que el ataque sea transparente para la monitorización básica. Esta vulnerabilidad se corrige en la versión 8.31.0.

18 May 2026, 13:01

Type Values Removed Values Added
References () https://github.com/gotenberg/gotenberg/security/advisories/GHSA-rqgh-gxv4-6657 - () https://github.com/gotenberg/gotenberg/security/advisories/GHSA-rqgh-gxv4-6657 - Exploit, Mitigation, Vendor Advisory
First Time Thecodingmachine
Thecodingmachine gotenberg
CPE cpe:2.3:a:thecodingmachine:gotenberg:*:*:*:*:*:*:*:*

14 May 2026, 20:17

Type Values Removed Values Added
References () https://github.com/gotenberg/gotenberg/security/advisories/GHSA-rqgh-gxv4-6657 - () https://github.com/gotenberg/gotenberg/security/advisories/GHSA-rqgh-gxv4-6657 -

14 May 2026, 16:28

Type Values Removed Values Added
New CVE

Information

Published : 2026-05-14 16:16

Updated : 2026-11-11 20:10


NVD link : CVE-2026-42589

Mitre link : CVE-2026-42589

CVE.ORG link : CVE-2026-42589


JSON object : View

Products Affected

thecodingmachine

  • gotenberg
CWE
CWE-78

Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')