Advisories for Maven/Com.github.junrar/Junrar package

2026

Junrar: RarVM VM_JMP maxOpCount bypass causes infinite CPU loop during RAR4 extraction

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 …

Junrar: LocalFolderExtractor mkdir escape allows directory creation outside extraction root

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. A 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. This is an extraction root escape via unchecked intermediate directory …

Junrar has an arbitrary file write due to backslash Path Traversal bypass in LocalFolderExtractor on Linux/Unix

A backslash path traversal vulnerability in LocalFolderExtractor allows an attacker to write arbitrary files with attacker-controlled content anywhere on the filesystem when a crafted RAR archive is extracted on Linux/Unix. This can often lead to remote code execution (e.g., overwriting shell profiles, source code, cron jobs, etc).

2022
2018