Vulnerabilities in pkg:maven/org.apache.sshd/sshd-mina
PACKAGECVE-2021-30129 is a HIGH (CVSS 7.5) buffer overflow vulnerability (CWE-772: Missing Release of Resource after Effective Lifetime) affecting Sshd mina libraries in the Maven ecosystem. The issue involves buffer overflow in apache mina sshd. Remediation is available by upgrading affected packages to version 2.7.0.
pkg:maven/org.apache.sshd/sshd-mina
Vulnerability advisories affecting package pkg:maven/org.apache.sshd/sshd-mina. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-9279-7hph-r3xw | CVE-2021-30129 | HIGH | Buffer Overflow in Apache Mina SSHD |
CVE-2021-30129 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2021-30129
To remediate this vulnerability, upgrade all affected Sshd mina dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.apache.sshd</groupId>
<artifactId>sshd-mina</artifactId>
<version>2.7.0</version>
</dependency>
<dependency>
<groupId>org.apache.sshd</groupId>
<artifactId>sshd-core</artifactId>
<version>2.7.0</version>
</dependency>
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-2021-30129, 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 mina in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.7.0), 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-772: Missing Release of Resource after Effective Lifetime, where the product does not release a resource after its effective lifetime has ended, i.e., after the resource is no longer needed. In Sshd mina, 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
CVE-2021-30129 Affected Sshd mina Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.apache.sshd:sshd-mina
|
Maven |
≥ 2.0.0
< 2.7.0
|
2.7.0
|
|
org.apache.sshd:sshd-core
|
Maven |
≥ 2.0.0
< 2.7.0
|
2.7.0
|
References
Frequently Asked Questions
What is CVE-2021-30129?
Which Sshd mina versions are affected?
What version fixes CVE-2021-30129?
Is sshd-mina affected?
Is sshd-core affected?
What is the CVSS score of CVE-2021-30129?
What CWE is associated with CVE-2021-30129?
How can I check Maven dependencies for CVE-2021-30129?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9279-7hph-r3xw",
"modified" : "2021-07-26T23:00:52Z",
"published" : "2021-08-02T16:54:09Z",
"aliases" : [ "CVE-2021-30129" ],
"summary" : "Buffer Overflow in Apache Mina SSHD",
"details" : "A vulnerability in sshd-core of Apache Mina SSHD allows an attacker to overflow the server causing an OutOfMemory error. This issue affects the SFTP and port forwarding features of Apache Mina SSHD version 2.0.0 and later versions. It was addressed in Apache Mina SSHD 2.7.0",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.sshd:sshd-mina"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.7.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.sshd:sshd-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.7.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-30129"
}, {
"type" : "WEB",
"url" : "https://issues.apache.org/jira/browse/SSHD-1125"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/r6d4f78e192a0c8eabd671a018da464024642980ecd24096bde6db36f%40%3Cusers.mina.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/r6d4f78e192a0c8eabd671a018da464024642980ecd24096bde6db36f@%3Cusers.mina.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/red01829efa2a8c893c4baff4f23c9312bd938543a9b8658e172b853b@%3Cannounce.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://www.oracle.com/security-alerts/cpuapr2022.html"
}, {
"type" : "WEB",
"url" : "https://www.oracle.com/security-alerts/cpujul2022.html"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2021/07/12/1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-772" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2021-07-13T23:19:33Z",
"nvd_published_at" : "2021-07-12T12:15:00Z"
}
}