setuid and setgid files are dangerous because they might give an unauthorized user root access, or at least access to run a program in another user's name. ... However, it is very difficult to be so sure, as hackers may have cracked root's password.
Is setuid secure?
While the setuid feature is very useful in many cases, its improper use can pose a security risk if the setuid attribute is assigned to executable programs that are not carefully designed. Due to potential security issues, many operating systems ignore the setuid attribute when applied to executable shell scripts.
What is the point of setuid?
Setuid is a Linux file permission setting that allows a user to execute that file or program with the permission of the owner of that file. This is primarily used to elevate the privileges of the current user.