Mend.io Vulnerability Database
The largest open source vulnerability database
What is a Vulnerability ID?
New vulnerability? Tell us about it!
CVE-2026-45695
Published:June 05, 2026
Updated:June 05, 2026
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" (https://github.com/kopia/kopia/blob/v0.22.3/internal/server/server_authz_checks.go#L61-L73): 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" (https://github.com/kopia/kopia/blob/v0.22.3/repo/blob/sftp/sftp_storage.go#L448-L468): "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.
Affected Packages
https://github.com/kopia/kopia.git (GITHUB):
Affected version(s) >=v0.3.0-rc1 <v0.23.0
Fix Suggestion:
Update to version v0.23.0
Do you need more information?
Contact Us
CVSS v4
Base Score:
9.3
Attack Vector
NETWORK
Attack Complexity
LOW
Attack Requirements
NONE
Privileges Required
NONE
User Interaction
NONE
Vulnerable System Confidentiality
HIGH
Vulnerable System Integrity
HIGH
Vulnerable System Availability
HIGH
Subsequent System Confidentiality
NONE
Subsequent System Integrity
NONE
Subsequent System Availability
NONE
CVSS v3
Base Score:
9.8
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Weakness Type (CWE)
Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Missing Authentication for Critical Function