DETROIT—Subaru is recalling about 640,000 vehicles worldwide to fix two problems that can cause them to stall.

The first recall covers about 229,000 Outback and Legacy vehicles in the U.S. from the 2018 model year. Government documents state a software problem can stop the low-fuel warning light from illuminating and make the miles-to-empty display inaccurate. The problem can cause drivers to run out of fuel and stall, increasing the risk of a crash.

The other recall covers Subaru Imprezas from 2012 to 2014 and the 2013 BRZ, XV Crosstrek and Toyota Scion FR-S.

Article Continued Below

The engine valve springs in about 411,000 vehicles worldwide can fracture, causing the engines to malfunction or stall.

Dealers will replace the springs. Toyota and Subaru jointly designed the FR-S sports car.

In both recalls, owners will be notified starting in December, Subaru said. In the fuel indicator recall, dealers will reprogram the software. If reprogramming tools aren’t ready, owners will be notified by letter again when they are. In the valve springs recall, if parts aren’t ready, owners will be notified a second time of when they should take vehicles in for repairs.

Subaru says it has no reports of crashes or injuries due to either problem.