Cloudanix VulnDB

CVE-2024-45306

None

CVSS

—

EPSS

0.3%

Published

Sep 2, 2024

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A bug in the popular Vim text editor can make the program crash under certain editing conditions.

Exploitation
Requires User Interaction
Attacker needs
Local User
Complexity
Theoretical
Impact
Denial Of Service
Component
Application
Class
Memory Corruption
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Invalid cursor position after optimization allows heap-buffer-overflow when accessing line pointer beyond end of line in Vim text editor.

Why it matters to the business

Unexpected crashes in the Vim editor can interrupt editing workflows and require restarts, with low risk of further compromise based on observed effects.

How an attack unfolds

An attacker crafts input that leaves the cursor position invalid after the removed validation loop; when Vim attempts to dereference the line at that position a heap overflow occurs, resulting in a crash. No remote code execution or data theft has been observed.

How to fix it

Upgrade Vim to version containing commit 396fd1ec2956307755392a1c61f55d5c1847f308 or later release v9.1.0707. Rebuild from source if using GIT checkout.

How to confirm the fix worked

Confirm Vim reports version at or above the fixed commit; test with files that previously triggered the cursor miscalculation to verify no crash occurs.

Typical attack path

  1. Deliver a specially crafted file or command sequence to Vim
  2. Trigger cursor movement or display recalculation that leaves position invalid
  3. Cause heap access beyond allocated line buffer leading to crash

How to detect it

Examine system or application crash logs for Vim segmentation faults or heap-related aborts; no persistent artifacts or network indicators are associated with this issue.

What your security team should do

  • Prioritize upgrade of all Vim installations to the patched commit within normal patching cycles
  • Monitor upstream Vim releases for any follow-up hardening changes
  • Review build pipelines that consume Vim from GIT to ensure pinned fixed revision

The record

Vim is an open source, command line text editor. Patch v9.1.0038 optimized how the cursor position is calculated and removed a loop, that verified that the cursor position always points inside a line and does not become invalid by pointing beyond the end of a line. Back then we assumed this loop is unnecessary. However, this change made it possible that the cursor position stays invalid and points beyond the end of a line, which would eventually cause a heap-buffer-overflow when trying to access the line pointer at the specified cursor position. It's not quite clear yet, what can lead to this situation that the cursor points to an invalid position. That's why patch v9.1.0707 does not include a test case. The only observed impact has been a program crash. This issue has been addressed in with the patch v9.1.0707. All users are advised to upgrade.

Affected packages

Ecosystem Package Introduced Fixed
Chainguard vim 0 9.1.0718-r0
Chainguard vim-doc 0 9.1.0718-r0
Debian:13 vim 0 2:9.1.0709-1
Debian:14 vim 0 2:9.1.0709-1
SUSE:Linux Enterprise Micro 5.1 vim 0 9.1.1101-150000.5.69.1
SUSE:Linux Enterprise Micro 5.2 vim 0 9.1.1101-150000.5.69.1
SUSE:Linux Enterprise Micro 5.3 vim 0 9.1.1101-150000.5.69.1
SUSE:Linux Enterprise Micro 5.4 vim 0 9.1.1101-150000.5.69.1
SUSE:Linux Enterprise Micro 5.5 vim 0 9.1.1101-150500.20.21.1
SUSE:Linux Enterprise Module for Basesystem 15 SP6 vim 0 9.1.1101-150500.20.21.1
SUSE:Linux Enterprise Module for Desktop Applications 15 SP6 vim 0 9.1.1101-150500.20.21.1
SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 vim 0 9.1.1101-17.41.1
Ubuntu:20.04:LTS vim 0 No fix
Ubuntu:22.04:LTS vim 0 No fix
Ubuntu:24.04:LTS vim 0 No fix
Ubuntu:Pro:14.04:LTS vim 0 No fix
Ubuntu:Pro:16.04:LTS vim 0 No fix
Ubuntu:Pro:18.04:LTS vim 0 No fix
Wolfi vim 0 9.1.0718-r0
Wolfi vim-doc 0 9.1.0718-r0
openSUSE:Leap 15.6 vim 0 9.1.1101-150500.20.21.1

Related vulnerabilities