Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐹
🐹 Go
Not in CISA KEV
CRITICAL severity

GHSA-2q4c-3mrw-63c3 — kopia

CRITICALFix: kopia/kopia#5354

GHSA-2q4c-3mrw-63c3 is a critical-severity (CVSS 9.8) OS Command Injection vulnerability in github.com/kopia/kopia. A fix is available for github.com/kopia/kopia — see the affected versions and patch details below.

Kopia: RCE via SSH ProxyCommand Injection

Also known asCVE-2026-45695GO-2026-5009
Published
May 19, 2026
Updated
Jun 2, 2026
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Sep 30, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
  • A successful exploit gives an attacker total control of the affected component, not partial access.
  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for GHSA-2q4c-3mrw-63c3.

EPSS Exploitation Probability

via FIRST.org ↗
1.6%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs75th percentile — riskier than 75% of all scored CVEsHighest risk
1.11%1.44%1.78%2.11%1.6%1.6%Sep 26Sep 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

GHSA-2q4c-3mrw-63c3 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.

Where this sits among everything scored

Of 380,526 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.

Real-World Exposure

1 pkg affected
🐹github.com/kopia/kopia

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.

Description

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.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐹Gogithub.com/kopia/kopiaall versions0.23.0go get github.com/kopia/kopia@v0.23.0

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/kopia/kopia, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update github.com/kopia/kopia to 0.23.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-2q4c-3mrw-63c3 is resolved across your whole dependency graph.

  3. Workarounds

    Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.

How to detect GHSA-2q4c-3mrw-63c3

A community-maintained Nuclei template exists for this CVE. You can scan for it directly:

nuclei -id ghsa-2q4c-3mrw-63c3 -u https://target
Template
Kopia Server 0.23.0 - Remote Code Execution
Severity
critical
Impact
An unauthenticated attacker can execute arbitrary commands as the Kopia server process (often root in a container), leading to full host compromise and access to all managed backup data.
Remediation
Upgrade to Kopia 0.23.0 or later, which refuses to bind an unauthenticated server to a non-loopback address. Do not expose the server with --without-password on untrusted networks.

Template by ProjectDiscovery nuclei-templates (kenlacroix), MIT licensed. View the full template. Scan only systems you are authorised to test.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatModerate

Red Hat Product Security considers this bug as Moderate as this requires active change of out of box configaration for this bug to be exploitable. There is no common use case under which Kopia HTTP server should be started without a password. The diecrepancy in CVSS scores between Red Hat and NVD comes from the…

Workaround published by Red Hat
This bug can be rendered unusable by making sure that --without-password is not included in startup options for Kopia HTTP server.
Source: Red Hat security advisory for GHSA-2q4c-3mrw-63c3 (CC BY 4.0)

Frequently Asked Questions

## 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
O3 Security · Impact-Aware SCA

Is GHSA-2q4c-3mrw-63c3 in your dependencies?

Find it across Go, including transitive dependencies.

GHSA-2q4c-3mrw-63c3: kopia (Critical 9.8) | O3 Security