CVE-2026-58624 Apache MINA SSHD: Remote execution of JGit commands can write files on the server
Authenticated SSH users can write files to arbitrary server locations via unrestricted JGit commands in Apache MINA SSHD when GitPgmCommandFactory is enabled.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-58624?
CVE-2026-58624 is a medium-severity path traversal vulnerability in Apache MINA SSHD, published on 20 Jul 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
Improper input validation in sshd-git in Apache MINA SSHD. Apache MINA SSHD is a Java library for client-side and server-side SSH.
Component org.apache.sshd:sshd-git provides though its GitPgmCommandFactory a way to configure an Apache MINA SSHD server such that SSH clients can remotely execute git commands via the JGit library on git repositories stored on the server.
This GitPgmCommandFactory allowed a user authenticated via SSH to run any JGit command available, including commands that could write files at arbitrary places such as git archive with the --output option.
Affected are SSH servers implemented with Apache MINA SSHD and using the GitPgmCommandFactory. If the GitPgmCommandFactory is not configured on the server, the server is not affected.
It is recommended to upgrade affected servers to Apache MINA SSHD 2.19.0 or 3.0.0-M5, which fix this issue.
The issue is fixed by restricting the available commands to a small whitelist of uncritical commands (such as git log). git archive is also allowed, but its --output argument is ignored and the archive is always sent through the SSH channel to the client.
Weakness: CWE-20
Which versions are affected by CVE-2026-58624?
It affects 1 product.
Products include Apache Mina Sshd.
How do I fix CVE-2026-58624?
Upgrade to a fixed version.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2026-58624 being exploited?
There is no known exploitation of CVE-2026-58624 in the wild and no public exploit code.
Other vulnerabilities in Apache MINA SSHD
- CVE-2026-56452 Apache MINA SSHD: Path traversal in SCP file reception
- CVE-2026-56624 Apache MINA SSHD: SSH certificate options lack validations
- CVE-2026-56623 Apache MINA SSHD: Path traversal in org.apache.sshd:sshd-git on Windows
- CVE-2026-48827 Apache MINA SSHD: Path traversal in org.apache.sshd:sshd-git
- CVE-2024-41909 Apache MINA SSHD: integrity check bypass
Sources
Also known as DEBIAN-CVE-2026-58624, GHSA-7229-w5mh-32hm, UBUNTU-CVE-2026-58624.