Buffer Overflow Affecting vim/vim package, versions [,9.0.0060)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.03% (9th 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 Learn

Learn about Buffer Overflow vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-UNMANAGED-VIMVIM-2964178
  • published31 Jul 2022
  • disclosed25 Jul 2022
  • creditxiaoge1001

Introduced: 25 Jul 2022

CVE-2022-2522  (opens in a new tab)
CWE-122  (opens in a new tab)

How to fix?

Upgrade vim/vim to version 9.0.0060 or higher.

Overview

Affected versions of this package are vulnerable to Buffer Overflow in ins_compl_infercase_gettext() at src/insexpand.c.

PoC:

export CFLAGS="-g3 -fsanitize=address -fno-common -fno-omit-frame-pointer -fPIC"
export LDFLAGS="-g3 -fsanitize=address -fno-common -fno-omit-frame-pointer -fPIC"
./configure
make -j4
./src/vim -u NONE -i NONE -n -m -X -Z -e -s -S ./poc_hbor4_s.dat -c :qa!

CVSS Base Scores

version 3.1