module

UnRAR Path Traversal (CVE-2022-30333)

Disclosed
2022-06-28
Created
2022-08-29

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
NEW

Explore Exposure Command

Confidently identify and prioritize exposures from endpoint to cloud with full attack surface visibility and threat-aware risk context.