Basically to exploit this vulnerability, both parties must authenticate the connection with each other. 'When the code has been injected into the process, it will change the memory value in the process, turn on the GUI elements to change the control. At that time, there is no need for the server to agree that you can access and control the machine, 'gellin said.
TeamViewer has released a patch for Windows, a patch for Linux and macOS will soon be released. Accordingly you need to enable the auto-update feature for TeamViewer to patch the vulnerability.
See also: Instructions for controlling remote computers with TeamViewer