Add general protection against RCE vulnerabilities similar to the one described in CVE-2019-7609. Closes #49605