Niners officials said Williams had a knee injury, while Hunter hurt his ankle. The club did not specify which leg was hurt for either player.
More tests will be done but the 49ers fear Williams tore knee ligaments and could be out an extended period while they are uncertain on the severity of Hunter's injury, a league source told ESPN NFL Insider Adam Schefter.
Both had to be helped off the field and were soon after taken by cart to the locker room.
They were injured on a running play in which Hunter carried the ball for a 2-yard gain late in the third quarter.
Information from The Associated Press was used in this report.