{"id":"CVE-2023-46246","state":"PUBLISHED","title":"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.","publishedAt":"2023-10-27T18:36:23.907Z","updatedAt":"2026-06-23T17:19:09.629Z","severity":{"score":4,"label":"Medium","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","source":"GitHub_M"},"assigner":"GitHub_M","products":["vim vim"],"affected":[{"vendor":"vim","product":"vim","versions":[{"version":"<= 9.0.2067","status":"affected"}]}],"references":["https://github.com/vim/vim/security/advisories/GHSA-q22m-h7m2-9mgm","https://github.com/vim/vim/commit/9198c1f2b1ddecde22af918541e0de2a32f0f45a","https://security.netapp.com/advisory/ntap-20231208-0006/","https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/DNMFS3IH74KEMMESOA3EOB6MZ56TWGFF/","https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/IVA7K73WHQH4KVFDJQ7ELIUD2WK5ZT5E/"],"weaknesses":["CWE-416","CWE-190"],"ingestedAt":"2026-10-29T20:06:24.729Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2023/46xxx/CVE-2023-46246.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2023-46246","state":"PUBLISHED","datePublished":"2023-10-27T18:36:23.907Z","dateUpdated":"2026-06-23T17:19:09.629Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2023-10-19T20:34:00.948Z"},"containers":{"cna":{"title":"Integer Overflow in :history command in Vim","descriptions":[{"lang":"en","value":"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":[{"vendor":"vim","product":"vim","versions":[{"version":"<= 9.0.2067","status":"affected"}]}],"references":[{"url":"https://github.com/vim/vim/security/advisories/GHSA-q22m-h7m2-9mgm","name":"https://github.com/vim/vim/security/advisories/GHSA-q22m-h7m2-9mgm","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/vim/vim/commit/9198c1f2b1ddecde22af918541e0de2a32f0f45a","name":"https://github.com/vim/vim/commit/9198c1f2b1ddecde22af918541e0de2a32f0f45a","tags":["x_refsource_MISC"]},{"url":"https://security.netapp.com/advisory/ntap-20231208-0006/"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/DNMFS3IH74KEMMESOA3EOB6MZ56TWGFF/"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/IVA7K73WHQH4KVFDJQ7ELIUD2WK5ZT5E/"}],"metrics":[{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"LOCAL","availabilityImpact":"LOW","baseScore":4,"baseSeverity":"MEDIUM","confidentialityImpact":"NONE","integrityImpact":"NONE","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-416","lang":"en","description":"CWE-416: Use After Free","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-190","lang":"en","description":"CWE-190: Integer Overflow or Wraparound","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2023-12-17T02:06:15.239Z"},"source":{"advisory":"GHSA-q22m-h7m2-9mgm","discovery":"UNKNOWN"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://github.com/vim/vim/security/advisories/GHSA-q22m-h7m2-9mgm","name":"https://github.com/vim/vim/security/advisories/GHSA-q22m-h7m2-9mgm","tags":["x_refsource_CONFIRM","x_transferred"]},{"url":"https://github.com/vim/vim/commit/9198c1f2b1ddecde22af918541e0de2a32f0f45a","name":"https://github.com/vim/vim/commit/9198c1f2b1ddecde22af918541e0de2a32f0f45a","tags":["x_refsource_MISC","x_transferred"]},{"url":"https://security.netapp.com/advisory/ntap-20231208-0006/","tags":["x_transferred"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/DNMFS3IH74KEMMESOA3EOB6MZ56TWGFF/","tags":["x_transferred"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/IVA7K73WHQH4KVFDJQ7ELIUD2WK5ZT5E/","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T20:37:40.133Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2023-46246","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2023-12-14T19:44:23.601809Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-06-23T17:19:09.629Z"}}]}}}