The pair has one-year left on their contracts, but negotiations have seemingly stalled in recent weeks.
And Pires believes it's imperative for the Gunners to solve the issue and get the duo to re-sign.
"I hope and wish they extend their contracts because they are both very important players for stability and the quality of the team," said Pires.
"We need warriors like Sanchez and we need Ozil. I don't know what will happen by the end of the transfer window but I know Arsene Wenger has a lot of work to do this summer."