CVE-2026-58624

Source
https://cve.org/CVERecord?id=CVE-2026-58624
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-58624.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-58624
Downstream
Related
Published
2026-07-20T20:27:39.070Z
Modified
2026-07-29T03:47:22.969240507Z
Severity
  • 5.4 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L CVSS Calculator
Summary
Apache MINA SSHD: Remote execution of JGit commands can write files on the server
Details

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.

Database specific
{
    "cwe_ids": [
        "CWE-20"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/58xxx/CVE-2026-58624.json",
    "cna_assigner": "apache",
    "unresolved_ranges": [
        {
            "source": "AFFECTED_FIELD",
            "extracted_events": [
                {
                    "introduced": "2.0.0"
                },
                {
                    "last_affected": "2.18.0"
                },
                {
                    "introduced": "3.0.0-M1"
                },
                {
                    "last_affected": "3.0.0-M4"
                }
            ]
        }
    ]
}
References

Affected packages

Git / github.com/apache/mina-sshd

Affected ranges

Type
GIT
Repo
https://github.com/apache/mina-sshd
Events
Database specific
{
    "cpe": [
        "cpe:2.3:a:apache:mina_sshd:*:*:*:*:*:*:*:*",
        "cpe:2.3:a:apache:mina_sshd:3.0.0:m1:*:*:*:*:*:*",
        "cpe:2.3:a:apache:mina_sshd:3.0.0:m2:*:*:*:*:*:*",
        "cpe:2.3:a:apache:mina_sshd:3.0.0:m3:*:*:*:*:*:*",
        "cpe:2.3:a:apache:mina_sshd:3.0.0:m4:*:*:*:*:*:*"
    ],
    "source": [
        "CPE_RANGE",
        "CPE_STRING"
    ],
    "extracted_events": [
        {
            "introduced": "2.0.0"
        },
        {
            "fixed": "2.19.0"
        },
        {
            "introduced": "3.0.0-m1"
        },
        {
            "last_affected": "3.0.0-m1"
        },
        {
            "introduced": "3.0.0-m2"
        },
        {
            "last_affected": "3.0.0-m2"
        },
        {
            "introduced": "3.0.0-m3"
        },
        {
            "last_affected": "3.0.0-m3"
        },
        {
            "introduced": "3.0.0-m4"
        },
        {
            "last_affected": "3.0.0-m4"
        }
    ]
}

Affected versions

3.*
3.0.0-m1
3.0.0-m2
3.0.0-m3
3.0.0-m4
sshd-2.*
sshd-2.0.0
sshd-2.1.0
sshd-2.10.0
sshd-2.11.0
sshd-2.12.0
sshd-2.12.1
sshd-2.13.0
sshd-2.13.1
sshd-2.14.0
sshd-2.15.0
sshd-2.16.0
sshd-2.17.0
sshd-2.17.1
sshd-2.18.0
sshd-2.2.0
sshd-2.3.0
sshd-2.4.0
sshd-2.5.0
sshd-2.5.1
sshd-2.6.0
sshd-2.7.0
sshd-2.8.0
sshd-2.9.0
sshd-2.9.1
sshd-2.9.2
sshd-3.*
sshd-3.0.0-M1
sshd-3.0.0-M2
sshd-3.0.0-M4

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-58624.json"