The VIM editor
Go to file
RHEL Packaging Agent 12deb611d3 Fix CVE-2026-47162: netrw code injection via NetrwBookHistSave()
Backport upstream patch 9.2.0495 (commit f08ab2f4d7d2) to fix
CVE-2026-47162 — code injection via NetrwBookHistSave() in the
netrw plugin.

The vulnerable setline() call in s:NetrwBookHistSave() used naive
string concatenation to build Vimscript let statements, allowing
code injection through crafted directory names. The fix replaces
this with string() for proper quoting.

The patch was adjusted for the RHEL 9 Vim 8.2 codebase: netrw
path changed from runtime/pack/dist/opt/netrw/autoload/ to
runtime/autoload/, and a new test file was added.

CVE: CVE-2026-47162
Upstream patches:
 - f08ab2f4d7.patch
Resolves: RHEL-186655

This commit was backported by Ymir, a Red Hat Enterprise Linux software maintenance AI agent.

Assisted-by: Ymir
2026-07-31 16:22:25 +02:00
.fmf RHEL-351 - Enhanced TMT testing for centos-stream 2023-04-04 14:51:59 +02:00
.gitignore Merged update from upstream sources 2021-03-28 17:30:39 +00:00
0001-patch-8.2.3115-Coverity-complains-about-free_wininfo.patch 1938895 - review of important potential issues detected by static analyzers in vim-8.2.2488-1.el9 2021-08-05 14:23:39 +02:00
0001-patch-8.2.3290-Vim9-compiling-dict-may-use-pointer-a.patch 1938895 - review of important potential issues detected by static analyzers in vim-8.2.2488-1.el9 2021-08-05 14:23:39 +02:00
0001-patch-8.2.3406-on-some-systems-tests-fail-without-_R.patch 2015517 - [s390x] Vim needs to be compiled with -D_REENTRANT 2021-10-19 14:25:11 +02:00
0001-patch-8.2.3409-reading-beyond-end-of-line-with-inval.patch 2004893 - CVE-2021-3778 vim: heap-based buffer overflow in utf_ptr2char() in mbyte.c [rhel-9.0] 2021-10-15 10:41:46 +02:00
0001-patch-8.2.3428-using-freed-memory-when-replacing.patch 2004976 - CVE-2021-3796 vim: use-after-free in nv_replace() in normal.c [rhel-9.0] 2021-10-18 12:30:44 +02:00
0001-patch-8.2.3487-illegal-memory-access-if-buffer-name-.patch 2016202 - CVE-2021-3872 vim: heap-based buffer overflow in win_redr_status() drawscreen.c [rhel-9.0] 2021-10-26 12:30:06 +02:00
0001-patch-8.2.3564-invalid-memory-access-when-scrolling-.patch RHEL-40602 CVE-2021-3903 vim heap-based buffer overflow vulnerability 2024-08-05 16:39:07 +02:00
0001-patch-8.2.3625-illegal-memory-access-when-C-indentin.patch 2028342 - CVE-2021-3984 vim: illegal memory access when C-indenting could lead to Heap Buffer Overflow [rhel-9.0] 2021-12-02 12:25:29 +01:00
0001-patch-8.2.3669-buffer-overflow-with-long-help-argume.patch 2028431 - CVE-2021-4019 vim: heap-based buffer overflow in find_help_tags() in src/help.c [rhel-9.0] 2021-12-06 12:43:54 +01:00
0001-patch-8.2.3949-using-freed-memory-with-V.patch CVE-2021-4192 vim: vulnerable to Use After Free 2022-01-13 12:28:55 +01:00
0001-patch-8.2.3950-going-beyond-the-end-of-the-line-with.patch CVE-2021-4193 vim: vulnerable to Out-of-bounds Read 2022-01-13 10:49:55 +01:00
0001-patch-8.2.4120-block-insert-goes-over-the-end-of-the.patch CVE-2022-0261 vim: Heap-based Buffer Overflow in block_insert() in src/ops.c 2022-01-27 17:54:47 +01:00
0001-patch-8.2.4151-reading-beyond-the-end-of-a-line.patch CVE-2022-0318 vim: heap-based buffer overflow in utf_head_off() in mbyte.c 2022-01-27 18:20:40 +01:00
0001-patch-8.2.4154-ml_get-error-when-exchanging-windows-.patch CVE-2022-0319 vim: heap-based out-of-bounds read 2022-02-08 14:12:11 +01:00
0001-patch-8.2.4214-illegal-memory-access-with-large-tabs.patch CVE-2022-0359 vim: heap-based buffer overflow in init_ccline() in ex_getln.c 2022-01-27 18:41:20 +01:00
0001-patch-8.2.4215-illegal-memory-access-when-copying-li.patch CVE-2022-0361 vim: Heap-based Buffer Overflow in GitHub repository 2022-02-08 14:32:49 +01:00
0001-patch-8.2.4217-illegal-memory-access-when-undo-makes.patch CVE-2022-0368 vim: Out-of-bounds Read in vim 2022-02-09 09:55:42 +01:00
0001-patch-8.2.4218-illegal-memory-access-with-bracketed-.patch CVE-2022-0392 vim: heap-based buffer overflow in getexmodeline() in ex_getln.c 2022-02-10 11:30:02 +01:00
0001-patch-8.2.4245-retab-0-may-cause-illegal-memory-acce.patch CVE-2022-0417 vim: heap-based-buffer-overflow in ex_retab() of src/indent.c 2022-02-09 11:56:23 +01:00
0001-patch-8.2.4247-stack-corruption-when-looking-for-spe.patch CVE-2022-0408 vim: Stack-based Buffer Overflow in spellsuggest.c 2022-02-09 16:14:10 +01:00
0001-patch-8.2.4253-using-freed-memory-when-substitute-wi.patch CVE-2022-0413 vim: use after free in src/ex_cmds.c 2022-02-10 08:29:33 +01:00
0001-patch-8.2.4281-using-freed-memory-with-lopen-and-bwi.patch CVE-2022-0443 vim: heap-use-after-free in enter_buffer() of src/buffer.c 2022-02-10 09:01:01 +01:00
0001-patch-8.2.4327-may-end-up-with-no-current-buffer.patch CVE-2022-0554 vim: Use of Out-of-range Pointer Offset in vim prior 2022-03-28 19:01:13 +02:00
0001-patch-8.2.4359-crash-when-repeatedly-using-retab.patch CVE-2022-0572 vim: heap overflow in ex_retab() may lead to crash 2022-02-16 10:44:26 +01:00
0001-patch-8.2.4397-crash-when-using-many-composing-chara.patch CVE-2022-0629 vim: Stack-based Buffer Overflow in vim prior to 8.2 2022-02-23 15:30:22 +01:00
0001-patch-8.2.4436-crash-with-weird-vartabstop-value.patch CVE-2022-0714 vim: buffer overflow [rhel-9] 2022-02-24 14:31:35 +01:00
0001-patch-8.2.4563-z-in-Visual-mode-may-go-beyond-the-en.patch CVE-2022-0943 vim: Heap-based Buffer Overflow occurs in vim 2022-03-28 21:13:04 +02:00
0001-patch-8.2.4646-using-buffer-line-after-it-has-been-f.patch CVE-2022-1154 vim: use after free in utf_ptr2char 2022-04-25 15:55:02 +02:00
0001-patch-8.2.4774-crash-when-using-a-number-for-lambda-.patch CVE-2022-1420 vim: Out-of-range Pointer Offset 2022-04-25 16:41:45 +02:00
0001-patch-8.2.4919-can-add-invalid-bytes-with-spellgood.patch CVE-2022-1621 vim: heap buffer overflow 2022-05-24 13:37:53 +02:00
0001-patch-8.2.4925-trailing-backslash-may-cause-reading-.patch CVE-2022-1629 vim: buffer over-read 2022-05-25 10:41:36 +02:00
0001-patch-8.2.4977-memory-access-error-when-substitute-e.patch CVE-2022-1785 vim: Out-of-bounds Write 2022-06-13 07:53:12 +02:00
0001-patch-8.2.5023-substitute-overwrites-allocated-buffe.patch CVE-2022-1897 vim: out-of-bounds write in vim_regsub_both() in regexp.c 2022-06-13 14:59:14 +02:00
0001-patch-8.2.5037-cursor-position-may-be-invalid-after-.patch CVE-2022-1927 vim: buffer over-read in utf_ptr2char() in mbyte.c 2022-06-13 16:32:30 +02:00
0001-patch-9.0.0339-no-check-if-the-return-value-of-XChan.patch CVE-2022-47024 vim: no check if the return value of XChangeGC() is NULL 2023-02-09 17:14:22 +01:00
0001-patch-9.0.1477-crash-when-recovering-from-corrupted-.patch RHEL-155423 CVE-2026-28421 vim: Vim: Denial of service and information disclosure via crafted swap file 2026-03-19 19:36:22 +01:00
0001-patch-9.1.1551-security-path-traversal-issue-in-zip..patch RHEL-112009 CVE-2025-53906 vim: Vim path traversal 2025-09-17 14:45:16 +02:00
0001-patch-9.1.1552-security-path-traversal-issue-in-tar..patch RHEL-112005 CVE-2025-53905 vim: Vim path traversial 2025-09-17 14:41:32 +02:00
0001-patch-9.1.2132-security-buffer-overflow-in-helpfile-.patch RHEL-147941 CVE-2026-25749 vim: Heap Overflow in Vim 2026-02-10 18:15:24 +01:00
0001-patch-9.1.2133-Another-case-of-buffer-overflow-with-.patch RHEL-147941 CVE-2026-25749 vim: Heap Overflow in Vim 2026-02-10 18:15:24 +01:00
0001-patch-9.2.0073-security-possible-command-injection-u.patch RHEL-155438 CVE-2026-28417 vim: Vim: Arbitrary code execution via OS command injection in the netrw plugin 2026-03-19 19:33:55 +01:00
0001-patch-9.2.0077-security-Crash-when-recovering-a-corr.patch RHEL-155423 CVE-2026-28421 vim: Vim: Denial of service and information disclosure via crafted swap file 2026-03-19 19:36:22 +01:00
0001-patch-9.2.0089-netrw-does-not-take-port-into-account.patch RHEL-155438 CVE-2026-28417 vim: Vim: Arbitrary code execution via OS command injection in the netrw plugin 2026-03-19 19:33:55 +01:00
0001-patch-9.2.0202-security-command-injection-via-newlin.patch Resolves: RHEL-159631 vim: Vim: Arbitrary code execution via command injection in glob() function 2026-04-13 18:27:43 +02:00
0001-patch-9.2.0276-security-modeline-security-bypass.patch CVE-2026-34982 vim: arbitrary command execution via modeline sandbox bypass 2026-05-27 13:08:35 +02:00
0001-patch-9.2.0277-tests-test_modeline.vim-fails.patch CVE-2026-34982 vim: arbitrary command execution via modeline sandbox bypass 2026-05-27 13:08:35 +02:00
0001-patch-9.2.0280-security-path-traversal-issue-in-zip.patch CVE-2026-35177 vim: Vim zip.vim plugin: Arbitrary file overwrite via path traversal bypass 2026-05-20 15:54:21 +02:00
0001-patch-9.2.0299-zip-may-write-using-absolute-paths.patch CVE-2026-35177 vim: Vim zip.vim plugin: Arbitrary file overwrite via path traversal bypass 2026-05-20 15:54:21 +02:00
0001-patch-9.2.0304-zip-block-absolute-paths-in-Extract.patch CVE-2026-35177 vim: Vim zip.vim plugin: Arbitrary file overwrite via path traversal bypass 2026-05-20 15:54:21 +02:00
0001-patch-9.2.0357-security-command-injection-via-backti.patch CVE-2026-41411 vim: Command injection via backticks in tag files 2026-05-21 13:48:07 +02:00
0001-patch-9.2.0479-security-runtime-tar-command-injectio.patch CVE-2026-46483 vim: command injection in tar plugin 2026-07-16 15:11:07 +02:00
0001-patch-9.2.0495-security-runtime-netrw-code-injectio.patch Fix CVE-2026-47162: netrw code injection via NetrwBookHistSave() 2026-07-31 16:22:25 +02:00
0001-patch-9.2.0496-security-Code-Injection-in-cucumber-f.patch CVE-2026-47167 vim: Code Injection in cucumber filetype plugin 2026-07-16 16:05:47 +02:00
0001-patch-9.2.0653-security-out-of-bounds-write-in-tree_.patch Fix CVE-2026-55693: out-of-bounds write in tree_count_words() 2026-07-31 16:21:06 +02:00
0001-patch-9.2.0698-security-Out-of-bounds-write-with-sou.patch Fix CVE-2026-57455: Out-of-bounds write with soundfold() 2026-07-31 16:20:15 +02:00
0001-patch-9.2.0699-security-possible-code-execution-with.patch Fix CVE-2026-57456: code execution via crafted docstrings in python complete 2026-07-31 16:21:41 +02:00
0001-patch-9.2.0735-security-arbitrary-Ex-command-executi.patch Fix CVE-2026-59858: arbitrary Ex command execution in C omni-completion 2026-07-31 16:16:41 +02:00
0001-patch-9.2.0736-potential-command-execution-in-PHP-omn.patch Fix CVE-2026-59856: potential command execution in PHP omni-completion 2026-07-31 16:18:50 +02:00
0001-runtime-netrw-upstream-snapshot-of-v179.patch RHEL-155438 CVE-2026-28417 vim: Vim: Arbitrary code execution via OS command injection in the netrw plugin 2026-03-19 19:33:55 +01:00
ci.fmf RHEL-351 - Enhanced TMT testing for centos-stream 2023-04-04 14:51:59 +02:00
gating.yaml Update fmf plans and gating 2024-07-02 11:47:25 +02:00
gvim16.png RHEL 9.0.0 Alpha bootstrap 2020-10-15 13:25:22 -07:00
gvim32.png RHEL 9.0.0 Alpha bootstrap 2020-10-15 13:25:22 -07:00
gvim48.png RHEL 9.0.0 Alpha bootstrap 2020-10-15 13:25:22 -07:00
gvim64.png RHEL 9.0.0 Alpha bootstrap 2020-10-15 13:25:22 -07:00
gvim.desktop RHEL 9.0.0 Alpha bootstrap 2020-10-15 13:25:22 -07:00
macros.vim RHEL 9.0.0 Alpha bootstrap 2020-10-15 13:25:22 -07:00
plans.fmf Switch tests to Centos Stream 2025-06-03 08:38:39 +02:00
sources Merged update from upstream sources 2021-03-28 17:30:39 +00:00
spec-template.new RHEL 9.0.0 Alpha bootstrap 2020-10-15 13:25:22 -07:00
view_wrapper RHEL-143726 sudo not able to spawn "vi" command when NOEXEC is used to prevent escaping to shell 2026-02-04 09:55:17 +01:00
vim-7.0-fixkeys.patch Merged update from upstream sources 2021-01-08 15:56:21 +00:00
vim-7.0-hunspell.patch RHEL 9.0.0 Alpha bootstrap 2020-10-15 13:25:22 -07:00
vim-7.0-rclocation.patch RHEL 9.0.0 Alpha bootstrap 2020-10-15 13:25:22 -07:00
vim-7.3-manpage-typo-668894-675480.patch RHEL 9.0.0 Alpha bootstrap 2020-10-15 13:25:22 -07:00
vim-7.4-fstabsyntax.patch RHEL 9.0.0 Alpha bootstrap 2020-10-15 13:25:22 -07:00
vim-7.4-globalsyntax.patch RHEL 9.0.0 Alpha bootstrap 2020-10-15 13:25:22 -07:00
vim-7.4-releasestring-1318991.patch RHEL 9.0.0 Alpha bootstrap 2020-10-15 13:25:22 -07:00
vim-7.4-specsyntax.patch RHEL 9.0.0 Alpha bootstrap 2020-10-15 13:25:22 -07:00
vim-7.4-syntax.patch 2011412 - test suite fails on apache/httpd filetype tests 2021-10-14 14:03:45 +02:00
vim-8.0-copy-paste.patch 2011749 - Update test suite to work without default mouse behavior 2021-10-14 14:16:30 +02:00
vim-crypto-warning.patch Merged update from upstream sources 2021-03-11 19:54:40 +00:00
vim-CVE-2023-4752.patch RHEL-2159 vim: Heap Use After Free in function ins_compl_get_exp in vim/vim 2025-02-25 14:17:22 +01:00
vim-cve-var-retab.patch 2002320 - CVE-2021-3770 vim: using retab with large value may lead to heap buffer overflow [rhel-9.0] 2021-10-15 08:54:02 +02:00
vim-default-editor.csh RHEL 9.0.0 Alpha bootstrap 2020-10-15 13:25:22 -07:00
vim-default-editor.fish RHEL 9.0.0 Alpha bootstrap 2020-10-15 13:25:22 -07:00
vim-default-editor.sh RHEL 9.0.0 Alpha bootstrap 2020-10-15 13:25:22 -07:00
vim-manpagefixes-948566.patch RHEL 9.0.0 Alpha bootstrap 2020-10-15 13:25:22 -07:00
vim-python3-tests.patch RHEL 9.0.0 Alpha bootstrap 2020-10-15 13:25:22 -07:00
vim-update.sh Merged update from upstream sources 2021-03-11 19:54:40 +00:00
vim.spec Fix CVE-2026-47162: netrw code injection via NetrwBookHistSave() 2026-07-31 16:22:25 +02:00
vimrc RHEL 9.0.0 Alpha bootstrap 2020-10-15 13:25:22 -07:00
virc 2011429 - Remove downstream patch vim-7.4-nowarning.patch 2021-10-14 14:11:01 +02:00