The 22-year-old sustained the injury during a clash of heads with Gillingham defender Charlie Lee in the 1-1 draw at Priestfield on Saturday.
Both players were allowed to continue after the incident in the second half, but Oyebanjo was forced off 10 minutes later wheh he began bleeding from his ear and X-rays in hospital later confirmed the full extent of his injury.
"It's a big blow to us and we wish Lanre well in his recovery," manager Gary Mills said.
"He'd just got back into the side and was playing extremely well. He didn't want to come off despite the bleeding, but should not have carried on really.
"It's a blow and another defender down, but our main concerns are for Lanre and his recovery."
York defenders David McGurk (hamstring) and Chris Doig (ankle) are both currently sidelined through injury, while Mills is hoping to complete the signing this week of former Aberdeen left-back Dean Jarvis, who has recently been on trial with the Minstermen.