Description
This script is using the PHP function preg_replace() on user input. This is not recommended as it can lead to various vulnerabilities. Consult "Web references" for more information about this problem.
The e modifier makes preg_replace() treat the replacement parameter as PHP code after the appropriate references substitution is done. If the regex pattern and the replacement strings are controlled by the user this can conduct to PHP code execution.
Remediation
It is not recommended to use preg_replace() on user input.
References
Related Vulnerabilities
WordPress Improper Input Validation Vulnerability (CVE-2019-20041)
WordPress Plugin Five Star Restaurant Menu-WordPress Ordering Remote Code Execution (2.2.0)
Apache Tomcat version older than 6.0.36
ForgeRock AM / OpenAM Deserialization RCE (CVE-2021-35464)
Squid Improper Input Validation Vulnerability (CVE-2016-2571)