CVE-2021-41973: Mina core Infinite Loop Vulnerability
MODERATECVE-2021-41973 is a MODERATE (CVSS 6.5) infinite loop vulnerability (CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')) affecting Mina core libraries in the Maven ecosystem. The issue involves infinite loop in apache mina. Remediation is available by upgrading affected packages to version 2.1.5, 2.0.22.
CVE-2021-41973 at a Glance
Security Impact
CVSS: 6.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:R/S:U/C:N/I:N/A:H).
How to Fix CVE-2021-41973
To remediate this vulnerability, upgrade all affected Mina core 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.mina</groupId>
<artifactId>mina-core</artifactId>
<version>2.1.5</version>
</dependency>
<dependency>
<groupId>org.apache.mina</groupId>
<artifactId>mina-core</artifactId>
<version>2.0.22</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.mina
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2021-41973, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.apache.mina
Analyze the terminal output to locate any version of Mina core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.1.5), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.apache.mina 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-835: Loop with Unreachable Exit Condition ('Infinite Loop'), where the product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop. In Mina core, 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-41973 Affected Mina core Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.apache.mina:mina-core
|
Maven |
≥ 2.1.0
< 2.1.5
|
2.1.5
|
|
org.apache.mina:mina-core
|
Maven |
< 2.0.22
|
2.0.22
|
References
Frequently Asked Questions
What is CVE-2021-41973?
Which Mina core versions are affected?
What version fixes CVE-2021-41973?
Is mina-core affected?
What is the CVSS score of CVE-2021-41973?
What CWE is associated with CVE-2021-41973?
How can I check Maven dependencies for CVE-2021-41973?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6mcm-j9cj-3vc3",
"modified" : "2021-11-03T14:49:19Z",
"published" : "2021-11-03T17:30:35Z",
"aliases" : [ "CVE-2021-41973" ],
"summary" : "Infinite loop in Apache MINA",
"details" : "In Apache MINA, a specifically crafted, malformed HTTP request may cause the HTTP Header decoder to loop indefinitely. The decoder assumed that the HTTP Header begins at the beginning of the buffer and loops if there is more data than expected. Please update MINA to 2.1.5 or greater.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.mina:mina-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.1.0"
}, {
"fixed" : "2.1.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.mina:mina-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.0.22"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-41973"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/r0b907da9340d5ff4e6c1a4798ef4e79700a668657f27cca8a39e9250%40%3Cdev.mina.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://www.oracle.com/security-alerts/cpuapr2022.html"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2021/11/01/2"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2021/11/01/8"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-835" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-11-02T19:48:48Z",
"nvd_published_at" : "2021-11-01T09:15:00Z"
}
}