Use After Free Affecting vim/vim package, versions [,9.1.0648)


Severity

Recommended
0.0
low
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    Exploit Maturity
    Proof of concept
    EPSS
    0.04% (11th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-UNMANAGED-VIMVIM-7578024
  • published 2 Aug 2024
  • disclosed 1 Aug 2024
  • credit Suyue Guo

How to fix?

Upgrade vim/vim to version 9.1.0648 or higher.

Overview

Affected versions of this package are vulnerable to Use After Free due to the dialog_changed process. An attacker can cause a crash by exploiting the double-free condition to trigger a heap-use-after-free error.

PoC

CFLAGS="-fsanitize=address -g" CXXFLAGS="-fsanitize=address -g" LDFLAGS="-fsanitize=address" ./configure --with-features=huge --enable-gui=none

export ASAN_OPTIONS=abort_on_error=1:detect_leaks=1:malloc_context_size=25:symbolize=1:log_path=./asan.log

make

References

CVSS Scores

version 4.0
version 3.1
Expand this section

Snyk

Recommended
1 low
  • Attack Vector (AV)
    Local
  • Attack Complexity (AC)
    Low
  • Attack Requirements (AT)
    Present
  • Privileges Required (PR)
    Low
  • User Interaction (UI)
    Passive
  • Confidentiality (VC)
    Low
  • Integrity (VI)
    Low
  • Availability (VA)
    Low
  • Confidentiality (SC)
    None
  • Integrity (SI)
    None
  • Availability (SA)
    None