CVE-2023-46246: Integer Overflow in :history command in Vim
Vulnerability summary
CVE-2023-46246 is a medium (CVSS 5.5) Integer Overflow or Wraparound vulnerability in vim. EPSS estimates a 0.37% chance of exploitation in the next 30 days, higher than 33.3% of scored vulnerabilities. 1 public exploit is recorded.
Not severe (CVSS 4, local access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 4 · Related 4Timeline
- 27-10-2023PublishedVulnerability first disclosed.
- 23-06-2026Last modifiedVulnerability information updated.
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.
CVSS metrics
4 scores · 4 sources · 1 version- CVE.orgCNA4.0MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:LDiffers
- OSV · UbuntuEcosystem advisory · calculated4.0MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:LDiffers
- OSV · DebianEcosystem advisory · calculated5.5MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
EPSS trend
Probability
0.37%
Chance of exploitation in the next 30 days
Percentile
33%
Versus all other CVEs
30-day change
Decrease -0.01 pp
From 0.38% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
1 foundVim
Maturity: poc
Weaknesses
CWE · root cause- CWE-190Integer Overflow or WraparoundThe product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. This occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may become a very small or negative number.
- CWE-416Use After FreeThe product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer.
Affected systems
Known conditions: local access, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Mageia2 products
- vim< 9.0.2087-1.mga8
- vim< 9.0.2087-1.mga9
Debian1 product
- vimAll versions (No fix recorded) | < 2:9.0.2087-1
Ubuntu1 product
- vim< 2:7.4.052-1ubuntu3.1+esm15 | < 2:7.4.1689-3ubuntu1.5+esm22 | < 2:8.0.1453-1ubuntu1.13+esm7 | < 2:8.1.2269-1ubuntu5.21 | < 2:8.2.3995-1ubuntu2.15
Vim1 product
- vim≤ 9.0.2067 | < 9.0.2068
4 vendors · 5 products
References
13 links- github.com/vim/vim/security/advisories/GHSA-q22m-h7m2-9mgmX Refsource CONFIRMREPORTExploitThird Party Advisory