A generous legal loophole in U.S. immigration laws is allowing thousands of illegal "students" to receive special visas to enter America, according to a new report on the scam.

The report found that 42 of the country's worst colleges and universities, some that aren't even accredited, are providing the needed "student" documentation to immigrants to clear immigration requirements of the Department of Homeland Security.

In the process, the mostly for-profit schools fill their classes and weak students get to come to the U.S., said the report titled, DHS Allows F-1 Visas for Students Going to Ghost Colleges.

"The very dregs of higher education in this country offer extremely poor quality education, yet still have the power to admit foreign students. Approximately 40,000 alien students are enrolled in these ‘compromised colleges,' which have all lost their accreditation from the Accrediting Council for Independent Colleges and Schools (ACICS), whose standards were so low that it lost its Department of Education recognition and power to accredit," said the Center for Immigration Studies.

How a loophole in imm law + fin aid let dozens of 4th rate colleges rake in multi-millions off foreign students. https://t.co/lxYTSjZsH8 — Jessica Vaughan (@JessicaV_CIS) September 11, 2017

In his report, immigration expert David North explained that overseas students need proof of acceptance to colleges and universities to win their visa.

But even unaccredited schools can provide that documentation because, he added, a loophole gives the institutions ample time to appeal their demotion and during that time they can still vouch for immigrant applicants.

"Many of them [foreign students attending ‘compromised colleges'] sought out low-quality schools in the United States quite deliberately, as they were seeking paychecks, not valuable diplomas. They are not to be confused with anyone's idea of the ‘best and the brightest,'" wrote North.

See his full report and how the scam works here.

Paul Bedard, the Washington Examiner's "Washington Secrets" columnist, can be contacted at pbedard@washingtonexaminer.com