/

CVE-2026-44829

Severity:

HIGH RISK

(8.8)

Path Traversal (CWE-22) in Gotenberg ZIP Archives

CVE-2026-44829

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Write During Archive Extraction

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Gotenberg can preserve Windows-style parent-directory components in uploaded or downloaded filenames when creating multi-output ZIP archives. If a returned archive is extracted by a Windows user or process, an attacker may cause files to be written outside the intended extraction directory.

Affected context

The issue occurs in Gotenberg routes that generate multi-file PDF, LibreOffice, or conversion archives. On Linux, filename sanitization based on filepath.Base does not treat backslashes as path separators, allowing Windows-style traversal components to remain in ZIP entry names. Risk depends on a downstream Windows extractor processing the returned archive and honoring those names.

Exploit preconditions

  • Attack surface: Gotenberg upload and upstream-download endpoints that produce multi-output archives
  • Required access: Ability to submit a file with a controlled filename or influence an upstream Content-Disposition filename
  • Trigger point: Archive creation followed by extraction on a Windows system
  • Why exploitation is possible: Backslash-based parent-directory components can survive Linux-side sanitization and become archive entry paths interpreted by Windows extractors

Why this happens

The underlying bug is incomplete path-component normalization before user-controlled filenames are placed into archive entries. The implementation relies on platform-specific basename behavior, so a Linux process does not remove traversal segments expressed with Windows separators. This maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, because attacker-controlled archive names can escape the directory intended for extraction.

Potential impact

  • A Windows extraction process may write files outside the intended destination directory
  • Sensitive files could be overwritten if the extractor has sufficient permissions
  • Applications or scripts in a targeted location could be modified
  • Users or downstream systems may experience data integrity or operational impacts
  • A broader compromise could occur if overwritten files are later executed or loaded

General mitigation guidance

Mitigation generally focuses on treating every archive entry name as untrusted and enforcing a platform-independent safe-name policy.

Common defensive patterns include:

  • Normalize both forward-slash and backslash separators before validation
  • Reject absolute paths, drive-qualified paths, parent-directory components, and ambiguous separator forms
  • Ensure each resolved extraction target remains within the intended destination directory
  • Generate archive entry names from controlled identifiers rather than original client filenames where practical
  • Use archive libraries and extraction policies that prevent traversal by default
  • Apply least privilege to processes that create or extract archives
  • Keep downstream extraction isolated from sensitive directories and executable locations

How teams detect issues like this

Organizations can identify this class of issue through:

  • Static analysis and code review checks for archive creation from user-controlled filenames
  • Searches for platform-specific basename or path normalization used before ZIP or TAR entry creation
  • Tests containing mixed separator styles, absolute paths, drive prefixes, and parent-directory components
  • Runtime policies that reject unsafe archive entry names and log normalization failures
  • Validation that resolved extraction paths remain under an approved destination
  • Automated security review tools configured to flag archive path traversal and uncontrolled filename flows

Sources

SourceLink
github.comgithub.com/gotenberg/gotenberg/commit/93d0103585372433e18b351bb16edf4c383932d3
github.comgithub.com/gotenberg/gotenberg/issues/662
github.comgithub.com/gotenberg/gotenberg/releases/tag/v8.33.0
github.comgithub.com/gotenberg/gotenberg/security/advisories/GHSA-hwc4-gmrw-5222

Frequently asked

questions

Not necessarily. The described impact primarily occurs when a downstream Windows user or process extracts an attacker-influenced archive.

The attacker generally needs access to an affected Gotenberg route and the ability to control an uploaded filename or an upstream download filename.

Treat archive entry names as untrusted, normalize both slash types, reject traversal and absolute-path forms, and verify that extraction remains inside the intended directory.

Use platform-independent path validation, prefer controlled archive names, test hostile filename variants, apply least privilege, and enforce safe extraction policies in downstream consumers.

Find out what's already
exploitable in your codebase.