As it races to replace millions of its Galaxy Note 7 smartphones around the world, Samsung has come up with a way to stop the devices from catching fire: update the software.

Samsung (SSNLF) said it's planning to roll out a fix next week for Note 7 phones in its home market of South Korea that will prevent the batteries from charging above 60% of their capacity.

"This plan is for the safety of the customers," the company said in a front-page ad in the newspaper Seoul Shinmun. It wasn't clear if or when the software update might be extended to other affected countries like the U.S.

Samsung, the world's biggest smartphone maker, is recalling 2.5 million Note 7 phones globally after dozens of users complained of the devices bursting into flames while charging.

Related: Samsung won't be the last to have exploding batteries

The fire risk has prompted warnings from authorities not to use the phones on planes, trains and buses. Over the weekend, Samsung urged Note 7 owners to power them down and exchange them for a different phone as soon as possible.

Widening concerns about the Note 7, one of Samsung's flagship phones, have wiped billions of dollars off the company's market value.

The giant electronics firm is scrambling to get replacement Note 7 devices into the hands of consumers around the world. In the meantime, it's offering customers other devices from its range of smartphones.

Related: Confused about the Samsung Galaxy Note 7 recall?

In South Korea, Samsung says it plans to start providing new "battery-problem-free" Note 7 phones to current owners on Monday. The software update is due to be introduced early the following day for phones that haven't been exchanged, according to the newspaper ad.

The ad didn't say whether the update would be automatic or require users' agreement. Samsung didn't respond to a request for more information on the software patch.

In the U.S., the company is working with the Consumer Product Safety Commission to figure out how a formal recall of the phones will work.

Asked about the software update, a Samsung spokesperson in the U.S. said that "no action will be taken without the approval of the CPSC."

-- Jung-eun Kim and Jill Disis contributed to this report.