CVE-2018-12418: Junrar Junrar Vulnerable To Infinite Loop Vulnerability
MODERATECVE-2018-12418 is a MODERATE (CVSS 5.5) junrar vulnerable to infinite loop vulnerability (CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')) affecting Junrar libraries in the Maven ecosystem. The issue involves junrar vulnerable to infinite loop. Remediation is available by upgrading affected packages to version 1.0.1.
CVE-2018-12418 at a Glance
Security Impact
CVSS: 5.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H).
How to Fix CVE-2018-12418
To remediate this vulnerability, upgrade all affected Junrar 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>com.github.junrar</groupId>
<artifactId>junrar</artifactId>
<version>1.0.1</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=com.github.junrar
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2018-12418, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=com.github.junrar
Analyze the terminal output to locate any version of Junrar in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.1), your application is affected.
Note: The mvn dependency:tree -Dincludes=com.github.junrar 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 Junrar, 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-2018-12418 Affected Junrar Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
com.github.junrar:junrar
|
Maven |
< 1.0.1
|
1.0.1
|
References
Frequently Asked Questions
What is CVE-2018-12418?
Which Junrar versions are affected?
What version fixes CVE-2018-12418?
Is junrar affected?
What is the CVSS score of CVE-2018-12418?
What CWE is associated with CVE-2018-12418?
How can I check Maven dependencies for CVE-2018-12418?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5xqr-grq4-qwgx",
"modified" : "2022-11-17T18:39:50Z",
"published" : "2018-10-17T00:04:05Z",
"aliases" : [ "CVE-2018-12418" ],
"summary" : "Junrar vulnerable to Infinite Loop",
"details" : "Archive.java in Junrar before 1.0.1, as used in Apache Tika and other products, is affected by a denial of service vulnerability due to an infinite loop when handling corrupt RAR files.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "com.github.junrar:junrar"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.0.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-12418"
}, {
"type" : "WEB",
"url" : "https://github.com/junrar/junrar/pull/8"
}, {
"type" : "WEB",
"url" : "https://github.com/junrar/junrar/commit/ad8d0ba8e155630da8a1215cee3f253e0af45817"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-5xqr-grq4-qwgx"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/junrar/junrar"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-835" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:17:41Z",
"nvd_published_at" : null
}
}