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

Published Oct 27, 2023
·
Updated

Last updated 24 July 2024

Other sources

Vim is an improved version of the good old UNIX editor Vi. Heap-use-after-free in memory allocated in the function gagrowinner in in the file src/alloc.c at line 748, which is freed in the file src/exdocmd.c in the function docmdline 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.

Launchpad

Affected Software

2 affected componentsFixes available
vim Vim<9.0.2068
debian/vim<=2:8.2.2434-3+deb11u1, <=2:8.2.2434-3+deb11u3, <=2:9.0.1378-2+deb12u2
2:9.1.1230-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/vim to a version that resolves this vulnerability.

    Fixed in 2:9.1.1230-1
  2. Upgrade

    Upgrade Vim to a version that resolves this vulnerability.

    Fixed in 9.0.2068

Event History

Oct 27, 2023
CVE Published
via MITRE·06:36 PM
Data Sourced
via MITRE·06:36 PM
DescriptionSeverityWeakness
Jan 12, 2024
Data Sourced
via Launchpad·12:26 AM
Description
Sep 16, 2024
Data Sourced
via Ubuntu·02:17 AM
RemedyDescriptionSeverityAffected Software
Mar 27, 2025
Data Sourced
via Debian·04:29 AM
DescriptionAffected Software

Frequently Asked Questions

1

What is CVE-2023-46246?

CVE-2023-46246 is a vulnerability in Vim, a text editor, that allows for a heap-use-after-free vulnerability in the memory allocation process.

2

How severe is CVE-2023-46246?

CVE-2023-46246 has a severity rating of medium with a severity value of 5.5.

3

Which software versions are affected by CVE-2023-46246?

Vim versions up to and excluding 9.0.2068 are affected by CVE-2023-46246.

4

How can I fix CVE-2023-46246?

To fix CVE-2023-46246, users should update to a version of Vim that is newer than 9.0.2068.

5

Where can I find more information about CVE-2023-46246?

More information about CVE-2023-46246 can be found at the following references: [GitHub Commit](https://github.com/vim/vim/commit/9198c1f2b1ddecde22af918541e0de2a32f0f45a) and [GitHub Security Advisory](https://github.com/vim/vim/security/advisories/GHSA-q22m-h7m2-9mgm).

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203