# CVE-2026-58624: Apache MINA SSHD: Remote execution of JGit commands can write files on the server

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.4
- **CVSS:** 5.4 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: Low; Availability impact: Low
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 0.64% (percentile 45, 2026-11-26)
- **CWE:** CWE-20
- **Published:** 2026-07-20T20:27:39.070Z
- **Modified:** 2026-10-24T20:10:00.137Z

## Who should check

- Anyone running Apache Software Foundation Apache MINA SSHD \>= 2.0.0, \<= 2.18.0; \>= 3.0.0-M1, \<= 3.0.0-M4

## 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.

## Affected and fixed versions

- Apache Software Foundation Apache MINA SSHD: \>= 2.0.0, \<= 2.18.0; \>= 3.0.0-M1, \<= 3.0.0-M4 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-58624. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-58624.md
Affected: Apache Software Foundation Apache MINA SSHD >= 2.0.0, <= 2.18.0; >= 3.0.0-M1, <= 3.0.0-M4
Fixed in: no fixed version listed yet

Steps:
1. Search this machine and project for Apache Software Foundation Apache MINA SSHD: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-58624 being exploited?

There is no confirmed exploitation: CVE-2026-58624 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.64% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-58624?

Medium: CVSS 5.4 (v3.1, scored by CNA). Remote, login needed.

### Which versions are affected by CVE-2026-58624?

Apache Software Foundation Apache MINA SSHD \>= 2.0.0, \<= 2.18.0; \>= 3.0.0-M1, \<= 3.0.0-M4.

### Is there a fix for CVE-2026-58624?

No fixed version is listed in the sources yet. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2026-58624?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://lists.apache.org/thread/7c3cry6pdy6hj1q0f28rc72x4o4tlyjo>
- other: <http://www.openwall.com/lists/oss-security/2026/07/20/18>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-58624>

HTML: <https://flawdb.com/CVE-2026-58624> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-58624>
