highCVSS 7.5Vulnerability

CVE-2026-97370

### Summary Junrar's RAR virtual machine can be forced into a deterministic infinite loop while extracting a crafted RAR4 archive. The `RarVM.ExecuteCode` loop is intended to be bounded by `maxOpCount`, but jump instructions can bypass this limit when `setIP()` is called with a target instruction pointer greater than or equal to `codeSize`. An unauthenticated attacker who can provide a RAR archive to an application using `Junrar.extract()` can cause the extraction thread to spin forever, consuming CPU and blocking the process. The issue is a denial of service vulnerability, not remote code execution. ### Details The root cause is in `src/main/java/com/github/junrar/unpack/vm/RarVM.java`. `setIP()` returns early when the target IP is outside the prepared VM program: ```java private boolean setIP(int ip) { if ((ip) >= codeSize) { return (true); } if (--maxOpCount <= 0) { return (false); } IP = ip; return true; } ``` When `ip >= codeSize`, this branch: - does not update `IP`; - does not decrement `maxOpCount`; - returns `true`, so callers treat it as success. The `VM_JMP` handler and the other jump-like handlers discard the return value of `setIP()` and immediately `continue` the main VM loop: ```java case VM_JMP: setIP(getValue(false, mem, op1)); continue; ``` Because of the `continue`, execution also skips the loop-end accounting: ```java IP++; --maxOpCount; ``` As a result, a VM program containing a single `VM_JMP` instruction can freeze both `IP` and `maxOpCount`: 1. `IP` points to the `VM_JMP` instruction. 2. The jump target resolves to `codeSize` or larger. 3. `setIP()` returns before modifying `IP` or decrementing `maxOpCount`. 4. The caller ignores the return value and continues. 5. The same `VM_JMP` instruction is executed again forever. ### Impact This is a CPU denial of service vulnerability. Any application that uses junrar to extract untrusted RAR archives can have an extraction worker threa

Properties

summary
Junrar: RarVM VM_JMP maxOpCount bypass causes infinite CPU loop during RAR4 extraction
severity
high
cvss_score
7.5
retrieved_at
2026-10-15T22:56:51+00:00
ghsa_published
2026-10-15T20:09:47Z
source_url
https://github.com/advisories/GHSA-h9h9-2rmf-rvhp
ghsa_updated
2026-10-15T20:09:48Z
ghsa_id
GHSA-h9h9-2rmf-rvhp
last_source
GitHub Advisory Database
cve_id
CVE-2026-97370
cvss_vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
signal_observed_at
2026-10-15T22:56:51+00:00
is_ghsa_only
false

Related Entities (4)

HAS_WEAKNESS (1)

→[Weakness]Loop with Unreachable Exit Condition ('Infinite Loop')

REPORTED_BY (1)

→[Source]GitHub Advisory Database

VULNERABLE_TO (1)

←[Software]maven/com.github.junrar:junrar

AFFECTS (1)

→[Software]maven/com.github.junrar:junrar

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-97370 (CVSS 7.5) — Ninja Signal Threat Intelligence | Ninja Signal