The U.S. operations of Chinese-owned TikTok raise national security concerns, says FBI Director Chris Wray, flagging the risk that the Chinese government could harness the video-sharing app to influence users or control their devices.

Risks include “the possibility that the Chinese government could use [TikTok] to control data collection on millions of users or control the recommendation algorithm, which could be used for influence operations,” Wray told U.S. lawmakers.

Beijing could also use the popular app, owned by ByteDance, to “control software on millions of devices,” giving it the opportunity to “technically compromise” those devices, he added.

The U.S. government’s Committee on Foreign Investment in the United States (CFIUS), which reviews U.S. acquisitions by foreign acquirers for potential national security risks, in 2020 ordered ByteDance to divest TikTok because of fears that U.S. user data could be passed on to China’s communist government.

CFIUS and TikTok have been in talks for months aiming to reach a national security agreement to protect the data of TikTok’s more than 100 million users.

TikTok executive Vanessa Pappas told U.S. Congress in September that TikTok was making “progress toward a final agreement with the U.S. government to further safeguard U.S user data and fully address U.S. national security interests.”

When asked about the FBI’s role in the CFIUS investigation, Wray said the agency’s foreign investment unit was part of the CFIUS process. “Our input would be taken into account in any agreements that might be made to address the issue,” he added.

Wray noted Chinese companies are required to essentially “do whatever the Chinese government wants them to in terms of sharing information or serving as a tool of the Chinese government. And so that’s plenty of reason by itself to be extremely concerned.”

A TikTok spokesperson said: “As Director Wray specified in his remarks, the FBI’s input is being considered as part of our ongoing negotiations with the U.S. government. While we can’t comment on the specifics of those confidential discussions, we are confident that we are on a path to fully satisfy all reasonable U.S. national security concerns.”

Former President Donald Trump in 2020 attempted to block new users from downloading WeChat and TikTok and ban other transactions that would have effectively blocked the apps’ use in the United States but lost a series of court battles over the measure.

President Joe Biden in June 2021 withdrew a series of Trump executive orders that sought to ban new downloads of the apps and ordered the Commerce Department to conduct a review of security concerns posed by the apps.

Any security agreement with TikTok is expected to include data security requirements.