CVE-2026-86071: Junrar LocalFolderExtractor Mkdir Escape Allows Directory Vulnerability
LOWCVE-2026-86071 is a LOW (CVSS 3.7) localfolderextractor mkdir escape allows directory vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Junrar libraries in the Maven ecosystem. The issue involves localfolderextractor mkdir escape allows directory creation outside extraction root. Remediation is available by upgrading affected packages to version 7.6.1.
CVE-2026-86071 at a Glance
Security Impact
CVSS: 3.7
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N).
How to Fix CVE-2026-86071
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-86071, 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-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. 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-86071 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-86071?
Which Junrar versions are affected?
What version fixes CVE-2026-86071?
Is junrar affected?
What is the CVSS score of CVE-2026-86071?
What CWE is associated with CVE-2026-86071?
How can I check Maven dependencies for CVE-2026-86071?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-89m4-43j5-vhhx",
"modified" : "2026-09-17T16:30:46Z",
"published" : "2026-09-17T16:30:46Z",
"aliases" : [ "CVE-2026-86071" ],
"summary" : "Junrar: LocalFolderExtractor mkdir escape allows directory creation outside extraction root",
"details" : "## Summary\n\n`LocalFolderExtractor` validates only the final canonical file path before extraction. However, `makeFile()` creates intermediate directories one path segment at a time without checking whether each created directory remains inside the destination folder.\n\nA malicious RAR entry can make the final file path resolve inside the extraction destination, while causing intermediate `mkdir()` calls to create attacker-chosen directories outside the extraction root.\n\nThis is an extraction root escape via unchecked intermediate directory creation. The default impact is directory creation outside the intended destination, not unconditional arbitrary file content write.\n\n## Affected Code\n\n- `src/main/java/com/github/junrar/LocalFolderExtractor.java`\n - `createFile()` checks only the final canonical path.\n - `makeFile()` calls `dir.mkdir()` for each intermediate segment without containment checks.\n\nRelevant code flow:\n\n```java\nprivate File createFile(final FileHeader fh, final File destination) throws IOException {\n String name = invariantSeparatorsPathString(fh.getFileName());\n File f = new File(destination, name);\n String dirCanonPath = f.getCanonicalPath();\n if (!dirCanonPath.startsWith(destination.getCanonicalPath() + File.separator)) {\n throw new IllegalStateException(...);\n }\n if (!f.exists()) {\n f = makeFile(destination, name);\n }\n return f;\n}\n\nprivate File makeFile(final File destination, final String name) throws IOException {\n final String[] dirs = name.split(\"/\");\n String path = \"\";\n for (int i = 0; i < dirs.length - 1; i++) {\n path = path + File.separator + dirs[i];\n File dir = new File(destination, path);\n dir.mkdir();\n }\n path = path + File.separator + dirs[dirs.length - 1];\n final File f = new File(destination, path);\n f.createNewFile();\n return f;\n}\n```\n\n## Impact\n\nAn attacker who can supply a malicious RAR archive can create directories outside the intended extraction directory.\n\nThis violates the expected extraction boundary and can be used for filesystem pollution or file-vs-directory squatting. For example, an attacker can create a directory at a path where a later security-sensitive file is expected, causing future writes to that path to fail.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N"
} ],
"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-89m4-43j5-vhhx"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-86071"
}, {
"type" : "WEB",
"url" : "https://github.com/junrar/junrar/commit/e6e333b195a1e3ad271a18fd79d8ac1eb5289343"
}, {
"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-22" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2026-09-17T16:30:46Z",
"nvd_published_at" : "2026-09-16T19:17:58Z"
}
}