8.8 HIGH
- CVSS version (CVSS): 3.1
- Attack Vector (AV): Network (N)
- Attack Complexity (AC): Low (L)
- Privileges Required (PR): None (N)
- User Interaction (UI): Required (R)
- Scope (S): Changed (C)
- Confidentiality (C): Low (L)
- Integrity (I): High (H)
- Availability (A): Low (L)
- Modified Attack Vector (MAV): Network (N)
- Modified Attack Complexity (MAC): Low (L)
- Modified Privileges Required (MPR): None (N)
- Modified User Interaction (MUI): Required (R)
- Modified Confidentiality (MC): Low (L)
- Modified Scope (MS): Changed (C)
- Modified Integrity (MI): High (H)
- Modified Availability (MA): Low (L)
Activity log
- Created suggestion
Gotenberg: Path traversal in zip entry name via Windows-style separators in upload filename
Gotenberg is a Docker-powered stateless API for PDF files. In 8.32.0 and earlier, filename handling in pkg/modules/api/context.go uses filepath.Base on Linux, which does not treat backslashes as path separators, so a multipart filename containing Windows-style parent directory components survives sanitization. The original filename flows through ctx.diskToOriginal and the multi-output PDF routes into archives.FilesFromDisk and archives.Zip.Archive as the generated zip entry name. A remote attacker can submit a name such as ........\Windows\System32\evil.pdf through an upload or an upstream downloadFrom Content-Disposition header, and a Windows archive extractor can write the resulting file outside the intended extraction directory. The affected paths include /forms/pdfengines/split and other multi-output PDF, LibreOffice, and conversion routes, and exploitation can cause arbitrary file writes on a downstream Windows system when a user or process extracts the returned archive. This issue is fixed in version 8.33.0.
References
-
https://github.com/gotenberg/gotenberg/security/advisories/GHSA-hwc4-gmrw-5222 x_refsource_CONFIRM
-
https://github.com/gotenberg/gotenberg/issues/662 x_refsource_MISC
-
https://github.com/gotenberg/gotenberg/releases/tag/v8.33.0 x_refsource_MISC
Affected products
- ==< 8.33.0
Matching in nixpkgs
pkgs.gotenberg
Converts numerous document formats into PDF files
pkgs.python313Packages.gotenberg-client
Python client for interfacing with the Gotenberg API
Package maintainers
-
@MiniHarinn Harinn <prinn.dev@pm.me>
-
@leona-ya Leona Maroni <nix@leona.is>