According to federal law, only U.S. citizens and green card holders (permanent residents) are permitted to make direct financial contributions to political campaigns. But there are loopholes in the regulation—if a fundraiser's contributions come from multiple sources before the full campaign donation is made, disclosing whom and where the contributions came from is voluntary. This process is known as bundling. Bundlers are only required to disclose their contributors if they're federally registered lobbyists. Otherwise, foreign entities can make donations without much legal scrutiny.
Foreign companies can also use affiliates in the U.S. to form political action committees to collect campaign contributions. Both practices are common in American campaign finance.