GNU Screen is vulnerable to a Use-After-Free in the utf8handlecomb() function in encoding.c. Due to improper error handling during memory allocation failure, the global combchars pointer is freed but not reset to NULL. When a subsequent combining Unicode character arrives at the terminal, the function dereferences the freed pointer. An attacker who controls terminal content sent to the screen session, such as via a rogue SSH server or crafted escape sequences, can exploit this vulnerability to perform heap grooming and achieve arbitrary code execution.
This issue was fixed in version 5.0.2.
Race condition in GNU screen 4.0.3 allows local users to create or overwrite arbitrary files via a symlink attack on the /tmp/screen-exchange temporary file.