The Padres recalled right-handed pitcher Evan Scriber from Triple-A Tucson to take Gregerson's place on the roster.
Gregerson, who is 2-1 with a 2.63 ERA in 30 games this season, suffered the injury as he was warming up in the bullpen during the seventh inning of Wednesday's 5-3 loss to the Rockies.
"About my fourth or fifth pitch in ... I just felt something grab right under my rib cage here on my left side. I thought it was a cramp, at first. I tried to throw one more, it felt exactly the same," Gregerson said.
San Diego bullpen coach Darrel Akerfelds saw Gregerson wince, and immediately had him stop throwing.
"He's like, 'You've got to shut it down, that could be an oblique and you don't want to make it worse than what it can be right now. You could turn a 10-day thing into a two-month thing,'" Gregerson said. "We hoped it would feel better today ... but it just feels like a really bad bruise, now."
Scribner was with the Padres earlier this season, appearing in six games and posting a 2.45 ERA in 11 innings of work. He was 0-2 with a 4.67 ERA and eight saves in nine chances with Tucson.