VYPR
Unrated severityNVD Advisory· Published Nov 16, 2023· Updated Feb 13, 2025

overflow with count for :s command in vim

CVE-2023-48233

Description

Vim's :s command with a very large count can cause an integer overflow leading to potential crash; fixed in version 9.0.2108.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Vim's :s command with a very large count can cause an integer overflow leading to potential crash; fixed in version 9.0.2108.

Vulnerability

The vulnerability resides in Vim's :s (substitute) command when a numeric count larger than INT_MAX (2147483647) is supplied. Before the fix, Vim only verified that the count was positive but not that it fit within a signed long variable, causing an integer overflow that could lead to undefined behavior or a crash. Affected versions include all Vim releases prior to 9.0.2108 [1][2][3].

Exploitation

An attacker must trick a user into executing a command like :s///{very large count} in Vim, requiring user interaction. The attacker can craft a malicious file or social engineer the command. No special privileges are needed beyond normal Vim use. The overflow occurs during count parsing, and Vim may attempt to allocate or iterate based on the overflowed value [1][3].

Impact

The impact is low. Successful exploitation may cause a Vim crash, resulting in a denial of service. According to the advisory, a crash may not occur in all situations, and there is no evidence of code execution or data corruption [1][3].

Mitigation

The fix is included in Vim version 9.0.2108, released on 2023-11-15 approximately. Commit ac6378773 adds a check: if the count is >= INT_MAX, Vim aborts with error E1510 (value too large). Users should upgrade to 9.0.2108 or later. No workarounds are available [2][3].

AI Insight generated on May 25, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

27

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

7

News mentions

0

No linked articles in our index yet.