What’s Vulnerable › Vulnerabilities

CVE-2023-46246: Integer Overflow in :history command in Vim

Description

Vim is an improved version of the good old UNIX editor Vi. Heap-use-after-free in memory allocated in the function `ga_grow_inner` in in the file `src/alloc.c` at line 748, which is freed in the file `src/ex_docmd.c` in the function `do_cmdline` at line 1010 and then used again in `src/cmdhist.c` at line 759. When using the `:history` command, it's possible that the provided argument overflows the accepted value. Causing an Integer Overflow and potentially later an use-after-free. This vulnerability has been patched in version 9.0.2068.

Affected products

How to fix

Upgrade to a fixed version: vim/vim 9.0.2068. Check the vendor advisory for mitigations.

References

Get alerted when CVE-2023-46246 or the next vulnerability affects your stack