On-loan Wigan midfielder Billy McKay had Dundee's first effort of the tie after seven minutes but dragged his strike wide of the goal.
Hibs did find the net with 20 minutes played as a scramble from a corner resulted in captain David Gray firing a strike across Szromnik into the far corner.
Dundee were unable to find an equaliser moments later, despite finding themselves with a three-on-one advantage from a counter-attack.
Cummings had the ball in the net in the 50th minute but the offside flag was raised prior to his strike.
The striker then saw his penalty-area header blocked by the arm of Ryan McGowan, handing him the chance to score from the spot.
Cummings made no mistake to put the Scottish Championship side two goals ahead with 61 minutes played.
The final kick of the game resulted in a third goal for Hibs, as Lewis Stevenson's deflected effort looped into the United goal to ensure the win.
Stubbs's side now move into the semi-finals of the Scottish League Cup, joining Celtic, Ross County and St Johnstone in the draw.