The sunroof in cars from the 2013 to 2015 model years will automatically close when the nonrecessed portion of two switches are touched with less force than is allowed by federal standards, GM said in a statement.
The issue was discovered while testing the 2016 model in January, which uses the same switches as the 2013-15 models.
GM said it is not aware of any crashes, injuries or fatalities related to the sensitive switch and has received no customer complaints.
Dealers have been told to stop the sale of cars until they have been repaired, a GM spokesman said.
About 12,200 unsold vehicles globally, including 10,500 in the U.S., are involved in the stop sale.