Nvidia warned its customers that proposed legislation on Chinese companies remotely accessing its artificial-intelligence chips could expose it and them to U.S. "legal action," according to two people with direct knowledge of the matter who spoke to CNBC on condition of anonymity.

The sources said Nvidia messaged buyers in recent months about the Remote Access Security Act, or RASA. They said the bill would give the U.S. government broader authority to control access to cloud services in the same way it controls physical hardware. The company warned that both Nvidia and its customers could face legal risk.

The sources also said Nvidia would not, for now, sell chips to customers who rent more than 50% of their graphics processing units to Chinese companies. Separately, the Financial Times reported earlier this month that Nvidia verbally told data-center clients to direct at least 51% of their services to non-Chinese customers under future contracts. CNBC did not independently verify that report.

RASA passed the House of Representatives in January but has not passed the Senate, according to the report.

The U.S. Commerce Department's Bureau of Industry and Security, or BIS, announced on Monday an interim final rule designed to prevent Chinese companies' remote access to AI chips, the report said.

Nvidia and BIS did not respond to CNBC's request for comment.