Left-hander Marsh will fly home from the tour for treatment on a back injury he suffered in the opening Test, which Australia lost by eight wickets.
“David has been in tremendous form for New South Wales in all forms of the game, including a recent century for New South Wales in the Bupa Sheffield Shield competition,” said chairman of selectors Andrew
“We are certain that should the opportunity present itself he will be ready to perform at Test level. “
Warner has made 39 limited-overs appearances for Australia but is uncapped at Test level.
He has played just 10 first-class games in his career but boasts an average of 59.66, including three centuries.
The 25-year-old will join his team-mates in Johannesburg on Monday ahead of the second Test, which gets under way on Thursday.
Warner is likely competing with New South Wales team-mate Usman Khawaja for a place in the starting XI.