I am pretty sure it's possible to fix that entire category of bugs without introducing RCE vulnerabilities.