/

CVE-2026-23535

Severity:

HIGH RISK

(8.0)

Directory Traversal / Path Traversal in Weblate wlc

CVE-2026-23535

Analyzed

Vulnerability type

Category:

Directory Traversal / Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Write on Client System

Severity:

HIGH RISK

(8.0)

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

The wlc Weblate command-line client contained a directory traversal flaw in its multi-translation download feature, allowing a malicious or compromised Weblate server to cause files to be written outside the intended download directory.

When a client connected to a crafted server, that server could instruct wlc to write translation data to arbitrary locations on the client filesystem, potentially overwriting or planting files in sensitive paths.

Affected context

This vulnerability affects environments where the wlc command-line client is used to interact with a Weblate instance over its REST API.

The risk is present when:

  • wlc is configured to use the multi-translation download feature, and
  • the Weblate server is malicious, compromised, or otherwise untrusted, and
  • the client machine treats wlc as a trusted tool and runs it with standard user privileges or higher.

In such cases, file paths provided by the server are not sufficiently constrained to a safe directory on the client.

Exploit preconditions

  • Attack surface: The wlc client process running on the user's machine.
  • Required access: Ability to control or impersonate the Weblate server endpoint contacted by wlc (e.g., a malicious instance, compromised server, or man-in-the-middle that can alter server responses).
  • Trigger point: Invoking the multi-translation download operation in wlc, which processes file paths from the server to store downloaded translations.
  • Why exploitation is possible: The client relies on server-provided paths and lacks proper normalization and validation to ensure these paths remain within an intended directory, enabling directory traversal sequences (such as parent-directory references) to redirect writes to arbitrary locations.

Why this happens

The underlying issue is improper validation of server-controlled filesystem paths on the client side, aligning with CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').

The wlc client trusted path information supplied via the Weblate REST API and used it to construct local filenames without enforcing a strict, pre-defined root directory or rejecting unsafe patterns.

As a result, crafted responses from a malicious or compromised server could include traversal elements or absolute paths that caused the client to write files outside the intended download directory.

Potential impact

  • Overwriting existing files in user-writable locations (e.g., configuration files, scripts, or application data).
  • Planting new files in directories accessible to the current user, which may assist subsequent attacks.
  • Potential execution of attacker-controlled files if they are written into locations that are later executed or loaded by other software.
  • Leakage or corruption of project-related data by overwriting or misplacing translation files.

General mitigation guidance

Effective mitigation focuses on constraining file writes and reducing trust in server-supplied paths:

  • Normalize and validate all paths received from the server before use, rejecting any that resolve outside a predefined, dedicated download directory.
  • Use a strict mapping from server-side identifiers (e.g., component or language IDs) to local filenames, rather than accepting arbitrary filenames or directories from the server.
  • Enforce a single, immutable root directory for all downloads performed by wlc, preventing writes to other parts of the filesystem.
  • Run command-line clients with the least privileges necessary and avoid invoking them from contexts where a file write could have elevated consequences (e.g., as root or within sensitive system directories).
  • Treat remote services, even those typically trusted, as potentially untrusted sources, and design client-side logic to validate all filesystem-related directives.

How teams detect issues like this

Organizations can look for this class of issue and its symptoms through multiple approaches:

  • Static analysis: Configure rules or patterns to detect uses of server- or user-controlled strings in file path construction without prior normalization and restriction to a known base directory.
  • Code review: Pay attention to client components that:
  • Construct local paths from API responses,
  • Do not apply canonicalization (e.g., resolving ".." segments),
  • Omit checks that ensure the final path starts with an expected base directory.
  • Runtime monitoring: Observe client usage in controlled tests by pointing it to a test server that returns maliciously crafted paths and verifying that the client refuses to write outside its designated directory.
  • Policy enforcement: Adopt internal guidelines that all network-fed filenames undergo sanitization and that clients never honor arbitrary remote file path directives.

Sources

SourceLink
github.comgithub.com/WeblateOrg/wlc/commit/216e691c6e50abae97fe2e4e4f21501bf49a585f
github.comgithub.com/WeblateOrg/wlc/pull/1128
github.comgithub.com/WeblateOrg/wlc/releases/tag/1.17.2
github.comgithub.com/WeblateOrg/wlc/security/advisories/GHSA-mmwx-79f6-67jg

Frequently asked

questions

Yes, but indirectly. Exploitation occurs when a local user runs wlc against a malicious or compromised Weblate server that responds with crafted paths. The attacker does not need local access but must control or influence the server endpoint.

The attacker needs control over the Weblate instance (or equivalent ability to tamper with responses) that the wlc client communicates with. They do not need direct access to the client machine beyond the user's act of running wlc.

The most robust fix is to strictly constrain all files written by wlc to a predefined download directory, normalize and canonicalize any path components, and reject any server-provided paths that resolve outside this directory or contain traversal patterns.

Treat all network-supplied paths as untrusted input, enforce strong path validation on the client side, adopt a "fixed root directory" model for file operations, and incorporate code review and static analysis checks specifically targeting path traversal and arbitrary file write patterns.

Find out what's already
exploitable in your codebase.