CVE Database›CVE-2022-1674

CVE-2022-1674

vim: NULL pointer dereference in vim_regexec_string() of regexp.c

Loading…

Severity

Low

Red Hat Product Security

5.5

CVSS 3.1

Review impact separately from score.

Published · May 12, 2022

Updated · October 9, 2026

Description

A NULL pointer dereference flaw was found in vim's vim_regexec_string() function in regexp.c file. The issue occurs when the function tries to match the buffer with an invalid pattern. This flaw allows an attacker to trick a user into opening a specially crafted file, triggering a NULL pointer dereference that causes an application to crash, leading to a denial of service.

Statement

All versions of Vim shipped with Red Hat Enterprise Linux are not affected, because no vulnerable code is present in our code-base.

Red Hat Enterprise Virtualization 4 consumes RHEL-8 vim, and as RHEL-8 is not affected, Hence, RHEV is also not affected.

Red Hat Product Security has rated this issue as having a Low-security impact because the "victim" has to run an untrusted file IN SCRIPT MODE. Someone who is running untrusted files in script mode is equivalent to someone just taking a random python script and running it.

For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

Untrusted vim scripts with -s [scriptin] are not recommended to run.

CVSS / CWE

CVSS 3.1 · 5.5
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

CWE-476 · NULL Pointer Dereference