CVE-2026-97370: Junrar: RarVM VM_JMP maxOpCount bypass causes infinite CPU loop during RAR4 extraction

Published Oct 15, 2026
·
Updated

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 VMJMP handler and the other jump-like handlers discard the return value of setIP() and immediately continue the main VM loop:

java case VMJMP: 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 VMJMP instruction can freeze both IP and maxOpCount:

1. IP points to the VMJMP 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 VMJMP 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.

Other sources

Junrar is an open source Java RAR archive library. Prior to 7.6.1, RarVM.ExecuteCode in src/main/java/com/github/junrar/unpack/vm/RarVM.java can repeatedly execute a VMJMP instruction whose target is greater than or equal to the prepared program's codeSize. The setIP() function returns success without changing the instruction pointer or decrementing maxOpCount, and the jump handler continues before loop-end accounting, leaving both values unchanged. A crafted RAR4 archive can therefore keep an extraction thread in an infinite CPU loop and exhaust archive-processing worker capacity. The RAR virtual machine does not expose native process execution, so the supported impact is availability loss rather than code execution. This issue is fixed in version 7.6.1.

— MITRE

Affected Software

2 affected componentsFixes available
Junrar Junrar<7.6.1
maven/com.github.junrar:junrar<=7.6.0
7.6.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade maven/com.github.junrar:junrar to a version that resolves this vulnerability.

    Fixed in 7.6.1
  2. Upgrade

    Upgrade Junrar to a version that resolves this vulnerability.

    Fixed in 7.6.1

Event History

Oct 15, 2026
CVE Published
via MITRE·06:17 PM
Data Sourced
via MITRE·06:17 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·08:09 PM
Data Sourced
via GitHub·08:09 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which deployments are exposed to this denial-of-service issue?

Deployments using Junrar to extract RAR4 archives before version 7.6.1 are affected when they process a crafted archive. The impact is exhaustion of archive-processing worker capacity by an extraction thread consuming CPU indefinitely.

2

What does an attacker need to exploit the issue?

An attacker needs to supply a crafted RAR4 archive that causes the RarVM to repeatedly execute a VM_JMP instruction with a target outside the prepared program's code size. No authentication or user interaction is required according to the provided severity vector.

3

Does this vulnerability allow code execution?

No. The RAR virtual machine does not expose native process execution; the supported impact is availability loss from an infinite CPU loop.

4

What version resolves the issue?

Upgrade Junrar to version 7.6.1, which fixes the vulnerable RarVM.ExecuteCode behavior.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203