Juventus saw their clean sheet run end after 615 minutes, but Gleison Bremer's header and an odd Daniele Rugani goal with his chest allowed them to squeeze past Cagliari.
The Bianconeri had six consecutive clean sheets, winning all but one draw in that run, but Adrien Rabiot, Paul Pogba and Nicolò Fagioli were suspended, with Timothy Weah, Danilo, Alex Sandro and Mattia De Sciglio injured. Claudio Ranieri's men had two victories in a row, though Nahitan Nandez, Alessandro Di Pardo, Elio Capradossi and Marko Rog were still out of action.
Gabriele Zappa and Nicolas Viola fired off target from distance, as did the Federico Chiesa free kick, while Alberto Dossena nodded a Viola corner over the bar from six yards.
Moise Kean's first touch let him down on the Chiesa through ball, then Weston McKennie on the volley turned a Filip Kostic cross just wide.
The first actual shot on target came within seconds of the restart, Chiesa's effort from distance smothered by Simone Scuffet.
Chiesa also volleyed just over after Kean had hesitated one-on-one with Scuffet, then saw his tap-in deflected wide. On the resulting corner, Federico Gatti's header skimmed the far top corner.
The deadlock was finally broken when Kostic floated a free kick into the crowd, finding Gleison Bremer unmarked for a precise, looping free header.
Juve scored again from a corner kick with a defender, this time Kostic found Rugani from point-blank range to deflect it with his chest onto the crossbar, then bundled it over the line at the second time of asking, again with his torso.
However, Cagliari got back into the game when a Jakub Jankto corner found Alberto Dossena to steer the header in at the far post. This ended a run of six consecutive Serie A clean sheets for the Bianconeri, 615 minutes of football.
The Sardinians almost equalised on 83 minutes with a very similar move, this time a free kick found Dossena's header and Wojciech Szczesny just got a fingertip to push it onto the upright.