Miggo Logo

CVE-2022-23596: Junrar vulnerable to infinite loop via extracting carefully crafted RAR archive

7.5

CVSS Score
3.1

Basic Information

EPSS Score
0.57457%
Published
2/1/2022
Updated
1/30/2023
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
com.github.junrar:junrarmaven< 7.4.17.4.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The commit diff shows a critical null-check addition in Archive.java's readHeaders method when handling SubBlockHeader types. Prior to the patch, a null subType would bypass the switch statement but not terminate header processing, causing an infinite loop. The vulnerability is directly tied to this missing null check, as confirmed by the CWE-835 classification and the test case added in the patch (loop.rar). The infinite loop occurs during header parsing, making readHeaders the clear vulnerable entry point.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### Imp**t * **r**ully *r**t** R*R *r**iv* **n tri***r *n in*init* loop w*il* *xtr**tin* s*i* *r**iv*. T** imp**t **p*n*s sol*ly on *ow t** *ppli**tion us*s t** li*r*ry, *n* w**t**r *il*s **n ** provi*** *y m*li*n*nt us*rs. ### P*t***s T** pro*l*m

Reasoning

T** *ommit *i** s*ows * *riti**l null-****k ***ition in *r**iv*.j*v*'s r********rs m*t*o* w**n **n*lin* Su**lo*k*****r typ*s. Prior to t** p*t**, * null su*Typ* woul* *yp*ss t** swit** st*t*m*nt *ut not t*rmin*t* *****r pro**ssin*, **usin* *n in*init