CVE-2019-13636: Symlink-following vulnerability in GNU patch allows arbitrary file write
7d0f9a0b-5ca4-49bd-9ec3-e3b554664bf6
GNU patch version 2.7.6 and earlier contains a symlink-following vulnerability that allows attackers to write files outside the intended patch directory. When patch applies patches to files, it opens target files without the O_NOFOLLOW flag. An attacker can create patches that reference symlinks pointing outside the working directory, causing patch to follow those symlinks and modify files beyond the patch scope. This affects critical operations in create_backup, create_file, copy_to_fd, append_to_file (in util.c) and plan_a, plan_b (in inp.c).",