Vulnerabilities in pkg:maven/org.apache.sshd/sshd-core

PACKAGE
Advisory Identifier: GHSA-mjmq-gwgm-5qhm
Advisory Summary

CVE-2023-35887 is a MODERATE (CVSS 5.0) apache mina sshd information disclosure vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting Sshd common libraries in the Maven ecosystem. The issue involves apache mina sshd information disclosure vulnerability. Remediation is available by upgrading affected packages to version 2.9.3, 2.1.0.

3 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.apache.sshd/sshd-core

3 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/org.apache.sshd/sshd-core. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-mjmq-gwgm-5qhm CVE-2023-35887 MODERATE Apache MINA SSHD information disclosure vulnerability
GHSA-fhw8-8j55-vwgq CVE-2022-45047 CRITICAL Unsafe deserialization in Apache MINA SSHD
GHSA-9279-7hph-r3xw CVE-2021-30129 HIGH Buffer Overflow in Apache Mina SSHD

CVE-2023-35887 at a Glance

CVE Identifier CVE-2023-35887
GHSA Identifier GHSA-mjmq-gwgm-5qhm
Severity MODERATE
CVSS v3.1 Base Score 5.0
CWE Classification CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
Affected Product Sshd common
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 5.0

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2023-35887

To remediate this vulnerability, upgrade all affected Sshd common dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.apache.sshd:sshd-common fixed: 2.9.3
<dependency>
    <groupId>org.apache.sshd</groupId>
    <artifactId>sshd-common</artifactId>
    <version>2.9.3</version>
</dependency>
org.apache.sshd:sshd-sftp fixed: 2.9.3
<dependency>
    <groupId>org.apache.sshd</groupId>
    <artifactId>sshd-sftp</artifactId>
    <version>2.9.3</version>
</dependency>
org.apache.sshd:sshd-core fixed: 2.1.0
<dependency>
    <groupId>org.apache.sshd</groupId>
    <artifactId>sshd-core</artifactId>
    <version>2.1.0</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.apache.sshd

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2023-35887, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.apache.sshd

Analyze the terminal output to locate any version of Sshd common in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.9.3), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.apache.sshd command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. In Sshd common, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Exposure of Sensitive Information to an Unauthorized Actor vulnerability in Apache Software Foundation Apache MINA. In SFTP servers implemented using Apache MINA SSHD that use a RootedFileSystem, logged users may be able to discover "exists/does not exist" information about items outside the rooted tree via paths including parent navigation ("..") beyond the root, or involving symlinks. This issue affects Apache MINA: from 1.0 before 2.9.3 Users are recommended to upgrade to 2.9.3 Until version 2.1.0, some of the code affected by this vulnerability appeared in org.apache.sshd:sshd-core. Version 2.1.0 contains a [commit](https://github.com/apache/mina-sshd/commit/10de190e7d3f9189deb76b8d08c72334a1fe2df0) where the code was moved to the package org.apache.sshd:sshd-common, which did not exist until version 2.1.0.

CVE-2023-35887 Affected Sshd common Versions

3 component(s)
Fixed Versions:
2.9.32.1.0
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.sshd:sshd-common
Maven
≥ 2.1.0
< 2.9.3
2.9.3
org.apache.sshd:sshd-sftp
Maven
≥ 1.0.0
< 2.9.3
2.9.3
org.apache.sshd:sshd-core
Maven
≥ 1.0.0
< 2.1.0
2.1.0

References

Frequently Asked Questions

What is CVE-2023-35887?
CVE-2023-35887 is a security vulnerability in Sshd common involving Apache MINA SSHD information disclosure vulnerability under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.
Which Sshd common versions are affected?
Affected versions include releases prior to 2.9.3, 2.1.0 across affected packages: org.apache.sshd:sshd-common, org.apache.sshd:sshd-sftp, org.apache.sshd:sshd-core.
What version fixes CVE-2023-35887?
Upgrading to 2.9.3, 2.1.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is sshd-common affected?
Yes, org.apache.sshd:sshd-common is affected in releases prior to 2.9.3. Upgrade your dependency to 2.9.3 or later.
Is sshd-sftp affected?
Yes, org.apache.sshd:sshd-sftp is affected in releases prior to 2.9.3. Upgrade your dependency to 2.9.3 or later.
What is the CVSS score of CVE-2023-35887?
CVE-2023-35887 has a CVSS v3.1 base score of 5.0 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N.
What CWE is associated with CVE-2023-35887?
CVE-2023-35887 is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor (The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.).
How can I check Maven dependencies for CVE-2023-35887?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.sshd'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-mjmq-gwgm-5qhm",
  "modified" : "2023-12-07T18:20:03Z",
  "published" : "2023-07-10T18:30:49Z",
  "aliases" : [ "CVE-2023-35887" ],
  "summary" : "Apache MINA SSHD information disclosure vulnerability",
  "details" : "Exposure of Sensitive Information to an Unauthorized Actor vulnerability in Apache Software Foundation Apache MINA.\n\nIn SFTP servers implemented using Apache MINA SSHD that use a RootedFileSystem, logged users may be able to discover \"exists/does not exist\" information about items outside the rooted tree via paths including parent navigation (\"..\") beyond the root, or involving symlinks.\n\nThis issue affects Apache MINA: from 1.0 before 2.9.3 Users are recommended to upgrade to 2.9.3\n\nUntil version 2.1.0, some of the code affected by this vulnerability appeared in org.apache.sshd:sshd-core. Version 2.1.0 contains a [commit](https://github.com/apache/mina-sshd/commit/10de190e7d3f9189deb76b8d08c72334a1fe2df0) where the code was moved to the package org.apache.sshd:sshd-common, which did not exist until version 2.1.0.\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.sshd:sshd-common"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.1.0"
      }, {
        "fixed" : "2.9.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.sshd:sshd-sftp"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.0.0"
      }, {
        "fixed" : "2.9.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.sshd:sshd-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.0.0"
      }, {
        "fixed" : "2.1.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-35887"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/mina-sshd/pull/362"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/mina-sshd/commit/10de190e7d3f9189deb76b8d08c72334a1fe2df0"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/mina-sshd/commit/a61e93035f06bff8fc622ad94870fb773d48b9f0"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/mina-sshd/commit/c20739b43aab0f7bf2ccad982a6cb37b9d5a8a0b"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/mina-sshd"
  }, {
    "type" : "WEB",
    "url" : "https://issues.apache.org/jira/browse/SSHD-1324"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread/b9qgtqvhnvgfpn0w1gz918p21p53tqk2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200", "CWE-22" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-07-10T21:53:01Z",
    "nvd_published_at" : "2023-07-10T16:15:53Z"
  }
}