A late goal from St Patrick's Athletic striker Ryan Guy gave Jeff Kenna's side three vital points at Turner's Cross.
Pat's midfielder Gareth O'Connor won the ball in midfield, passed to Guy who fired home from the edge of the penalty area in the 89th minute.
Cork, who have scored only seven goals in ten home league games, should have scored early through Denis Behan but his shot from eight yards was saved by Gary Rogers.
Cork City began the match with the same starting eleven which defeated Galway United 2-0 at Terryland Park last Friday night.
The visitors had suffered ten defeats in the league, more than any other club in the Premier Division.
They were boosted by the return from suspension of David Partridge, with Noel Haverty moving to the bench.
Partridge almost cost his side an early goal when his weak back pass to his goalkeeper was too short, leaving Cork striker Behan in the clear.
The forward should have scored, but his shot from eight yards struck the legs of Gary Rogers and rolled behind for a corner kick after 16 minutes.
It was an open game of football in the first 45 minutes and the visitors, playing with the wind advantage, created a couple of good chances too.
Gareth O'Connor had a shot from outside the penalty area deflected for a corner, while forward Glen Fitzpatrick struck a fine shot in a crowded penalty area which Cork full-back Neale Horgan headed off the line after 28 minutes.
Just on the half-time whistle, Behan hit a trademark free kick from 30 yards, which goalkeeper Rogers got down low to save at his lefthand post.
Cork started the second half brightly, with an in-swinging Colin Healy corner just failing to get a connection with the head of captain Dan Murray as the ball flew across the face of the goal.
At the other end, St Pat's defender Jason Gavin was up in attack for a corner kick and his low shot flew across the goal and inches wide of the far post.
The home side went close again through young substitute Craig Duggan, who hit a shot just over the crossbar but they were caught with a sucker punch in the 89th minute.
The late winner came when Guntar Siligailis lost the ball to O'Connor, and he fed Guy with a great pass.
The striker then thumped the ball past Dan Connor from 20 yards, much to the delight of the travelling Dublin fans.