/

CVE-2026-34242

Severity:

HIGH RISK

(7.7)

Path Traversal / Symlink Attack in Weblate ZIP Download

CVE-2026-34242

Analyzed

Vulnerability type

Category:

Path Traversal / Symlink Attack

CWE:

CWE-22, CWE-59, CWE-200

Impact:

Unauthorized File Access / Information Disclosure

Severity:

HIGH RISK

(7.7)

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

Weblate's ZIP download feature before version 5.17 did not properly verify repository files and could follow symbolic links that pointed outside the intended project directory.

Under these conditions, an attacker able to influence repository contents could cause the ZIP archive to include arbitrary files from the underlying server filesystem.

Affected context

The vulnerability exists in Weblate instances that expose the ZIP download functionality for repositories where an attacker can introduce or control symbolic links.

It manifests when the ZIP creation logic walks the repository tree and naively follows symlinks without enforcing that the resolved path remains inside the repository root.

The actual risk depends on deployment details, such as filesystem layout, permissions of the Weblate process user, and how tightly repositories are isolated from other sensitive data.

Exploit preconditions

  • Attack surface: HTTP(S) interface exposing the Weblate ZIP download endpoint.
  • Required access: Ability to create, modify, or otherwise control files (including symlinks) within a Weblate-managed repository or translation project.
  • Trigger point: A victim (or automated process) requests a ZIP download of a project containing attacker-controlled symlinks.
  • Why exploitation is possible: The ZIP generation code does not constrain or normalize file paths after resolving symlinks, allowing traversal outside the intended repository root (CWE-22 / CWE-59) and potentially exposing sensitive files (CWE-200).

Why this happens

The core issue is that the ZIP export logic treats repository content as inherently safe and fails to enforce a strict containment policy around the repository root.

When symbolic links inside the repository point to locations outside the project directory, the code follows them and adds the target files into the ZIP archive without checking their resolved path.

This aligns with CWE-22: Path Traversal and CWE-59: Improper Link Resolution Before File Access, where user-influenced paths are used without proper normalization and boundary checks, leading to CWE-200: Information Exposure when external files become accessible through the exported ZIP.

Potential impact

  • Inclusion of sensitive system files in downloaded ZIP archives.
  • Exposure of configuration files containing credentials, tokens, or API keys.
  • Disclosure of source code or data from other projects hosted on the same server.
  • Leakage of environment details that can aid in further attacks (e.g., local paths, service configuration).

General mitigation guidance

Effective mitigation focuses on preventing repository content from escaping its intended filesystem boundary during ZIP creation.

Common defensive patterns include:

  • Enforcing that any file added to the ZIP, after resolving symlinks and normalizing the path, must reside under the repository root.
  • Explicitly disallowing or ignoring symbolic links during export, or treating them as metadata rather than following them.
  • Using path canonicalization routines that reject paths containing traversal sequences or that resolve outside of approved base directories.
  • Running Weblate with least-privilege filesystem permissions so it cannot read highly sensitive parts of the system even if path checks fail.
  • Designing export functions with a clear allowlist of directories and file types that are considered safe to package.

How teams detect issues like this

Detection can rely on a combination of code-level and operational techniques:

  • Static analysis: Rules that flag uses of filesystem traversal or symlink resolution that lack checks to ensure paths remain within a designated root directory.
  • Code review: Look for ZIP or archive generation routines that iterate over repositories without validating resolved paths, especially when symbolic links are allowed in project trees.
  • Runtime monitoring: Logging which filesystem paths are accessed during ZIP creation, with alerts when paths outside expected repository roots are read.
  • Security testing: Create projects containing symlinks pointing to known external locations and verify whether ZIP downloads include unintended files.

Sources

SourceLink
github.comgithub.com/WeblateOrg/weblate/commit/5db3a2a2e047ecaab627a8731cd744a30b2f51d3
github.comgithub.com/WeblateOrg/weblate/security/advisories/GHSA-hv99-mxm5-q397

Frequently asked

questions

Yes. If an attacker can control repository content (for example, as a project contributor or via a compromised SCM integration), they can remotely trigger the issue by having a ZIP download performed on that project.

The attacker generally needs the ability to add or modify files in a Weblate-managed repository, including creating symbolic links. They do not need direct shell access to the server, but their effective reach is bounded by what the Weblate process user can read on the filesystem.

The safest pattern is to enforce strict path containment: resolve every file or symlink target to its canonical path and verify that it resides under the repository root before including it in the ZIP. Optionally, treat symlinks as non-exportable or include them only as symbolic entries without dereferencing targets.

Adopt a consistent file-handling policy that never trusts repository content to define paths freely, always performs canonicalization and boundary checks before file access, and incorporates these rules into code review guidelines, static analysis, and automated tests for any new export or archive functionality.

Find out what's already
exploitable in your codebase.