Junrar: Path Traversal (Zip-Slip) via Sibling Directory Name PrefixGHSA-hf5p-q87m-crj7
MEDIUMFix: junrar/junrar@d77e9a8GHSA-hf5p-q87m-crj7 is a medium-severity (CVSS 5.9) Path Traversal vulnerability in com.github.junrar:junrar. A fix is available for com.github.junrar:junrar — see the affected versions and patch details below.
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-hf5p-q87m-crj7.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
com.github.junrar:junrarReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
Description
Summary
A path traversal vulnerability in LocalFolderExtractor allows an attacker to write arbitrary files with attacker-controlled content into sibling directories when a crafted RAR archive is extracted.
Example
Given an extraction directory set to /tmp/extract, a crafted archive with an entry with the filename as ../extract_evil/file.txt would be actually extracted to /tmp/extract_evil/file.txt.
Details
The createDirectory() and createFile() methods inLocalFolderExtractor validate extraction paths using a string prefix.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | com.github.junrar:junrar | all versions | 7.5.10com.github.junrar:junrar:7.5.10 |
Affected Products
junrarjunrar_projectDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for com.github.junrar:junrar, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update com.github.junrar:junrar to 7.5.10 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-hf5p-q87m-crj7 is resolved across your whole dependency graph.
Workarounds
Resolve every user-supplied path to its canonical form and reject anything that escapes the intended directory, and run the component under an account that has no read or write access outside the directory it legitimately serves.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
To mitigate this vulnerability, avoid processing RAR archives from untrusted sources. Restrict the extraction of RAR archives to only those originating from known and verified origins. This operational control reduces the risk of exploiting the path traversal flaw in Junrar by preventing the processing of malicious archives.Source: Red Hat security advisory for GHSA-hf5p-q87m-crj7 (CC BY 4.0)
Frequently Asked Questions
Is GHSA-hf5p-q87m-crj7 in your dependencies?
Find it across Maven, including transitive dependencies.