Even the most optimistic Cork fan alive would have struggled to envisage this scoreline after a week where back-to-back league defeats ended their title hopes.
In truth, at half-time last night, followers of a glass-half-full persuasion will have been worried about the Leesiders' cup ambitions following a spell where they rode their luck.
But John Caulfield's charges bounced back off the ropes to dominate the rest of this encounter and send St Patrick's Athletic packing with Garry Buckley bagging a brace and Mark O'Sullivan producing a goal of the season contender. A surprise return and late goal for Billy Dennehy added to the good vibes.
Liam Buckley's troops will now engage in soul-searching with their record-breaking run of nine straight wins already a distant memory. After Monday's drubbing in Oriel, they've now conceded eight goals in two games which were vital for keeping their season alive.
"It's been a difficult week but we didn't become a bad side overnight," said Caulfield afterwards. "We had a few close shaves but it was comprehensive in the end."
Certainly, there should have been goals in a first half notable for scatty defending and poor finishing. Cork started better, with Karl Sheppard just about denied by Brendan Clarke following a clever pass from Liam Miller, but it was the Dubliners that went on to produce the clearest chances to break the deadlock.
Three opportunities of note were either wasted or kept out by last-ditch defending. Conan Byrne kicked it off by seizing on a Dan Murray error and then scuffing a one-on-one with Mark McNulty.
Then, Aaron Greene's nod goalwards stayed out via a mis-hit clearance from Alan Bennett that came off his goalkeeper. The final let-off for the locals was Murray showing the awareness to be in the right place to clear off the line when James Chambers steered a header past McNulty.
Cork had their moments - a deflected effort wide from Colin Healy and a disallowed O'Sullivan goal - but they were second best in the period before a break that they badly needed.
It allowed Caulfield to consider his options and he chose to withdraw left winger Kevin O'Connor, switch Karl Sheppard to that side and send in recognised full-back John Kavanagh on the right further up the park. "He gave us some pace," explained the victorious boss.
The new arrival succeeded in making life uncomfortable for Ian Bermingham and duly won a free that proved to be the turning point. Ross Gaynor's delivery struck the leg of Greene and the post with Buckley on hand to scramble the ball over the line.
The ugly nature of that strike contrasted dramatically with O'Sullivan's wonderful effort, with the combative attacker stronger than Brennan as he dropped deep to win a 50-50, gain possession and tee up a right-footed thunderbolt that flew into the top corner. Brennan's difficult evening was almost immediately brought to a close by Buckley, with the player's demeanour indicating that he was carrying a knock.
In truth, the entire Saints operation appeared to be struggling from the impact of the quick-fire double and highly rated teenage sub Jamie McGrath was unable to improve the situation.
Instead, Cork confirmed their progression with Gaynor weaving through red and white shirts and letting fly with a shot that Clarke could only parry into the path of the grateful Buckley who nodded home before the delirious fans in the Shed End.
The Saints were toast, and couldn't even secure a consolation with the goalscoring touch deserting them.
Cork's mood was soured slightly when Kavanagh pulled up injured after just 24 significant minutes on the park, yet his departure from the scene paved the way for Dennehy's comeback 50 days after a scrap on the park with O'Sullivan and disagreements behind the scenes looked to have spelled the end for the City career.
He may now figure in the battle to make it to the Aviva and capped the stunning turn-around when the unselfish Karl Sheppard robbed Lee Desmond and laid it on a plate.
Replays suggested he was offside but Saints' protests were waved away as the holders exited the competition which gave them so much joy last November.
Cork City - McNulty, McSweeney, Bennett, Murray, Gaynor; Miller, Healy; Sheppard, Buckley, O'Connor (Kavanagh 45; B Dennehy 69)); O'Sullivan (Kearney 76).
St Patrick's Athletic- Clarke, O'Brien, McGuinness, Desmond, Bermingham; Bolger, Brennan (McGrath 55); Byrne (Hoare 66), Chambers, Forrester; Greene (Langley 84).
Ref - P McLaughlin (Monaghan)
Derry City eased into the last eight as they produced a fantastic display to see off struggling Drogheda United.
In truth, the Brandywell men could have won by a bigger margin, as they dominated from start to finish.
City took the lead on 18 minutes when Patrick McEleney headed the ball past Micheal Schlingermann, after Cillian Morrison's inch-perfect centre had created the chance.
The woodwork came to United's rescue on 35 minutes as the lively Mark Timlin saw his effort hit off an upright.
Derry then scored twice in a matter of minutes. Morrison made no mistake from close range on 65 minutes and soon after Barry McNamee fired home from long range.
Derry City - Doherty, Cornwall, McBride, Barry; Morrison, McEneff, Lowry (Daniels 83), McNamee, Jarvis; McEleney (Quigley 72), Timlin (Curtis 76).
Drogheda United - Schlingermann, Daly, Byrne, O'Reilly, Marks; Duffy, Thornton (Brennan 72), Hughes, Mulvenna; Bayly (Maher 72); McKenna (Gorman 55).
Ref - Paul Tuite (Dublin)
Killester Utd secured their berth in the quarter-finals by crushing a depleted Tolka Rovers.
First-half goals from David Lacey and Alan Talbot set the visitors on their way, with another apiece from the duo after the break sealing a comprehensive victory.
Tolka goalkeeper Paul Tancred denied Lacey with a string of saves early on, but he was helpless to prevent him breaking the deadlock from close range on the half-hour.
Killester added a second five minutes later when Mark Ryan combined with Lacey to tee up Talbot's low shot from eight yards.
The tie was killed off eight minutes after the break when Lacey was first to react to a corner. Talbot dribbled in with 10 minutes left to slot in the fourth.
Tolka Rovers - Tancred; Eccles, Henderson, Dunne, Lynch (Lewis 46); Valentine (McGarry 46), McGuinness, Drew, O'Toole, Flaherty; Murphy (Evans 78).
Killester Utd - Donoghue; Rogers, Mathews, McCormack, Hand; McKay (Browning 64), Ryan, Chambers, Kavanagh (Farrell 73); Talbot (O'Driscoll 80), Lacey.
Ref - B Tracey.