Vulnerability in unrar that allows overwriting files when unpacking an archive

A vulnerability (CVE-2022-30333) has been identified in the unrar utility, which allows, when unpacking a specially designed archive, to overwrite files outside the current directory, as far as user rights allow. The issue was fixed in the releases of RAR 6.12 and unrar 6.1.7. The vulnerability appears in versions for Linux, FreeBSD and macOS, but does not affect versions for Android and Windows.

The problem is caused by the lack of proper checking of the β€œ/..” sequence in the file paths specified in the archive, which allows the unpacking to go beyond the boundaries of the base directory. For example, by placing β€œ../.ssh/authorized_keys” in the archive, an attacker can try to overwrite the user’s file β€œ~/.ssh/authorized_keys” at the time of unpacking.

Source: opennet.ru

Add a comment