Wahab was hit on the left hand by a delivery from fast bowler Dushmantha Chameera while batting during the first day's play at the P. Sara Oval in Colombo on Thursday.
He returned to bowl nine overs before stumps during Sri Lanka's first innings, but did not take the field on the second day when the hosts resumed at 70-1 in reply to Pakistan's 138.
Read: Wahab Riaz delivered spell of the World Cup: Sachin Tendulkar
Team manager Naveed Cheema said Wahab would be out of action for two weeks, which rules him out of the third and final Test in Pallekele from July 3.
"Wahab underwent X-rays after play on Thursday and they showed a hairline fracture on his left-hand," Cheema told reporters. "He can't play for at least two weeks."
It was unclear if Wahab will be available for the subsequent five-match one-day series which starts on July 11.
Read: I'll pay Wahab Riaz's fine: Brian Lara
Wahab, who turns 30 on Sunday, lit up the World Cup earlier this year by his lively burst against Australia's Shane Watson during the quarter-final in Adelaide, a match Pakistan lost.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ