# CVE-2022-0158: Heap-based Buffer Overflow in vim/vim

- Severity: Medium 6.8 (CVSS:3.0, scored by @huntrdev) `CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.83%, higher than 79% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2022-01-10T15:25:35.000Z
- Modified: 2026-06-17T04:20:04.260Z
- Weaknesses: CWE-122, CWE-787
- Assigned by: @huntrdev

## Description

vim is vulnerable to Heap-based Buffer Overflow

(As written by CVE List.)

## Affected

- vim vim/vim: from unspecified before 8.2
- vim vim: before 8.2.4049
- fedoraproject fedora: 34; 35
- apple macos: before 12.3; from 11.0 before 11.6.8

## Every score

- @huntrdev: CVSS:3.0 6.8 Medium `CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H`
- NVD: CVSS:3.1 3.3 Low `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N`
- NVD: CVSS:2.0 4.3 Medium `AV:N/AC:M/Au:N/C:P/I:N/A:N`

## References

- <https://huntr.dev/bounties/ac5d7005-07c6-4a0a-b251-ba9cdbf6738b> (exploit, patch, third-party-advisory)
- <https://github.com/vim/vim/commit/5f25c3855071bd7e26255c68bf458b1b5cf92f39> (patch, third-party-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HD5S2FC2HF22A7XQXK2XXIR46EARVWIM/> (vendor-advisory)
- <http://www.openwall.com/lists/oss-security/2022/01/15/1> (mailing-list, third-party-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3FH2J57GDA2WMBS6J56F6QQRA6BXQQFZ/> (vendor-advisory)
- <https://support.apple.com/kb/HT213183> (release-notes, third-party-advisory)
- <http://seclists.org/fulldisclosure/2022/Mar/29> (mailing-list, third-party-advisory)
- <https://support.apple.com/kb/HT213344> (third-party-advisory)
- <http://seclists.org/fulldisclosure/2022/Jul/13> (mailing-list, third-party-advisory)
- <https://security.gentoo.org/glsa/202208-32> (third-party-advisory, vendor-advisory)

## Sources

- CVE List: [CVE-2022-0158](https://www.cve.org/CVERecord?id=CVE-2022-0158), CVE Terms of Use, modified 2024-08-02
- NVD: [CVE-2022-0158](https://nvd.nist.gov/vuln/detail/CVE-2022-0158), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-0158 · Whole record: https://cve.day/CVE-2022-0158.json · Rebuilt by cve.day 2026-11-25T22:58:09.162Z
