The vulnerability is an argument injection flaw in Weblate's SSH management console, identified as CVE-2026-24126. The root cause is the lack of input validation on the hostname provided when adding a new SSH host key. An attacker with administrative access could provide a crafted hostname (e.g., starting with a hyphen like -oProxyCommand=...) to inject malicious arguments into the ssh-keyscan command executed by the server.
The primary entry point is the weblate.wladmin.views.ssh view, which handles the form submission from the management interface. The user-supplied host was passed through the SSHAddForm without proper validation. This unvalidated input was then passed to the weblate.vcs.ssh.add_host_key function, which constructs and executes the ssh-keyscan command, leading to command injection.
A secondary, related vector existed in the weblate.trans.models.component.Component.add_ssh_host_key method, which could also call add_host_key with an unvalidated hostname extracted from a repository URL.
The patch addresses this vulnerability by introducing strict hostname validation using a DomainOrIPValidator in two places: directly in the SSHAddForm for the management console and within a new extract_url_host_port utility function used when parsing repository URLs.