CVE-2026-86071: Junrar: LocalFolderExtractor mkdir escape allows directory creation outside extraction root
Junrar is an open source Java RAR archive library. Prior to version 7.6.1, LocalFolderExtractor in src/main/java/com/github/junrar/LocalFolderExtractor.java can create directories outside the intended extraction root when processing a crafted archive entry. LocalFolderExtractor.createFile() validates only the final canonical file path, while LocalFolderExtractor.makeFile() creates intermediate path segments with unchecked mkdir() calls. An entry can therefore make the final path resolve inside the destination while causing intermediate directory creation outside it, enabling filesystem pollution or file-versus-directory squatting that can make later security-sensitive writes fail. The demonstrated impact is directory creation, not unconditional arbitrary file-content write. This issue is fixed in version 7.6.1.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Junrarto a version that resolves this vulnerability.Fixed in 7.6.1
Event History
Frequently Asked Questions
Who is exposed to this issue?
Applications that use Junrar's LocalFolderExtractor to extract untrusted or attacker-crafted RAR archives are exposed. The vulnerable behavior is in versions before 7.6.1.
What does an attacker need to exploit it?
An attacker needs to supply a crafted archive entry that causes intermediate path segments to be created outside the extraction root while the final canonical path still validates inside the destination. No authentication or user interaction is required according to the supplied vector, but exploitation has high attack complexity.
What is the practical impact?
The demonstrated impact is creation of directories outside the intended extraction location, which can pollute the filesystem or reserve paths through file-versus-directory squatting. It is not demonstrated as an unconditional arbitrary file-content write.
What should be done if upgrading is not immediately possible?
Avoid extracting untrusted RAR archives with LocalFolderExtractor until Junrar can be updated to 7.6.1. Restrict the extractor's filesystem permissions so that unintended directory creation cannot affect security-sensitive locations.