CVE-2023-40477
High · 7.8CVSS
7.8
EPSS
11.4%
Published
May 3, 2024
CISA due date
—
Cloudanix analysis
A problem in WinRAR's handling of certain recovery files could let attackers run their own code on a computer simply by getting a user to open a malicious file.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Moderate
- Impact
- Remote Code Execution
- Component
- Application
- Class
- Buffer Overflow
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Improper validation of an array index during recovery volume processing allows out-of-bounds memory access, enabling arbitrary code execution in the context of the WinRAR process.
Why it matters to the business
Attackers can gain full control of affected systems if users open malicious archive files, resulting in potential data compromise, malware deployment, or further network intrusion.
How an attack unfolds
An attacker creates a specially crafted recovery volume file that triggers the array index flaw. The victim is tricked into opening the file in WinRAR, which processes the malformed data and executes attacker-supplied code.
How to fix it
Apply the latest vendor update for WinRAR that resolves the recovery volume handling issue. Disable automatic opening of untrusted archives where possible and enforce least-privilege execution for archive tools.
How to confirm the fix worked
Confirm WinRAR version is updated past the vulnerable release; test by attempting to open known-malformed recovery volumes in a controlled environment and verify no out-of-bounds access occurs.
Typical attack path
- Craft malicious recovery volume file exploiting improper array index validation
- Host file on web page or deliver via email/phishing
- Victim opens the file in WinRAR
- Out-of-bounds access occurs during recovery volume handling
- Arbitrary code executes in WinRAR process context
How to detect it
Review endpoint logs for WinRAR process crashes or unexpected child process creation during archive handling; inspect file system artifacts for suspicious recovery volume files with anomalous sizes or structures.
What your security team should do
- Prioritize patching WinRAR installations across the enterprise
- Block or sandbox execution of RAR files from untrusted sources
- Monitor for new vendor advisories on archive tool vulnerabilities
The record
RARLAB WinRAR Recovery Volume Improper Validation of Array Index Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of RARLAB WinRAR. User interaction is required to exploit this vulnerability in that the target must visit a malicious page or open a malicious file. The specific flaw exists within the processing of recovery volumes. The issue results from the lack of proper validation of user-supplied data, which can result in a memory access past the end of an allocated buffer. An attacker can leverage this vulnerability to execute code in the context of the current process. Was ZDI-CAN-21233.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:10 | libclamunrar | 0 | 0.103.10-0+deb10u1 |
| Debian:10 | rar | 0 | 2:6.23-1~deb10u1 |
| Debian:10 | unrar-nonfree | 0 | 1:5.6.6-1+deb10u4 |
| Debian:11 | libclamunrar | 0 | 0.103.10-1~deb11u1 |
| Debian:11 | rar | 0 | 2:6.23-1~deb11u1 |
| Debian:11 | unrar-nonfree | 0 | 1:6.0.3-1+deb11u3 |
| Debian:12 | libclamunrar | 0 | 1.0.3-1~deb12u1 |
| Debian:12 | rar | 0 | 2:6.23-1~deb12u1 |
| Debian:12 | unrar-nonfree | 0 | 1:6.2.6-1+deb12u1 |
| Debian:13 | libclamunrar | 0 | 1.0.3-1 |
| Debian:13 | rar | 0 | 2:6.23-1 |
| Debian:13 | unrar-nonfree | 0 | 1:6.2.10-1 |
| Debian:14 | libclamunrar | 0 | 1.0.3-1 |
| Debian:14 | rar | 0 | 2:6.23-1 |
| Debian:14 | unrar-nonfree | 0 | 1:6.2.10-1 |
| Mageia:8 | unrar | 0 | 6.23-1.mga8.nonfree |
| Mageia:9 | unrar | 0 | 6.23-1.mga9.nonfree |
| SUSE:Enterprise Storage 7.1 | clamav | 0 | 0.103.11-150000.3.50.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | clamav | 0 | 0.103.11-150000.3.50.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | clamav | 0 | 0.103.11-150000.3.50.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS | clamav | 0 | 0.103.11-150000.3.50.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | clamav | 0 | 0.103.11-150000.3.50.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP4 | clamav | 0 | 0.103.11-150000.3.50.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP5 | clamav | 0 | 0.103.11-150000.3.50.1 |
| SUSE:Linux Enterprise Server 12 SP5 | clamav | 0 | 0.103.11-3.30.1 |
| SUSE:Linux Enterprise Server 15 SP1-LTSS | clamav | 0 | 0.103.11-150000.3.50.1 |
| SUSE:Linux Enterprise Server 15 SP2-LTSS | clamav | 0 | 0.103.11-150000.3.50.1 |
| SUSE:Linux Enterprise Server 15 SP3-LTSS | clamav | 0 | 0.103.11-150000.3.50.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | clamav | 0 | 0.103.11-3.30.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP1 | clamav | 0 | 0.103.11-150000.3.50.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP2 | clamav | 0 | 0.103.11-150000.3.50.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP3 | clamav | 0 | 0.103.11-150000.3.50.1 |
| SUSE:Manager Proxy 4.2 | clamav | 0 | 0.103.11-150000.3.50.1 |
| SUSE:Manager Server 4.2 | clamav | 0 | 0.103.11-150000.3.50.1 |
| Ubuntu:16.04:LTS | libclamunrar | 0 | No fix |
| Ubuntu:16.04:LTS | rar | 0 | No fix |
| Ubuntu:16.04:LTS | unrar-nonfree | 0 | No fix |
| Ubuntu:18.04:LTS | libclamunrar | 0 | No fix |
| Ubuntu:18.04:LTS | rar | 0 | No fix |
| Ubuntu:18.04:LTS | unrar-nonfree | 0 | No fix |
| Ubuntu:20.04:LTS | libclamunrar | 0 | 0.103.11-0ubuntu0.20.04.1 |
| Ubuntu:20.04:LTS | rar | 0 | No fix |
| Ubuntu:20.04:LTS | rar | 0 | 2:6.23-1~20.04.1 |
| Ubuntu:20.04:LTS | unrar-nonfree | 0 | No fix |
| Ubuntu:20.04:LTS | unrar-nonfree | 0 | 1:5.6.6-2ubuntu0.1 |
| Ubuntu:22.04:LTS | libclamunrar | 0 | 0.103.11-0ubuntu0.22.04.1 |
| Ubuntu:22.04:LTS | rar | 0 | No fix |
| Ubuntu:22.04:LTS | rar | 0 | 2:6.23-1~22.04.1 |
| Ubuntu:22.04:LTS | unrar-nonfree | 0 | No fix |
| Ubuntu:22.04:LTS | unrar-nonfree | 0 | 1:6.1.5-1ubuntu0.1 |
| Ubuntu:23.10 | libclamunrar | 0 | 1.0.4-0ubuntu0.23.10.1 |
| Ubuntu:24.04:LTS | libclamunrar | 0 | 1.0.3-1 |
| Ubuntu:24.04:LTS | rar | 0 | 2:6.23-1 |
| Ubuntu:Pro:16.04:LTS | libclamunrar | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | rar | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | unrar-nonfree | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | libclamunrar | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | rar | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | unrar-nonfree | 0 | No fix |
| openSUSE:Leap 15.4 | clamav | 0 | 0.103.11-150000.3.50.1 |
| openSUSE:Leap 15.5 | clamav | 0 | 0.103.11-150000.3.50.1 |
| openSUSE:Tumbleweed | clamav | 0 | 0.103.11-2.1 |
Related vulnerabilities
- CVE-2022-30333 RARLAB UnRAR before 6.12 on Linux and UNIX allows directory traversal to write to files… Also affects rar
- CVE-2012-6706 A VMSF_DELTA memory corruption was discovered in unrar before 5.5.5, as used in Sophos… Also affects libclamunrar
- CVE-2024-33899 RARLAB WinRAR before 7.00, on Linux and UNIX platforms, allows attackers to spoof the… Also affects rar
- CVE-2025-20128 A vulnerability in the Object Linking and Embedding 2 (OLE2) decryption routine of ClamAV… Also affects clamav
- CVE-2024-20506 A vulnerability in the ClamD service module of Clam AntiVirus (ClamAV) versions 1.4.0… Also affects clamav
- CVE-2024-20505 A vulnerability in the PDF parsing module of Clam AntiVirus (ClamAV) versions 1.4.0… Also affects clamav
- CVE-2023-20197 A vulnerability in the filesystem image parser for Hierarchical File System Plus (HFS+)… Also affects clamav
- CVE-2023-20052 On Feb 15, 2023, the following vulnerability in the ClamAV scanning library was… Also affects clamav