The idiom worse comes to worst means if the worst possibility should occur. When the idiom originated centuries ago, worst comes to worst was the conventional formulation. Worse comes to worst gradually took over, but in 21st-century writing a third option, worse comes to worse, is gaining ground. We prefer worse comes to worst because of the logical progression from comparative to superlative, but writers can be forgiven for using the other forms, as none makes much logical sense under close examination.
Examples
But if worse comes to worse, she’ll try to get a job. [CNN]
[A]nd if worse comes to worse, Rashad will not want to stand with Jones. [Mirror]
Other commands will lock the device to protect your private data or, if worst comes to worst, wipe all data on a stolen phone. [PC Magazine]
But if worse comes to worst, he said, Italy “will consider creating a national Italian command for those operations that use our air bases” in order not to lose control. [New York Times]
As in, when worst comes to worst to the eighth degree, workers can simply grab a hose and replenish the water in the pool. [AL.com]