Process-memory read via unchecked insert-completion offset
Published Jul 2, 2022 · Updated Aug 3, 2024
Out-of-bounds read in Vim before 9.0.0020 allows context-dependent attackers to read process memory through insert completion. In src/insexpand.c, ins_compl_stop() adds get_compl_len() to the completion string without first proving that the offset is shorter than that string, so Ctrl-E cancellation can pass a pointer beyond its terminator to ins_bytes(). Exploitation requires a user to enter the crafted completion sequence and cancel it; the published patch demonstrates a read past the string boundary rather than a write.
Summary
What happened
Out-of-bounds read in Vim before 9.0.0020 allows context-dependent attackers to read process memory through insert completion. In src/insexpand.c, ins_compl_stop() adds get_compl_len() to the completion string without first proving that the offset is shorter than that string, so Ctrl-E cancellation can pass a pointer beyond its terminator to ins_bytes(). Exploitation requires a user to enter the crafted completion sequence and cancel it; the published patch demonstrates a read past the string boundary rather than a write.
The record
- CVE
- CVE-2022-2286
- Published
- Jul 2, 2022
- Updated
- Aug 3, 2024
- Vendor
- Vim
- Product
- Vim
- Classifications
- CWE-125
- Attack vector
- local
- Privileges
- unauthenticated
Timeline
How it unfolded
- Jul 2, 2022CVE publishedPublication date reported by the CVE source.
- Aug 3, 2024Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=unspecified <9.0
What conditions does exploitation require?
What is affected?
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- Huntr insert-completion exploit artifactproof of concept · unverified
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo