Roger Federer booked a place in a 28th Grand Slam final with the win
Roger Federer went two sets up against his fellow Swiss before Wawrinka, himself nursing a knee injury, roared back to level at two sets all.
Federer went off the court for medical treatment before the fifth set and revealed after closing the match out that it is an ongoing issue.
"I've had a leg thing going on this week," said Federer.
Stan Wawrinka came back from two sets down but couldn't win the fifth
"I felt in from the second game of the match – I don't know why.
"I never take injury timeouts but Stan already took his so I guess people won't be mad and Stan won't be mad.
"You just hope that something works and that physio has some magic hands going on."
Roger Federer is chasing an 18th Grand Slam title
When asked to be more specific about the injury, Federer added: "If you have to go off the court, it means the treatment is further up the leg…"
Wawrinka also took a medical timeout, before the beginning of the third set, which appeared to flip the momentum of the match almost instantaneously.
And losing the third set took Federer by surprise and he revealed that nerves had been starting to get the better of him.
"He seemed like he was maybe a step slow or maybe he was getting used to the tape [on his knee]," the 35-year-old added.
"But after that I thought he relaxed and I couldn't serve as well as I had.
"He let it go and it worked for him – the next thing you know it's hard to stop the bleeding.
"I fought in the fourth but couldn't really get my rhythm back.
"I was playing tight so it wasn't easy and Stan was playing like he had nothing to lose."
Federer is now just one win away from an 18th Grand Slam title.
In Sunday's final he will either face Grigor Dimitrov or old rival Rafael Nadal. Their semi-final will take place on Friday at 8.30am GMT.