The final Test of the three-match series begins at the the Wanderers from Wednesday.
With convincing wins in the preceding two Tests, South Africa have taken an unassailable lead in the series.
Bavuma suffered the injury while playing for Cape Cobras in a domestic One-Day tournament this past week, and is expected to be out for three to four weeks.
However, despite injury, Bavuma will remain a part of the South Africa Test squad, with the selectors opting not to name a replacement batsman.
More From This Section
He would have expected to sit out the third Test as well with the option of all-rounder Chris Morris available to the hosts if they choose to drop a bowler.
Bavuma has played 27 Tests for South Africa, scoring 1,259 runs at 33.13.
He has played just 2 ODIs scoring 161 runs at an average of 80.5.