Cyber Resilience

CVE-2023-46246

Memory Safety in Vim ≤ 9.0.2068

Public PoCMemory Safety
Published
27 October 2023
Modified
23 June 2026
Patch / advisory
CVSS Score v3.1 4.0
Click a component to see what it means
Raw vectorCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
EPSS Score 0.0037 29th percentile
Risk Priority 35 floored blend · peak EPSS

Summary

CVE-2023-46246 is a medium-severity Integer Overflow or Wraparound (CWE-190) vulnerability in Vim Vim. Its CVSS base score is 4.0 (Medium).

Operationally, exploitation aligns with the MITRE ATT&CK technique Exploitation for Client Execution (T1203); ranked at the 29th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.

EU & UK References

Vulnerability Data

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…

more

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.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise TechniquesAI

T1203 Exploitation for Client Execution Execution
Adversaries may exploit software vulnerabilities in client applications to execute code.
T1499.004 Application or System Exploitation Impact
Adversaries may exploit software vulnerabilities that can cause an application or system to crash and deny availability to users.
Why these techniques?

Heap-use-after-free via integer overflow in Vim's :history command enables exploitation for client execution (potential RCE) or endpoint DoS through application exploitation.

CVEs Like This One

CVE-2023-2610Same product: Vim Vim
CVE-2023-48706Same product: Vim Vim
CVE-2025-55157Same product: Vim Vim
CVE-2024-41965Same product: Vim Vim
CVE-2023-5535Same product: Vim Vim
CVE-2023-48237Same product: Vim Vim
CVE-2023-48234Same product: Vim Vim
CVE-2023-48235Same product: Vim Vim
CVE-2023-48233Same product: Vim Vim
CVE-2025-26603Same product: Vim Vim

Affected Assets

vim
vim
≤ 9.0.2068

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

Detect
Catch it (NIST detect / respond)

Harden
Shrink the surface (DISA STIG)
  • 3 hardening rules · 3 OS baselines
Validate
Prove the fix (OWASP ASVS)
  • V5.2.6
  • V1.4.3

Likely Mitigating Controls AI

Per-CVE control mapping for this CVE has not run yet; the list below is derived from the weakness types (CWEs) cited in the NVD entry.

addresses: CWE-416

Use-after-free exploits that achieve arbitrary code execution are blocked or significantly hardened by non-executable pages and ASLR.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-06 mostly match
prevents

Secure SDLC practices directly require use of safe arithmetic, bounds checks, and testing that prevent integer overflows.

ID.RA-01 partial match
prevents

Vulnerability identification processes can discover use-after-free issues via scanning or analysis but do not prevent their introduction.

PR.PS-02 partial match
prevents

Routine patching removes known use-after-free instances after they have been introduced in released software.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

detects

Security testing in development can detect integer overflows before release.

prevents

Secure SDLC mandates input validation and arithmetic checks that prevent integer overflows.

degrades

Application security requirements include bounds checking and safe arithmetic to avoid overflow conditions.

degrades

Secure architecture principles require defensive coding patterns that mitigate integer wraparound risks.

prevents

Secure coding standards explicitly forbid unsafe integer operations and mandate overflow-safe constructs.

prevents

Change-management processes help ensure memory-safety fixes are deployed consistently.

References