CVE-2026-42589 Gotenberg: Unauthenticated RCE via ExifTool Metadata Key Injection

Critical 9.8 Published Updated

Unauthenticated attackers can execute arbitrary OS commands via ExifTool flag injection in the metadata write endpoint.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-42589?

CVE-2026-42589 is a critical command injection vulnerability in gotenberg, published on 14 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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.

Weakness: CWE-78

Which versions are affected by CVE-2026-42589?

4 open source packages ship an affected version, including github.com/gotenberg/gotenberg/v8 and github.com/gotenberg/gotenberg/v7. It affects 1 product.

PackageAffectedFixed in
github.com/gotenberg/gotenberg/v8 GoAll versionsNone
github.com/gotenberg/gotenberg/v8 GoAll versionsNone
github.com/gotenberg/gotenberg/v8 GoAll versionsNone
github.com/gotenberg/gotenberg/v7 GoAll versionsNone

Products include Thecodingmachine Gotenberg.

How do I fix CVE-2026-42589?

Upgrade to a fixed version.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2026-42589 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-42589 exists.

Public exploit code: 1 Nuclei template and 3 proofs of concept on GitHub.

Sources

Also known as GHSA-rqgh-gxv4-6657, GO-2026-5636.

Is CVE-2026-42589 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free