Leonardo Bonucci had looked set to play the role of pantomime villain when he cancelled out Paulo Dybala's opener with a 28th-minute header against his old club.
But the end of the champions' 10 successive Serie A clean sheets was eventually softened by substitute Cuadrado, the winger nodding in Khedira's cross.
Milan have not beaten Juve in Turin since 2011 – now head coach Gennaro Gattuso scoring the winner on that occasion – and they appeared destined for more pain from the moment Dybala got the scoring underway in the eighth minute.
Bonucci stunned his former faithful to give the visitors hope, the defender sprinting to the away supporters in celebration of what could have been a key goal in the context of the Rossoneri's Champions League hopes.
But Cuadrado and Khedira ensured they would they remain eight points behind rivals and fourth-place Inter Milan ahead of the midweek Derby della Madonnina, as the Bianconeri's unbeaten run extended to 25 matches in all competitions ahead of the Champions League quarter-final first-leg against Real Madrid in Turin.
The home fans' jeers for Bonucci began from the outset and added another layer to Milan's mental challenge, having lost on all six of their previous trips to Allianz Stadium.
Gianluigi Donnarumma received the first examination when he was forced to parry Gonzalo Higuain's stinging shot from outside the area.
The young goalkeeper failed to deliver in the next instance. Dybala received, swivelled and speared a shot into the bottom right corner all in one fluid motion, with Donnarumma perhaps surprised by an awkward late bounce.
Andre Silva should have supplied an immediate equaliser, but from close-range the forward wastefully headed Hakan Calhanoglu's cross around the post.
Instead, the stage was set for Bonucci. The Rossoneri skipper wedged himself between former defensive partners Andrea Barzagli and Giorgio Chiellini and emphatically headed home Calhanoglu's corner.
Juve twice had half-hearted penalty appeals for handball turned down as the half wore on, leaving the match in the balance at the break.
Though Lucas Biglia picked up a yellow card that rules him out of the meeting with Inter, Milan continued to grow in belief and would have been ahead had the crossbar not got in the way of Calhanoglu's long-range rocket.
The hosts were evidently rattled as they struggled to string together meaningful passing sequences but, just as it seemed that would translate to a frustrating result, the champions found a way through.
Khedira spotted an unmarked Cuadrado in the area and the Colombia winger made no mistake with the header with 11 minutes remaining.
With the tension released, Massimiliano Allegri's men completed a difficult assignment when Germany international Khedira unerringly picked out the bottom left corner, putting Juve in a commanding position to claim a seventh consecutive Scudetto.
Key Opta stats:
- Juventus have won all the 10 Serie A games in which Juan Cuadrado scored.
- Sami Khedira has scored seven goals in the current Serie A, his joint-record in a single campaign in his career.
- Juventus have scored six of their last 12 league goals after the 75th minute of play.
- Before Bonucci's goal, Juventus had not conceded for 959 mins in the league, the second best streak in Serie A history.
- Paulo Dybala has scored the most goals (seven) from outside the box in the Serie A this season.
- Dybala has scored a goal in each of his three Serie A matches versus Milan at Juventus Stadium.