That sounds like a nigh-impossible requirement, as you've written it.
I suspect the actual requirement is much more limited in scope.
9.x vulnerability might not matter if the function gets trusted data while 3.x one can screw you if it is in bad spot