If you have a fix, here's information about contributing to pandas. If you don't want to contribute, the best way would be to validate input in application code to avoid breaking functionality and maintaining the patch long-term.
validate input in application code
breaking functionality
maintaining the patch long-term