Scans have shown the 27-year-old tore muscles in his thigh during Saturday's final one-day international against West Indies, the Pakistan Cricket Board said on Thursday.
"Doctors have initially advised him to rest for around four weeks which means he could miss the Tests," an official said.
Razzaq has played 46 Tests and 224 one-dayers since making his debut for Pakistan in South Africa in 1998.
He has a history of fitness problems and missed the home Test series against England in 2005 due to tennis elbow.
The first Test against South Africa in Centurion starts on Jan. 11.
The second Test in Port Elizabeth begins on Jan. 19, with the third and final match in Cape Town starting seven days later.