CVE-2018-12418: Junrar vulnerable to Infinite Loop
5.5
CVSS Score
3.0
Basic Information
CVE ID
GHSA ID
EPSS Score
0.60736%
CWE
Published
10/17/2018
Updated
1/12/2023
KEV Status
No
Technology
Java
Technical Details
CVSS Vector
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
com.github.junrar:junrar | maven | < 1.0.1 | 1.0.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the readHeaders method's loop structure. Key indicators:
- Pre-patch code used while(true) without tracking processed file positions, allowing infinite re-processing of corrupted position markers.
- Header size allocations used 'new byte[toRead]' without validation, enabling potential negative or excessively large allocations that could subvert loop exit logic.
- The patch introduced: a) A position tracking Set to detect cycles, b) A MAX_HEADER_SIZE constant, c) A safelyAllocate method to validate buffer sizes - all addressing the infinite loop vector.
- CWE-835 directly maps to the loop's pre-patch inability to guarantee exit conditions when processing malicious inputs.