Rapid7 Vulnerability & Exploit Database

UnRAR Path Traversal (CVE-2022-30333)

Back to Search

UnRAR Path Traversal (CVE-2022-30333)

Disclosed
06/28/2022
Created
08/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.

Author(s)

  • Simon Scannell
  • Ron Bowes

Platform

Linux

Architectures

x86, x64

Development

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

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security

;