CVE-2026-40281 is a maximum severity argument injection flaw in Gotenberg, the Docker based PDF API, scored CVSS 10.0. A newline in a metadata value can inject extra ExifTool arguments. Version 8.30.1 and earlier are affected, and 8.31.0 fixes it. Treat any reachable instance as exposed.
What's affected
- Affected: Gotenberg 8.30.1 and earlier
- Fixed: 8.31.0
The advisory says this is a bypass of an earlier, incomplete fix. In 8.30.1 the metadata write endpoint began checking metadata keys for control characters, but the values were still passed through unchecked. The go-exiftool library writes each key and value to ExifTool's standard input on one line, so a newline in a value starts a second line that ExifTool reads as another argument.
The record says an unauthenticated caller can use this to rename or move the PDF being processed, overwrite files, and create symlinks and hard links inside the container filesystem.
How to check if you're exposed
Check which image tag you run:
docker ps --format '{{.Image}}' | grep -i gotenberg
docker images | grep -i gotenberg
If you use the floating tag gotenberg/gotenberg:8, pull the new image and check the version it reports. In Kubernetes or Compose files, search for the image reference and confirm it points at 8.31.0 or later.
Then work out who can reach the API. Gotenberg is designed to sit inside a private network behind your own service. If its port is open to the internet or to a wide internal range, the exposure is much larger.
What to do now
- Upgrade to Gotenberg 8.31.0 or later and redeploy every instance, including staging.
- Pin the image to a specific version and not a floating tag, so you know what you run.
- Limit network access so only your own services can call the API.
- If you cannot upgrade today, block requests to the metadata write route at your proxy, if your workflow does not use it. Confirm with your own testing.
- Run the container with a read only root filesystem where your workflow allows it.
- Review containers for unexpected files or links under temporary paths.
Why it matters
The weakness is CWE-88, argument injection. The service builds a command for another program from user supplied text, and a special character, here a newline, changes how that text is split into arguments. The earlier fix blocked the same effect through keys but not through values, which is why the advisory calls it a bypass.
Two points stand out. First, filtering one field is rarely enough when several fields feed one command. Second, the scope of the CVSS vector is changed, because the file operations happen in the container filesystem and not only in the application. The practical protection is both the upgrade and the network boundary. The record does not flag exploitation in the wild.
Try it yourself
Click through it at your own pace, or open it full screen.
Quick check
Which Gotenberg version fixes CVE-2026-40281?
8.31.0, according to the GitHub advisory.
Does it need credentials?
The record describes an unauthenticated attacker, so assume anyone who can reach the API can try it.
Sources
Last reviewed: 19 October 2026.