CVE-2026-97370: Junrar RarVM VM_JMP MaxOpCount Bypass Causes Vulnerability
HIGHCVE-2026-97370 is a HIGH (CVSS 7.5) rarvm vm_jmp maxopcount bypass causes vulnerability (CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')) affecting Junrar libraries in the Maven ecosystem. The issue involves rarvm vm_jmp maxopcount bypass causes infinite cpu loop during rar4 extraction. Remediation is available by upgrading affected packages to version 7.6.1.
CVE-2026-97370 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2026-97370
To remediate this vulnerability, upgrade all affected Junrar dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>com.github.junrar</groupId>
<artifactId>junrar</artifactId>
<version>7.6.1</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=com.github.junrar
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2026-97370, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=com.github.junrar
Analyze the terminal output to locate any version of Junrar in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.6.1), your application is affected.
Note: The mvn dependency:tree -Dincludes=com.github.junrar command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop'), where the product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop. In Junrar, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-97370 Affected Junrar Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
com.github.junrar:junrar
|
Maven |
< 7.6.1
|
7.6.1
|
References
Frequently Asked Questions
What is CVE-2026-97370?
Which Junrar versions are affected?
What version fixes CVE-2026-97370?
Is junrar affected?
What is the CVSS score of CVE-2026-97370?
What CWE is associated with CVE-2026-97370?
How can I check Maven dependencies for CVE-2026-97370?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-h9h9-2rmf-rvhp",
"modified" : "2026-10-15T20:09:47Z",
"published" : "2026-10-15T20:09:47Z",
"aliases" : [ "CVE-2026-97370" ],
"summary" : "Junrar: RarVM VM_JMP maxOpCount bypass causes infinite CPU loop during RAR4 extraction",
"details" : "### Summary\n\nJunrar'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`.\n\nAn 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.\n\n### Details\n\nThe root cause is in `src/main/java/com/github/junrar/unpack/vm/RarVM.java`.\n\n`setIP()` returns early when the target IP is outside the prepared VM program:\n\n```java\nprivate boolean setIP(int ip) {\n if ((ip) >= codeSize) {\n return (true);\n }\n\n if (--maxOpCount <= 0) {\n return (false);\n }\n\n IP = ip;\n return true;\n}\n```\n\nWhen `ip >= codeSize`, this branch:\n\n- does not update `IP`;\n- does not decrement `maxOpCount`;\n- returns `true`, so callers treat it as success.\n\nThe `VM_JMP` handler and the other jump-like handlers discard the return value of `setIP()` and immediately `continue` the main VM loop:\n\n```java\ncase VM_JMP:\n setIP(getValue(false, mem, op1));\n continue;\n```\n\nBecause of the `continue`, execution also skips the loop-end accounting:\n\n```java\nIP++;\n--maxOpCount;\n```\n\nAs a result, a VM program containing a single `VM_JMP` instruction can freeze both `IP` and `maxOpCount`:\n\n1. `IP` points to the `VM_JMP` instruction.\n2. The jump target resolves to `codeSize` or larger.\n3. `setIP()` returns before modifying `IP` or decrementing `maxOpCount`.\n4. The caller ignores the return value and continues.\n5. The same `VM_JMP` instruction is executed again forever.\n\n### Impact\n\nThis 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.\n\nThe 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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "com.github.junrar:junrar"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "7.6.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 7.6.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/junrar/junrar/security/advisories/GHSA-h9h9-2rmf-rvhp"
}, {
"type" : "WEB",
"url" : "https://github.com/junrar/junrar/commit/687a09c42f46066447faa9179ee11314ad6d9afb"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/junrar/junrar"
}, {
"type" : "WEB",
"url" : "https://github.com/junrar/junrar/releases/tag/v7.6.1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-835" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-10-15T20:09:47Z",
"nvd_published_at" : null
}
}