{"schemaVersion":3,"id":"CVE-2023-46246","aliases":["MGASA-2023-0314","UBUNTU-CVE-2023-46246","DEBIAN-CVE-2023-46246"],"status":"published","duplicateOf":null,"title":null,"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.","dates":{"published":"2023-10-27T18:36:23.907Z","modified":"2026-06-23T17:19:09.629Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":5.5,"severity":"medium","version":"3.1","versionLabel":"v3.1","source":"NVD","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":4,"severity":"medium","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":4,"severity":"medium","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","exploitability":6.4,"impact":2.3,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Debian","score":5.5,"severity":"medium","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","exploitability":4.6,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":5.5,"severity":"medium","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.00366,"percentile":0.2908,"severity":"low","asOf":"2026-10-20T00:00:00.000Z","change":{"pp":0,"baselineDate":"2026-09-20T00:00:00.000Z","baselineScore":0.00366},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.00366,"percentile":0.2908}],"last30":[{"date":"2026-09-20T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00366,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.00366,"percentile":0.2908}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[{"id":"GITHUB_VIM_VIM","name":"Vim","source":"github","url":"https://github.com/vim/vim/issues/3711","maturity":"poc","reliabilityScore":0.3,"verified":false,"type":null,"platforms":[],"requiresAuth":null,"exploitdb":null,"metasploit":null}],"exploitCount":1,"weaknesses":[{"id":"CWE-190","name":"Integer Overflow or Wraparound","description":"The product performs a calculation that can\n         produce an integer overflow or wraparound when the logic\n         assumes that the resulting value will always be larger than\n         the original value. This occurs when an integer value is\n         incremented to a value that is too large to store in the\n         associated representation. When this occurs, the value may\n         become a very small or negative number.","type":"weakness","status":"Stable","abstraction":"Base","likelihoodOfExploit":"Medium","url":"https://cwe.mitre.org/data/definitions/190.html"},{"id":"CWE-416","name":"Use After Free","description":"The 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.","type":"weakness","status":"Stable","abstraction":"Variant","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/416.html"}],"affected":[{"vendor":"debian","product":"vim","name":"vim","label":"vim","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/vim","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null},{"text":"< 2:9.0.2087-1","noFixRecorded":false,"fixedIn":null}],"versionsText":"All versions (No fix recorded) | < 2:9.0.2087-1","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"vim","name":"vim","label":"vim","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/vim","purlType":"deb","versions":[{"text":"< 2:7.4.052-1ubuntu3.1+esm15","noFixRecorded":false,"fixedIn":null},{"text":"< 2:7.4.1689-3ubuntu1.5+esm22","noFixRecorded":false,"fixedIn":null},{"text":"< 2:8.0.1453-1ubuntu1.13+esm7","noFixRecorded":false,"fixedIn":null},{"text":"< 2:8.1.2269-1ubuntu5.21","noFixRecorded":false,"fixedIn":null},{"text":"< 2:8.2.3995-1ubuntu2.15","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 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","eol":null,"hubHref":null},{"vendor":"mageia","product":"vim","name":"vim","label":"vim","ecosystem":"Mageia","cpePart":null,"purl":"pkg:rpm/mageia/vim","purlType":"rpm","versions":[{"text":"< 9.0.2087-1.mga8","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 9.0.2087-1.mga8","eol":null,"hubHref":null},{"vendor":"mageia","product":"vim","name":"vim","label":"vim","ecosystem":"Mageia","cpePart":null,"purl":"pkg:rpm/mageia/vim","purlType":"rpm","versions":[{"text":"< 9.0.2087-1.mga9","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 9.0.2087-1.mga9","eol":null,"hubHref":null},{"vendor":"vim","product":"vim","name":"vim","label":"vim","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≤ 9.0.2067","noFixRecorded":false,"fixedIn":null},{"text":"< 9.0.2068","noFixRecorded":false,"fixedIn":null}],"versionsText":"≤ 9.0.2067 | < 9.0.2068","eol":null,"hubHref":"/vendor/vim/vim"}],"affectedCount":5,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/vim/vim/security/advisories/GHSA-q22m-h7m2-9mgm","label":"github.com/vim/vim/security/advisories/GHSA-q22m-h7m2-9mgm","hostname":"github.com","tags":["X Refsource CONFIRM","REPORT","Exploit","Third Party Advisory"]},{"url":"https://github.com/vim/vim/commit/9198c1f2b1ddecde22af918541e0de2a32f0f45a","label":"github.com/vim/vim/commit/9198c1f2b1ddecde22af918541e0de2a32f0f45a","hostname":"github.com","tags":["X Refsource MISC","REPORT","Patch"]},{"url":"https://security.netapp.com/advisory/ntap-20231208-0006/","label":"security.netapp.com/advisory/ntap-20231208-0006/","hostname":"security.netapp.com","tags":[]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/DNMFS3IH74KEMMESOA3EOB6MZ56TWGFF/","label":"lists.fedoraproject.org/archives/…","hostname":"lists.fedoraproject.org","tags":[]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/IVA7K73WHQH4KVFDJQ7ELIUD2WK5ZT5E/","label":"lists.fedoraproject.org/archives/…","hostname":"lists.fedoraproject.org","tags":[]},{"url":"https://advisories.mageia.org/MGASA-2023-0314.html","label":"advisories.mageia.org/MGASA-2023-0314.html","hostname":"advisories.mageia.org","tags":["Advisory"]},{"url":"https://bugs.mageia.org/show_bug.cgi?id=32455","label":"bugs.mageia.org/show_bug.cgi?id=32455","hostname":"bugs.mageia.org","tags":["REPORT"]},{"url":"https://www.openwall.com/lists/oss-security/2023/10/26/1","label":"www.openwall.com/lists/oss-security/2023/10/26/1","hostname":"www.openwall.com","tags":["WEB"]},{"url":"https://ubuntu.com/security/CVE-2023-46246","label":"ubuntu.com/security/CVE-2023-46246","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://ubuntu.com/security/notices/USN-6557-1","label":"ubuntu.com/security/notices/USN-6557-1","hostname":"ubuntu.com","tags":["Advisory"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2023-46246","label":"www.cve.org/CVERecord?id=CVE-2023-46246","hostname":"www.cve.org","tags":["REPORT"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2023-46246","label":"security-tracker.debian.org/tracker/CVE-2023-46246","hostname":"security-tracker.debian.org","tags":["Advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-46246","label":"nvd.nist.gov/vuln/detail/CVE-2023-46246","hostname":"nvd.nist.gov","tags":["Oval","Advisory"]}],"lineage":{"upstream":[],"downstream":["SUSE-SU-2023:4557-1","SUSE-SU-2023:4560-1","SUSE-SU-2023:4587-1","USN-6557-1"],"duplicates":[],"related":["SUSE-SU-2023:4557-1","SUSE-SU-2023:4560-1","SUSE-SU-2023:4587-1","USN-6557-1"]},"timeline":[{"kind":"published","date":"2023-10-27T18:36:23.907Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2026-06-23T17:19:09.629Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":32,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-20T15:31:11.839Z","stale":false,"partial":false}}