All vulnerabilities
CVE-2026-97370GHSA-h9h9-2rmf-rvhp

com.github.junrar:junrar: Junrar: RarVM VM_JMP maxOpCount bypass causes infinite CPU loop during RAR4 extraction

junrar com.github.junrar:junrarmavenLibraries & packages
CVSS
7.5High
ExploitationNo known exploitationNot in CISA KEV, which does not prove it is unexploitedCISA KEV
Exploit odds (EPSS)0.40%Chance of exploitation activity in the next 30 days, higher than 33% of CVEs. Scored 23 Oct 2026FIRST EPSS
Fixed in7.6.1Fixed versionGitHub
Published15 Oct 2026Updated 16 Oct 2026CVE List

What fixes it

  • 7.6.1com.github.junrar:junrar, mavenGitHub<dependency><groupId>com.github.junrar</groupId><artifactId>junrar</artifactId><version>7.6.1</version></dependency>
  • 7.6.1com.github.junrar:junrar, MavenOSV<dependency><groupId>com.github.junrar</groupId><artifactId>junrar</artifactId><version>7.6.1</version></dependency>

A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.

Description

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:

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:

case VM_JMP:
    setIP(getValue(false, mem, op1));
    continue;

Because of the continue, execution also skips the loop-end accounting:

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 thread permanently blocked by a small crafted archive. In services that process uploads or attachments automatically, repeated submissions can exhaust worker capacity and degrade or stop archive-processing functionality.

The RAR VM does not provide native code execution, reflection, or process execution primitives, and Java array bounds checks prevent escaping the VM memory array. The expected security impact is availability only.

Text from GitHub Advisory Database

Affected versions 31

  • com.github.junrar:junrar, maven<= 7.6.0GitHub
  • junraraffected: < 7.6.1CVE List
  • com.github.junrar:junrar, Mavenfrom first release, fixed in 7.6.1OSV
  • com.github.junrar:junrar, Maven0.7OSV
  • com.github.junrar:junrar, Maven1.0.0OSV
  • com.github.junrar:junrar, Maven1.0.1OSV
  • com.github.junrar:junrar, Maven2.0.0OSV
  • com.github.junrar:junrar, Maven3.0.0OSV
  • com.github.junrar:junrar, Maven3.1.0OSV
  • com.github.junrar:junrar, Maven4.0.0OSV
  • com.github.junrar:junrar, Maven5.0.0OSV
  • com.github.junrar:junrar, Maven6.0.0OSV
  • com.github.junrar:junrar, Maven6.0.1OSV
  • com.github.junrar:junrar, Maven7.0.0OSV
  • com.github.junrar:junrar, Maven7.1.0OSV
  • com.github.junrar:junrar, Maven7.2.0OSV
  • com.github.junrar:junrar, Maven7.3.0OSV
  • com.github.junrar:junrar, Maven7.4.0OSV
  • com.github.junrar:junrar, Maven7.4.1OSV
  • com.github.junrar:junrar, Maven7.5.0OSV
  • com.github.junrar:junrar, Maven7.5.1OSV
  • com.github.junrar:junrar, Maven7.5.10OSV
  • com.github.junrar:junrar, Maven7.5.2OSV
  • com.github.junrar:junrar, Maven7.5.3OSV
  • com.github.junrar:junrar, Maven7.5.4OSV
  • com.github.junrar:junrar, Maven7.5.5OSV
  • com.github.junrar:junrar, Maven7.5.6OSV
  • com.github.junrar:junrar, Maven7.5.7OSV
  • com.github.junrar:junrar, Maven7.5.8OSV
  • com.github.junrar:junrar, Maven7.5.9OSV
  • com.github.junrar:junrar, Maven7.6.0OSV

References 4