Since eval can lead to code execution, it creates a vulnerability on your site if you are not 100% in control of this code (and this is very rare, or you would not consider eval anyway).
This vulnerability does not necessarily adversely affect your server, but can seriously affect the user, and in some cases, a hacker can steal your user cookies, gain access to his session, and much more.
One simple example is eval, which executes a malicious script that sends a message to your server with all the necessary information for your server to delete or modify user data. Since the request does come from your user session, it is an absolutely correct request.
source share