vim: Use After Free
CVE-2022-3705 is a high-severity use after free vulnerability in vim, with a CVSS 3.1 base score of 7.5 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, but only if a user takes part, for example by opening a link or file. There is no confirmed exploitation so far. EPSS estimates a 1.68% chance of exploitation within 30 days, higher than 77% of scored CVEs.
High severity with no evidence of exploitation so far.
What to do
- Check which version of vim you run against the affected versions below, and install the vendor's latest release.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
- Because the attack needs a user to take part, warn users about unexpected links and files related to this product until it is patched.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Vim | vim | Not specified in the record | Not stated |
| Fedora Project | Fedora | 35; 36 | Not stated |
| Debian | Debian Linux | 10.0 | Not stated |
| NetApp | Active Iq Unified Manager | Not specified in the record | Not stated |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- HighSuccess depends on conditions outside the attacker's control.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- RequiredA user must take an action such as opening a file or link.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 5.0 | Medium | CNA (vuldb.com) |
| CVSS 3.1 | 7.5 | High | NVD |
Official description
A vulnerability was found in vim and classified as problematic. Affected by this issue is the function qf_update_buffer of the file quickfix.c of the component autocmd Handler. The manipulation leads to use after free. The attack may be launched remotely. Upgrading to version 9.0.0805 is able to address this issue. The name of the patch is d0fab10ed2a86698937e3c3fed2f10bd9bb5e731. It is recommended to upgrade the affected component. The identifier of this vulnerability is VDB-212324.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Use After Free
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.
How developers prevent this class of flaw
- Choose a language that provides automatic memory management.
- When freeing pointers, be sure to set them to NULL once they are freed. However, the utilization of multiple or complex data structures may lower the usefulness of this strategy.
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: partial).
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
- github.com/vim/vim/commit/d0fab10ed2a86698937e3c3fed2f10bd9bb5e731Third Party Advisory
Third-party and government advisories
- seclists.org/fulldisclosure/2023/Jan/19Third Party Advisory
- lists.debian.org/debian-lts-announce/2022/11/msg00009.htmlMailing List, Third Party Advisory
- security.netapp.com/advisory/ntap-20221223-0004/Third Party Advisory
- support.apple.com/kb/HT213605Third Party Advisory
- vuldb.com/?id.212324Permissions Required, Third Party Advisory
Other references
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/4JCW33NOLMELTTTDJH7W…
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/GTBVD4J2SKVSWK4VBN5J…
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/JYEK5RNMH7MVQH6RPBKL…
- security.gentoo.org/glsa/202305-16
Other vulnerabilities in vim
- 7.8 High severity
- 7.8 High severity
- 8.8 High severity
- 7.8 High severity
- 7.8 High severity
- 7.3 High severity
Recent Use After Free vulnerabilities
- 7.8 High severity
- 7.8 High severity
- 8.8 High severity
- 7.5 High severity
- 7.0 High severity
- 8.8 High severity
Spotted an error? Tell us.