Skip to content
Server Security Center
KEVhigh7.5 Used in ransomware campaigns

CVE-2022-30333: RARLAB UnRAR Directory Traversal

RARLAB UnRAR · listed in the CISA catalog of actively exploited vulnerabilities since 2022-08-09.

CVSS v3.1 (CVE record)
7.5
high
EPSS (exploit probability, 30 days)
99.2%
among the highest 0.1% of all CVEs
Added to CISA KEV
2022-08-09
US federal due date 2022-08-30
Ubuntu priority
high

CVE-2022-30333 explained

CVE-2022-30333 is a directory traversal flaw in RARLAB UnRAR before 6.12 on Linux and UNIX. During extraction, a crafted archive can write files outside the target directory, for example creating a ~/.ssh/authorized_keys file. It is listed in CISA's Known Exploited Vulnerabilities catalog with known ransomware use, so patching should be a priority.

Impact

An attacker who gets a crafted archive extracted by a vulnerable UnRAR can write or overwrite files outside the extraction directory. Writing a file such as ~/.ssh/authorized_keys could grant the attacker access to the account. The CVSS vector rates the attack as network-reachable, low complexity, needing no privileges or user interaction. The integrity impact is high. Confidentiality and availability impacts are rated none. WinRAR and Android RAR are not affected.

Who is affected

On Debian 12 (bookworm), 13 (trixie) and testing 14 (forky), rar is fixed in 2:6.20~b1-0.1 and unrar-nonfree in 1:6.1.7-1. Ubuntu 24.04 LTS has rar fixed in 2:6.23-1. Ubuntu 22.04 LTS has fixes for libclamunrar (0.103.11-0ubuntu0.22.04.1), rar (2:6.23-1~22.04.1) and unrar-nonfree (1:6.1.5-1ubuntu0.1). Ubuntu 20.04 LTS has fixes for libclamunrar (0.103.11-0ubuntu0.20.04.1), rar (2:6.23-1~20.04.1) and unrar-nonfree (1:5.6.6-2ubuntu0.1). Ubuntu 18.04 LTS and 16.04 LTS have no fixed version for libclamunrar, rar or unrar-nonfree.

Written with AI from the data on this page and checked against it automatically.

Official description

RARLAB UnRAR before 6.12 on Linux and UNIX allows directory traversal to write to files during an extract (aka unpack) operation, as demonstrated by creating a ~/.ssh/authorized_keys file. NOTE: WinRAR and Android RAR are unaffected.

CISA required action: Apply updates per vendor instructions.

CISA notes

Ubuntu and Debian releases

A server is vulnerable if it has a package built from the listed source package installed in a version lower than the fixed version for its release.

What to do

  1. Identify systems with rar, unrar-nonfree or libclamunrar installed.
  2. Update these packages to the fixed version listed for your release.
  3. Restart services that extract RAR archives so they load the updated code.
  4. Plan upgrades for Ubuntu 16.04 LTS, which is end of life, and for Ubuntu 18.04 LTS, which has no fixed version, to a release with fixes.
  5. Review ~/.ssh/authorized_keys and other sensitive files on systems that extracted untrusted RAR archives.

Ubuntu 18.04 LTS and 16.04 LTS have no fixed packages. Ubuntu 16.04 LTS is end of life and should be upgraded. On both releases, remove rar, unrar-nonfree and libclamunrar if they are not needed. Do not extract untrusted RAR archives, especially as privileged users. Limit exposure of services that process uploaded archives, and plan a move to a supported release.

Written with AI from the data on this page and checked against it automatically.

Check and fix on a server

Run on each Ubuntu or Debian server. Replace rar with the source package from the table above (this CVE affects 3 source packages).

1. Show installed packages built from the source package, with their versions

dpkg-query -W -f='${binary:Package} ${Version} ${source:Package}\n' | awk '$3=="rar"'

2. Compare each installed version with the fixed version for your release from the table (releases with a fixed version only)

I=INSTALLED_VERSION; F=FIXED_VERSION   # replace both
dpkg --compare-versions "$I" lt "$F"; case $? in 0) echo vulnerable ;; 1) echo "fixed or newer" ;; *) echo "check the versions" ;; esac

3. Install the fix

sudo apt update && sudo apt install --only-upgrade $(dpkg-query -W -f='${binary:Package} ${source:Package}\n' | awk '$2=="rar"{print $1}')

Services keep running the old code until they are restarted – restart the affected service or check with needrestart.

No fixed version yet on one release

Ubuntu 18.04 LTS: no fixed version of the affected packages yet, so every installed version there is affected. Until a fix is published:

  • Follow the vendor's advisory for a mitigation or patch: rarlab.com/rar_add.htm
  • If the server does not need the package, remove it, or replace it with a maintained alternative.
  • Restrict exposure: keep the affected service off the internet, limit access with a firewall or VPN, and turn off the vulnerable feature where you can.

This page updates automatically when Ubuntu or Debian publish a fix.

Ubuntu 16.04 LTS has reached end of life and no longer gets regular security fixes – upgrade to a supported release.

CISA's assessment (SSVC)

Exploitation
Exploited in the wild
Automatable
Yes – attackers can automate it at scale
Technical impact
Total – full control of the component or total information disclosure

Weakness: CWE-59 Improper Link Resolution Before File Access ('Link Following'), CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Questions about CVE-2022-30333

Why should this CVE be prioritized?
CISA added it to its Known Exploited Vulnerabilities catalog on 2022-08-09 and records known ransomware use. The required action is to apply updates per vendor instructions. Ubuntu rates its priority as high.
Is the libclamunrar package affected?
Yes, on Ubuntu. It is fixed in 0.103.11-0ubuntu0.22.04.1 on Ubuntu 22.04 LTS and 0.103.11-0ubuntu0.20.04.1 on Ubuntu 20.04 LTS. No fixed version is published for Ubuntu 18.04 LTS or 16.04 LTS.
Are WinRAR or Android RAR affected?
No. The description states that WinRAR and Android RAR are unaffected. The flaw concerns UnRAR before 6.12 on Linux and UNIX.

Written with AI from the data on this page and checked against it automatically.

References

Data: CISA Known Exploited Vulnerabilities (public domain) · CVE Program records incl. CISA ADP enrichment · OSV.dev (CC BY 4.0) incl. Ubuntu and Debian security data · FIRST EPSS · endoflife.date. Updated automatically – facts last changed 2026-11-21. Always confirm with the vendor's or distribution's advisory before patching.