WinRAR Arbitrary Code Execution Vulnerability (CVE-2023-38831) Security Advisory
Executive & SecOps Summary
SECOPS ASSESSMENTAll Windows endpoint environments running RARLAB WinRAR versions prior to 6.23.
Attackers can execute arbitrary code in the background when a user attempts to open a seemingly benign file within a crafted ZIP archive, leading to full system compromise.
Immediately upgrade WinRAR to version 6.23 or higher, and restrict execution of untrusted archive files.
Affected Products & Version Scope
Remediation & Live Workaround Commands
PATCH & WORKAROUND1. Official Patch & Version Upgrade Commands
The primary remediation is upgrading WinRAR to version 6.23 or later. In enterprise environments, administrators can deploy the update silently using Windows Package Manager (Winget) or Group Policy Objects (GPO).
# Upgrade WinRAR silently using Windows Package Manager (Winget)
winget upgrade --id RARLab.WinRAR --silent
# Verify the installed WinRAR version via Registry
(Get-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\WinRAR archiver').DisplayVersion2. Temporary Workaround & Hardening Configuration
If immediate patching is not feasible, configure security controls to block or monitor the execution of scripts from temporary directories, and block suspicious ZIP archives at the email gateway.
# Block execution of .cmd/.bat files from WinRAR temporary extraction directories via PowerShell
$RulePath = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Safer\CodeIdentifiers\0\Paths\{winrar-temp-block}'
New-Item -Path $RulePath -Force | Out-Null
New-ItemProperty -Path $RulePath -Name 'Path' -Value '%TEMP%\Rar$*\*.cmd' -PropertyType String -Force3. Log Audit & IoC Verification Commands
Search for potential indicators of compromise (IoCs) by scanning the local AppData Temp directory for anomalous nested file structures generated during WinRAR execution.
# Scan WinRAR temporary extraction folders for suspicious double extensions or trailing spaces
Get-ChildItem -Path "$env:TEMP\Rar$*" -Recurse -ErrorAction SilentlyContinue |
Where-Object { $_.Name -match '\.(pdf|jpg|png|txt)\s+\.(exe|cmd|bat|scr|pif)$' } |
Select-Object FullName, Length, CreationTimeBlock Kernel Privilege Escalation & Ransomware Payloads Before You Can Reboot
Protect unpatched Windows, Linux, and macOS workloads against in-memory exploitation and lateral movement with autonomous EDR.
Technical Root Cause & Exploitation Mechanics
1. Vulnerability Overview & Root Cause
This vulnerability (CVE-2023-38831) is a logical flaw in the file expansion and path validation logic of RARLAB WinRAR. When WinRAR processes a ZIP archive, it fails to properly isolate file execution from directory structures with matching names (CWE-345, CWE-351). If an archive contains a benign file alongside a directory sharing the exact same base name, WinRAR inadvertently extracts and processes the contents of that directory during the execution attempt of the benign file.
2. Exploitation Mechanics & Attack Scenario
An attacker crafts a malicious ZIP archive containing a benign file (e.g., 'document.pdf') and a folder named identically with a trailing space (e.g., 'document.pdf '). Inside this folder, the attacker places a malicious executable or script (e.g., 'document.pdf .cmd'). When the victim double-clicks 'document.pdf' within the WinRAR GUI, WinRAR's internal extraction routine extracts both the file and the matching folder to a temporary directory. Due to parameter expansion and ShellExecute behavior on Windows, the operating system executes the malicious script from the folder instead of opening the intended PDF file.
3. Infrastructure & Business Impact
This vulnerability was actively exploited in the wild as a zero-day from April through October 2023, targeting financial trading accounts and government entities. Successful exploitation allows remote threat actors to gain initial access, execute arbitrary payloads, and establish persistence on corporate endpoints, posing severe risks of data exfiltration, ransomware deployment, and lateral movement within the internal network.
Official Vendor Advisories & References
RARLAB WinRAR before 6.23 allows attackers to execute arbitrary code when a user attempts to view a benign file within a ZIP archive. The issue occurs because a ZIP archive may include a benign file (such as an ordinary .JPG file) and also a folder that has the same name as the benign file, and the contents of the folder (which may include executable content) are processed during an attempt to access only the benign file. This was exploited in the wild in April through October 2023.
Frequently Asked SecOps Questions (CVE-2023-38831)
FAQQ1. How critical is CVE-2023-38831 and is it actively exploited in the wild?
CVE-2023-38831 is rated CVSS 7.8 (HIGH) with a 30-day EPSS exploitation probability of 99.8%. It is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, requiring immediate emergency remediation.
Q2. Which vendors and products are affected by CVE-2023-38831?
Primary impacted vendors include rarlab across winrar. Scope summary: RARLAB WinRAR versions prior to 6.23 on Windows platforms
Q3. What temporary mitigations or workarounds exist for CVE-2023-38831 before patching?
[Mitigation] Immediately upgrade WinRAR to version 6.23 or higher, and restrict execution of untrusted archive files. Follow the CLI remediation commands and interactive SecOps checklist on this page to restrict exposure prior to your maintenance window.
Generate an Internal Engineering Notice or CISO Report for CVE-2023-38831
Instantly format this advisory into an executive CISO summary or engineering patch ticket.
🔗 Related Advisories in Similar Stack (rarlab)
View Category →Apple macOS Screen Sharing Authentication Bypass Vulnerability (CVE-2026-65400)
[Affected Scope] macOS systems running versions prior to Sequoia 15.7.9, Sonoma 14.8.9, Tahoe 26.6.1/26.7, or Golden Gate 27 with Screen Sharing or VNC services enabled
DAEMON Tools Lite Official Installer Supply Chain Attack and Trojanized Binaries (CVE-2026-8398)
[Affected Scope] DAEMON Tools Lite Windows versions 12.5.0.2421 through 12.5.0.2434 distributed between April 8, 2026, and May 5, 2026
Microsoft Windows Shell Command Injection and Security Feature Bypass (CVE-2026-96951) Advisory
[Affected Scope] All supported versions of Windows OS including Windows 10, 11, and Windows Server.
Apple iOS and macOS Out-of-bounds Write Remote Code Execution Vulnerability (CVE-2026-86950) Security Advisory
[Affected Scope] All Apple devices running versions prior to iOS 18.7.11/26.7.1 and macOS Sequoia 15.8.1/Tahoe 26.7.1.
Subscribe to Daily Vulnerability Briefings & KEV Alerts
Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.