module

UnRAR Path Traversal (CVE-2022-30333)

Disclosed
Jun 28, 2022
Created
Aug 29, 2022

Description

This module creates a RAR file that exploits CVE-2022-30333, which is a
path-traversal vulnerability in unRAR that can extract an arbitrary file
to an arbitrary location on a Linux system. UnRAR fixed this
vulnerability in version 6.12 (open source version 6.1.7).

The core issue is that when a symbolic link is unRAR'ed, Windows
symbolic links are not properly validated on Linux systems and can
therefore write a symbolic link that points anywhere on the filesystem.
If a second file in the archive has the same name, it will be written
to the symbolic link path.

Authors

Simon Scannell
Ron Bowes

Platform

Linux

Architectures

x86, x64

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':


msf > use exploit/linux/fileformat/unrar_cve_2022_30333
msf exploit(unrar_cve_2022_30333) > show targets
...targets...
msf exploit(unrar_cve_2022_30333) > set TARGET < target-id >
msf exploit(unrar_cve_2022_30333) > show options
...show and set options...
msf exploit(unrar_cve_2022_30333) > exploit

Title
Rapid7 Labs

2026 Global Threat Landscape Report

The predictive window has collapsed. Exploitation follows disclosure in days. See how attackers are accelerating and how to stay ahead.