Hyundai launched a recall for 62,811 units of the Sonata after discovering that the mid-size car's panoramic sunroof could fly off in traffic and careen into other vehicles.
The Korean automaker said it was not aware of any crashes or injuries that have occurred because of the defect.
But the company has received multiple reports of sunroofs detaching, according to a document filed with the National Highway Traffic Safety Administration.
The voluntary recall covers 2015 and 2016 Sonata sedans assembled at Hyundai's plant in Alabama from May 28, 2014, through March 18, 2016, and 2015 and 2016 Sonata hybrids made there from Dec. 8, 2014, through Aug. 18, 2015.
The automaker said the defect stems from a wind deflector positioned at the front of the sunroof to reduce noise. The part may not have been well attached.
"If the wind deflector becomes partially detached from its mounting points after the sunroof is opened, it can interfere with the moveable sunroof panel while the sunroof is being closed," Hyundai told NHTSA. "The tempered glass sunroof panel can detach from the sunroof assembly due to interference with the wind deflector, or if the customer tries to force the sunroof panel closed."
Hyundai said it first began investigating the matter in March after receiving the initial complaint. It did not receive additional reports until August.
Follow USA TODAY reporter Nathan Bomey on Twitter @NathanBomey.