How to Update Unrar to Patch Security Flaws

Recent security vulnerabilities in the unrar utility can allow attackers to execute arbitrary code or write malicious files outside intended directories when an archive is unpacked. This guide provides a straightforward walkthrough on checking your current unrar version and updating the software across Linux distributions, macOS, and Windows to ensure your system is protected against known exploits.

Check Your Current Unrar Version

Before updating, verify the version currently installed on your system. Open your terminal or command prompt and run:

unrar

The header output will display the version number. Compare this against the latest release notes from RARLab to see if your build is vulnerable.


Update Unrar on Linux

Most Linux distributions distribute unrar via their standard package managers.

Ubuntu and Debian

Update your local package lists and upgrade the unrar package:

sudo apt update
sudo apt install --only-upgrade unrar

If you are using the free/open-source variant (unrar-free), run:

sudo apt install --only-upgrade unrar-free

RHEL, CentOS, and Fedora

For systems using DNF or YUM:

sudo dnf check-update
sudo dnf upgrade unrar

Arch Linux

On Arch Linux, refresh repository databases and upgrade the package:

sudo pacman -Syu unrar

Update Unrar on macOS

If you installed unrar using Homebrew, update Homebrew's formula index and upgrade the package:

brew update
brew upgrade unrar

If you installed unrar via MacPorts, use:

sudo port selfupdate
sudo port upgrade unrar

Update Unrar on Windows

On Windows systems, unrar is typically bundled with WinRAR or installed as a standalone command-line tool.

Using Windows Package Manager (winget)

If WinRAR was installed via winget, upgrade it directly from PowerShell or Command Prompt:

winget upgrade RARLab.WinRAR

Manual Installer

  1. Visit the official RARLab website.
  2. Download the latest installer for WinRAR or the UnRAR command-line package.
  3. Run the installer to overwrite the outdated executable files.

Verify the Installation

After completing the upgrade, run the version check again:

unrar

Confirm that the output reflects the latest patched version to ensure the security flaws have been resolved.