Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-48827

CVE-2026-48827: Apache Mina SSHD Path Traversal Flaw

CVE-2026-48827 is a path traversal vulnerability in Apache MINA SSHD sshd-git that allows authenticated SSH users to access git repositories outside the configured root directory. This article covers technical details, affected versions, impact, and mitigation strategies.

Published:

CVE-2026-48827 Overview

CVE-2026-48827 is a path traversal vulnerability [CWE-22] in the Apache MINA SSHD sshd-git bundle. The flaw stems from missing path validation in git-upload-pack, git-receive-pack, and other git operations exposed over SSH. Authenticated SSH users can escape the configured git server root directory and access repositories outside the intended boundary.

The vulnerability affects applications that depend on org.apache.sshd:sshd-git. Applications that do not use the sshd-git bundle remain unaffected. Apache MINA SSHD 2.18.0 and 3.0.0-M4 contain the fix.

Critical Impact

Authenticated SSH users can read and interact with git repositories outside the configured server root, exposing source code and project data hosted on the same MINA SSHD instance.

Affected Products

  • Apache MINA SSHD versions prior to 2.18.0 (when using sshd-git)
  • Apache MINA SSHD 3.0.0-M1 through 3.0.0-M3 pre-release milestones
  • Applications embedding org.apache.sshd:sshd-git for SSH-based git hosting

Discovery Timeline

  • 2026-06-01 - CVE-2026-48827 published to NVD
  • 2026-06-01 - Last updated in NVD database

Technical Details for CVE-2026-48827

Vulnerability Analysis

The Apache MINA SSHD project provides a Java implementation of the SSH protocol, including an optional sshd-git bundle that exposes git operations over SSH. The bundle handles git-upload-pack (fetch and clone operations) and git-receive-pack (push operations) by resolving the requested repository path relative to a configured root directory.

The vulnerability arises because the request handler does not validate that the resolved repository path stays within the configured root. An authenticated SSH client can submit a repository path containing traversal sequences such as ../ to reference filesystem locations outside the git server root. The handler then performs the requested git operation against the traversed path.

The impact depends on the filesystem layout and process privileges. An attacker can clone, fetch, or push to repositories the host process can read or write, even when those repositories were not intended to be exposed over SSH. The Apache advisory notes that production git servers should not rely on filesystem layout alone and should enforce additional access controls per repository.

Root Cause

The root cause is missing canonicalization and boundary checks on repository paths supplied by the SSH client. The sshd-git request handlers accept the client-supplied path and concatenate it with the configured root without verifying that the canonical resolved path remains a descendant of that root.

Attack Vector

Exploitation requires valid SSH credentials and network access to the MINA SSHD listener. After authenticating, the attacker issues a git-over-SSH command and supplies a repository path containing parent-directory traversal segments. The handler resolves the path against the git root, follows the traversal, and serves the out-of-scope repository to the git client. No user interaction is required beyond running a standard git client against the malicious URL.

No proof-of-concept code has been published for CVE-2026-48827. See the Apache Mailing List Thread and OpenWall OSS Security Update for the original advisories.

Detection Methods for CVE-2026-48827

Indicators of Compromise

  • SSH session logs containing git command invocations with paths that include ../ or absolute path prefixes outside the configured git root.
  • Access to git repositories on the host that were never published in the application's repository inventory.
  • Unexpected git-upload-pack or git-receive-pack process arguments referencing directories outside the SSHD git root.

Detection Strategies

  • Inspect application logs from any service embedding org.apache.sshd:sshd-git for repository path parameters and flag entries containing traversal sequences.
  • Compare the list of repositories actually served by the process against the expected inventory derived from configuration.
  • Audit dependency manifests (pom.xml, build.gradle) across internal Java services to identify hosts running affected versions of sshd-git.

Monitoring Recommendations

  • Enable verbose SSH session logging for any service that exposes git operations and forward logs to a centralized analytics platform.
  • Monitor filesystem access by the SSHD process for reads or writes outside the configured git root directory.
  • Alert on authentication anomalies on the git-over-SSH listener, including unusual source IPs and high-volume clone activity from a single account.

How to Mitigate CVE-2026-48827

Immediate Actions Required

  • Upgrade Apache MINA SSHD to 2.18.0 for the stable line, or to 3.0.0-M4 for environments running the 3.0.0 pre-release milestones.
  • Inventory all internal Java applications and confirm whether they include org.apache.sshd:sshd-git; applications without this bundle are not affected.
  • Restrict network exposure of the SSHD git listener to trusted networks and audit which accounts have SSH access while patches are deployed.

Patch Information

The Apache MINA project addressed CVE-2026-48827 in Apache MINA SSHD 2.18.0 and in the 3.0.0-M4 pre-release milestone. Both releases add path validation to git-upload-pack, git-receive-pack, and related git operations to ensure the resolved repository path remains within the configured root. Refer to the Apache Mailing List Thread for the official release announcement.

Workarounds

  • Disable the sshd-git bundle in affected applications until the upgrade is complete if git-over-SSH access is not essential.
  • Apply per-repository authorization in the application layer rather than relying solely on filesystem permissions, as recommended by the Apache advisory.
  • Run the SSHD process under a dedicated low-privilege account whose filesystem access is limited to the intended git root directory.
bash
# Example Maven dependency update to the fixed release
# pom.xml
# <dependency>
#   <groupId>org.apache.sshd</groupId>
#   <artifactId>sshd-git</artifactId>
#   <version>2.18.0</version>
# </dependency>
mvn versions:set-property -Dproperty=sshd.version -DnewVersion=2.18.0
mvn dependency:tree | grep sshd-git

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.