In this February 26, 2007 file photograph, Charles Koch, head of Koch Industries, talks passionately about his new book on Market Based Management.In this February 26, 2007 file photograph, Charles Koch, head of Koch Industries, talks passionately about his new book on Market Based Management.

More than two dozen U.S. lawmakers received campaign contributions from Koch Industries in the weeks leading up to the attack on Ukraine, which ethics lawyers say should be returned.

Even as other major U.S. and European companies flee the country to avoid sanctions over its invasion of Ukraine, lawmakers are being scrutinized for accepting campaign contributions from the conglomerate run by billionaire Charles Koch.

Koch Industries President and Chief Operating Officer Dave Robertson said in a statement last week that the company's glass manufacturer will remain active despite the war in Russia. The United States and its allies have taken aim at Russia with sanctions, including targeting the country's central bank.

The Koch's donations could influence congressional leaders as they decide how to aid Ukraine in its fight against Russian aggressors.

Walter Shaub, who ran the Office of Government Ethics under multiple administrations, told CNBC that having lawmakers dependent on Putin for their positions as they are making decisions about how to handle this crisis is dangerous for America and dangerous for democracy.

Lawmakers who have taken money from Koch should return the donation and stop taking money from Koch, according to Richard Painter, a White House ethics lawyer.

After CNBC inquired about the donations, Deb Barnes, a spokeswoman for Kurt Schrader, said that the lawmaker wouldn't accept future donations from Koch and would donate the money to charity.

The Center for Responsive Politics tracks campaign donations and spending and says that the Koch Industries political action committee gave $4,500 to the Schrader campaign.

Barnes said that Schrader will not accept donations from the company if they continue to do business in Russia during the war.

The congressman from Oregon was contacted by CNBC and said he wouldn't accept new money from Koch. Representatives for other lawmakers who were mentioned in the story didn't respond to CNBC's requests for comment. A spokesman for Koch didn't return a request for comment.

In February, the Koch Industries PAC gave over $110,000 to over two dozen U.S. lawmakers, with most of the donations going to the campaigns or political action committees of Republicans on Capitol Hill, according to the most recent Federal Election Commission filing.

Koch was one of the top donors to his company.

Several Republicans received donations from Koch last month, ranging from $1,000 to $5,000.

There are a few other House Democrats who have also recently received money from the Koch committee.

In the upcoming election cycle, six congressmen have received donations from the Koch Industries PAC.

In a statement to CNBC, she said that she wants to see corporate America comply with the U.S. sanctions.

I condemn Putin's brutal and bloody war against Ukraine in the strongest of terms and urge Corporate America to comply with the sanctions imposed by the U.S. My opposition to Russia is uncompromising and if it leads to an organization ending its financial support to my campaign, so be it.