CVE-2022-3297
High · 7.8CVSS
7.8
EPSS
0.5%
Published
Sep 25, 2022
CISA due date
—
Cloudanix analysis
A memory error in a popular text editor lets attackers run harmful code if someone opens a specially made file.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Full Compromise
- Component
- Application
- Class
- Use After Free
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Use-after-free condition in Vim allows memory access after deallocation, enabling potential arbitrary code execution or denial of service when processing crafted input.
Why it matters to the business
Systems using the affected editor risk remote code execution or crashes from malicious files, increasing exposure to data theft or malware; low ecosystem prevalence reduces widespread blast radius but still demands patching on Alpine python3 deployments.
How an attack unfolds
An attacker creates a specially crafted file that triggers the use-after-free when opened in vulnerable Vim; with exploit code publicly available, the flaw can be leveraged locally to execute payloads without authentication.
How to fix it
Upgrade python3 on Alpine v3.17 to version 3.8.8-r0 in all affected packages; verify the update resolves the use-after-free in the editor component and restart any dependent services.
How to confirm the fix worked
Confirm the installed python3 package reports version 3.8.8-r0 or later; test by attempting to open known trigger files in Vim and monitor for crashes or unexpected behavior.
Typical attack path
- Craft a malicious file designed to trigger the use-after-free in Vim
- Deliver the file to the target via email, download, or shared storage
- Victim opens the file using the vulnerable editor
- Exploit executes arbitrary code or crashes the process
How to detect it
Review system logs and process execution history for Vim instances opening unexpected files; look for crash reports or memory error indicators in application logs around the time of suspicious activity.
What your security team should do
- Prioritize patching python3 to 3.8.8-r0 on Alpine v3.17 within the next maintenance window due to public exploit availability
- Scan all systems for the vulnerable Vim version and restrict opening of untrusted files until updated
- Monitor EPSS trend for any increase and review logs for suspicious editor process activity
The record
Use After Free in GitHub repository vim/vim prior to 9.0.0579.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | vim | 0 | No fix |
| Debian:12 | vim | 0 | 2:9.0.0626-1 |
| Debian:13 | vim | 0 | 2:9.0.0626-1 |
| Mageia:8 | vim | 0 | 9.0.828-1.mga8 |
| SUSE:Enterprise Storage 6 | vim | 0 | 9.0.0814-150000.5.28.1 |
| SUSE:Enterprise Storage 7 | vim | 0 | 9.0.0814-150000.5.28.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP1-ESPOS | vim | 0 | 9.0.0814-150000.5.28.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | vim | 0 | 9.0.0814-150000.5.28.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP2-ESPOS | vim | 0 | 9.0.0814-150000.5.28.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | vim | 0 | 9.0.0814-150000.5.28.1 |
| SUSE:Linux Enterprise High Performance Computing 15-ESPOS | vim | 0 | 9.0.0814-150000.5.28.1 |
| SUSE:Linux Enterprise High Performance Computing 15-LTSS | vim | 0 | 9.0.0814-150000.5.28.1 |
| SUSE:Linux Enterprise Micro 5.1 | vim | 0 | 9.0.0814-150000.5.28.1 |
| SUSE:Linux Enterprise Micro 5.2 | vim | 0 | 9.0.0814-150000.5.28.1 |
| SUSE:Linux Enterprise Micro 5.3 | vim | 0 | 9.0.0814-150000.5.28.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP3 | vim | 0 | 9.0.0814-150000.5.28.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP4 | vim | 0 | 9.0.0814-150000.5.28.1 |
| SUSE:Linux Enterprise Module for Desktop Applications 15 SP3 | vim | 0 | 9.0.0814-150000.5.28.1 |
| SUSE:Linux Enterprise Module for Desktop Applications 15 SP4 | vim | 0 | 9.0.0814-150000.5.28.1 |
| SUSE:Linux Enterprise Server 12 SP2-BCL | vim | 0 | 9.0.0814-17.9.1 |
| SUSE:Linux Enterprise Server 12 SP3-BCL | vim | 0 | 9.0.0814-17.9.1 |
| SUSE:Linux Enterprise Server 12 SP4-LTSS | vim | 0 | 9.0.0814-17.9.1 |
| SUSE:Linux Enterprise Server 12 SP5 | vim | 0 | 9.0.0814-17.9.1 |
| SUSE:Linux Enterprise Server 15 SP1-BCL | vim | 0 | 9.0.0814-150000.5.28.1 |
| SUSE:Linux Enterprise Server 15 SP1-LTSS | vim | 0 | 9.0.0814-150000.5.28.1 |
| SUSE:Linux Enterprise Server 15 SP2-BCL | vim | 0 | 9.0.0814-150000.5.28.1 |
| SUSE:Linux Enterprise Server 15 SP2-LTSS | vim | 0 | 9.0.0814-150000.5.28.1 |
| SUSE:Linux Enterprise Server 15-LTSS | vim | 0 | 9.0.0814-150000.5.28.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP4 | vim | 0 | 9.0.0814-17.9.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | vim | 0 | 9.0.0814-17.9.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 | vim | 0 | 9.0.0814-150000.5.28.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP1 | vim | 0 | 9.0.0814-150000.5.28.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP2 | vim | 0 | 9.0.0814-150000.5.28.1 |
| SUSE:Manager Proxy 4.1 | vim | 0 | 9.0.0814-150000.5.28.1 |
| SUSE:Manager Retail Branch Server 4.1 | vim | 0 | 9.0.0814-150000.5.28.1 |
| SUSE:Manager Server 4.1 | vim | 0 | 9.0.0814-150000.5.28.1 |
| SUSE:OpenStack Cloud 9 | vim | 0 | 9.0.0814-17.9.1 |
| SUSE:OpenStack Cloud Crowbar 9 | vim | 0 | 9.0.0814-17.9.1 |
| Ubuntu:20.04:LTS | vim | 0 | No fix |
| Ubuntu:20.04:LTS | vim | 0 | 2:8.1.2269-1ubuntu5.18 |
| Ubuntu:22.04:LTS | vim | 0 | 2:8.2.3995-1ubuntu2.12 |
| Ubuntu:Pro:14.04:LTS | vim | 0 | No fix |
| Ubuntu:Pro:14.04:LTS | vim | 0 | 2:7.4.052-1ubuntu3.1+esm13 |
| Ubuntu:Pro:16.04:LTS | vim | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | vim | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | vim | 0 | 2:8.0.1453-1ubuntu1.13+esm5 |
| Ubuntu:Pro:20.04:LTS | vim | 0 | No fix |
| openSUSE:Leap 15.3 | vim | 0 | 9.0.0814-150000.5.28.1 |
| openSUSE:Leap 15.4 | vim | 0 | 9.0.0814-150000.5.28.1 |
| openSUSE:Leap Micro 5.2 | vim | 0 | 9.0.0814-150000.5.28.1 |
| openSUSE:Leap Micro 5.3 | vim | 0 | 9.0.0814-150000.5.28.1 |
Related vulnerabilities
- CVE-2025-29768 Vim, a text editor, is vulnerable to potential data loss with zip.vim and special crafted… Also affects vim
- CVE-2025-27423 Vim is an open source, command line text editor. Also affects vim
- CVE-2025-24014 Vim is an open source, command line text editor. Also affects vim
- CVE-2025-22134 When switching to other buffers using the :all command and visual mode still being… Also affects vim
- CVE-2024-47814 Vim is an open source, command line text editor. Also affects vim
- CVE-2024-43802 Vim is an improved version of the unix vi text editor. Also affects vim
- CVE-2024-43374 The UNIX editor Vim prior to version 9.1.0678 has a use-after-free error in argument list… Also affects vim
- CVE-2024-22667 Vim before 9.0.2142 has a stack-based buffer overflow because did_set_langmap in map.c… Also affects vim