Subaru of America is recalling certain Legacy and Outback cars from the 2010 to 2013 model years; Impreza vehicles from the 2012 and 2013 model years and certain 2013 Crosstrek models to fix an electrical problem that could cause their engines to start unexpectedly.

Subaru, the automobile unit of Fuji Heavy Industries Ltd., said the affected Legacy and Outback models have automatic or CVT transmissions, and the Impreza and Crosstrek cars it is recalling have CVT transmissions.

All of the cars included in the recall are fitted with remote engine starting systems, Subaru said in a document filed with the National Highway Traffic Safety Administration. The recall affects 47,419 vehicles.

If the key fob that operates the remote engine starter is dropped, the fob may malfunction and transmit a starting signal to the engine without someone pushing the fob button. The engine may start and continue to run for as long as 15 minutes. It may also continue to start and stop until the fob’s battery is exhausted or the car runs out of fuel.

If the vehicle starts while parked in an enclosed area, carbon monoxide could build up and increase the risk of asphyxiation.

Under the recall Subaru dealers will replace the remote-starter fobs, free of charge. The recall is expected to begin by the end of April. Owners may contact Subaru at 800-782-2783 for more information.