Heap-based Buffer Overflow in Vim: CVE-2023-1170 Vulnerability Overview

vim Updated 02 Oct 2025

Summary

03/03/2023
N/A
Yes i
Medium
6.6

ALPINE-CVE-2023-1170: Heap-based Buffer Overflow in GitHub repository vim/vim prior to 9.0.1376. Affects vim versions < 9.0.1395-r0. Fixed in 9.0.1395-r0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Vim is a highly configurable text editor built to enable efficient text editing. It is widely used by developers and system administrators due to its powerful features, including syntax highlighting, multi-level undo, and extensive plugin support. However, like many software packages, Vim is susceptible to vulnerabilities that can compromise its integrity and user data. The specific vulnerability in question, CVE-2023-1170, affects multiple versions of Vim across various Alpine Linux distributions.

Vulnerability Detail

The vulnerability identified as CVE-2023-1170 is a heap-based buffer overflow that occurs in Vim prior to version 9.0.1376. This flaw can be exploited by an attacker to execute arbitrary code, potentially leading to unauthorized access to system resources or data corruption. The vulnerability arises from improper handling of memory allocation, which can allow an attacker to manipulate the program's execution flow. The CVSS score for this vulnerability is 6.6, indicating a moderate severity level.

How To Fix

Minimum fixed version

9.0.1395-r0

This is the first release that contains the fix.

sudo apk add --upgrade vim

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If immediate updating is not feasible, users can mitigate the risk by avoiding the use of specific Vim features that may trigger the vulnerability, such as certain plugins or configurations that handle external data. However, this is not a permanent solution and updating is strongly recommended.

Conclusion

The CVE-2023-1170 vulnerability in Vim presents a significant risk due to its potential for arbitrary code execution. Users are strongly advised to update to the latest patched version to safeguard their systems. Regular monitoring for vulnerabilities using tools like Vulert can further enhance security.

See every vulnerability recorded for vim →

Share this vulnerability

FAQ

CVE-2023-1170 is a heap-based buffer overflow vulnerability in Vim that can lead to arbitrary code execution.

You can check your Vim version by running 'vim --version' in the terminal. If it is below 9.0.1395-r0, it is vulnerable.

Exploitation of this vulnerability could allow attackers to execute arbitrary code, potentially leading to data loss or unauthorized access.

Yes, tools like Vulert can monitor your software for open-source vulnerabilities using just a manifest file, alerting you in real-time.

Detailed information can be found in the official CVE database or by visiting the vulnerability report at https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2023-1170.json.

Related vulnerabilities

Recent vulnerabilities recorded for vim.

How To Fix

Minimum fixed version

9.0.1395-r0

This is the first release that contains the fix.

sudo apk add --upgrade vim

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback