The aim of this in vivo randomised clinical trial was to assess coronal bacterial penetration after placement of Cavit G and IRM temporary restorations in class II endodontic access cavities. After completion of endodontic treatment, placement of an orifice seal and disinfection of the operating field, sterile cotton pellets were placed in the pulp chamber and the cavities were restored with Cavit G or IRM. After 7 days, coronal and proximal restoration thickness was measured by digital radiographs. Cotton pellet was evaluated by culture methods and polymerase chain reaction assay and bacterial species identified. Bacterial growth was observed in 5 of the 27 (18%) Cavit G samples and in 11 of the 27 (40%) IRM samples which was not significant. Coronal restoration thickness of 4–5 mm and proximal restoration thickness of more than 2.15 mm for Cavit G and 2.35 mm for IRM are recommended to prevent bacterial penetration over 7 days. Adequate restoration thickness is critical to prevent bacterial penetration.