Skip to main content

Apache MINA SSHD CVE-2026-58624

| EUVDEUVD-2026-46101 MEDIUM
Improper Input Validation (CWE-20)
2026-07-20 apache GHSA-7229-w5mh-32hm
5.4
CVSS 3.1 · Vendor: apache
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain valid SSH account on target server
  2. Delivery
    Connect via SSH to MINA SSHD with GitPgmCommandFactory
  3. Exploit
    Issue git archive --output=/sensitive/path HEAD
  4. Execution
    JGit writes archive to arbitrary server-side path
  5. Impact
    Overwrite authorized_keys or git hook to achieve persistence or code execution

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation, allowlisting
Exploitation Conditions

Exploitation requires three concurrent conditions: (1) the attacker must hold a valid SSH account on the target server - CVSS PR:L confirms authentication is mandatory and no unauthenticated path exists; (2) the server must be explicitly configured to use GitPgmCommandFactory from org.apache.sshd:sshd-git - this is a non-default, opt-in deployment choice and is the single most significant limiting factor, as all standard MINA SSHD deployments are entirely unaffected; (3) the SSH-authenticated user must have network connectivity to the SSH port. The practical impact of arbitrary file writes is further bounded by the OS-level permissions of the SSHD process - writes are constrained to paths writable by the server process user. These conditions collectively restrict the vulnerable population to teams who have built custom git-hosting solutions on MINA SSHD using this specific factory.

Impact

The vendor CVSS vector (AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L) correctly reflects network accessibility and required SSH authentication (PR:L), but the Integrity:Low rating likely understates real-world impact for deployments where the SSH process has write access to sensitive paths such as ~/.ssh/authorized_keys, git hook directories, or web roots - scenarios common in self-hosted git infrastructure. The Availability:Low rating appears to reflect potential disk exhaustion from archive writes rather than a primary attack goal. No EPSS data was supplied and no KEV listing exists, indicating no confirmed active exploitation. The non-default configuration prerequisite (GitPgmCommandFactory must be explicitly enabled) substantially limits the exposed population - this is not a vulnerability in core MINA SSHD. Risk is real but scoped: highest for teams running custom git-hosting services on MINA SSHD with this factory enabled, negligible for all other MINA SSHD deployments.

Exploit ScenarioDerived

An attacker with valid SSH credentials connects to a MINA SSHD server configured with GitPgmCommandFactory and issues a git archive --output=/home/git/.ssh/authorized_keys HEAD command, overwriting the server's authorized_keys file with attacker-controlled content and gaining persistent SSH access without credentials. No public exploit code has been identified, but the attack requires only standard SSH and git client tooling available on any developer workstation.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 20, 2026

Arbitrary file write in Apache MINA SSHD's sshd-git component enables any SSH-authenticated user to write files to arbitrary server filesystem paths via the JGit git archive --output argument. Servers are only affected when explicitly configured with GitPgmCommandFactory; the vulnerability does not exist in default MINA SSHD deployments. No public exploit code or CISA KEV listing exists at time of analysis; vendor-confirmed fixes are available in versions 2.19.0 and 3.0.0-M5.

RemediationAI

Upgrade to Apache MINA SSHD 2.19.0 (stable) or 3.0.0-M5 (milestone), which are the vendor-confirmed fixed releases per the advisory at https://lists.apache.org/thread/7c3cry6pdy6hj1q0f28rc72x4o4tlyjo. These versions restrict JGit command execution to a whitelist of safe, read-oriented commands and suppress the --output argument in git archive invocations, returning archive data through the SSH channel instead. As an immediate compensating control prior to patching, remove GitPgmCommandFactory from the SSH server configuration entirely - this eliminates the attack surface with the trade-off of disabling all git-over-SSH functionality. If git access cannot be suspended, restrict SSH authorized_keys entries using the command= directive to limit which git operations individual keys may invoke, and ensure the SSHD process runs under a minimally privileged OS user account without write access to sensitive directories.

Affected VersionsENISA

Apache Mina SSHD 2.0.0 ≤2.18.0
Apache Mina SSHD 3.0.0-M1 ≤3.0.0-M4

Affected Packages

euvd apache_mina_sshd no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Apache MINA SSHD (CPE: cpe:2.3:a:apache_software_foundation:apache_mina_sshd) is a Java library providing SSH client and server functionality. The affected subcomponent org.apache.sshd:sshd-git exposes a GitPgmCommandFactory that proxies JGit commands to SSH clients, enabling git-over-SSH hosting. CWE-20 (Improper Input Validation) identifies the root cause: the factory applied no allowlist on which JGit commands or arguments were permitted, so the full JGit command surface was accessible. Critically, git archive accepts an --output flag that redirects archive content to a local filesystem path rather than through the SSH channel - a capability that is legitimate in local git usage but dangerous when exposed to remote SSH clients without sanitization. The fix explicitly allowlists safe commands and strips the --output argument from git archive invocations, routing archive output back through the SSH channel exclusively.

Know when Apache Mina Sshd gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (apache) PRIMARY 5.4 LOW
AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L
vuln.today AI 6.5 MEDIUM

Arbitrary file write to any OS-accessible path warrants I:H; SSH authentication is mandatory (PR:L); no confidentiality or availability impact is described.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
SUSE MEDIUM
Red Hat 5.4 MEDIUM

Primary rating from Vendor (apache).

CVSS VectorVendor: apache

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
Low

Lifecycle Timeline

3
Severity Changed
Jul 20, 2026 - 21:22 NVD
LOW MEDIUM
CVSS changed
Jul 20, 2026 - 21:22 NVD
5.4 (LOW) 5.4 (MEDIUM)
CVE Published
Jul 20, 2026 - 20:27 cve.org
MEDIUM 5.4

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.2%
Top 87% exploitable
Prevalence
Low
niche Java SSH library used mainly in custom git hosting tooling
Social Media
2
Sightings
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

27
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +27
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
openSUSE Tumbleweed Fixed
SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS Affected
SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS Affected
SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS Affected
SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy