After the Boston bombing, U.S. federal agents have been asked to "effectively" check the validity of all foreign student visas.

Validity checks on foreign student visas in the U.S. is going to become even more stringent after it was revealed that two friends of one of the bombers involved the Boston bombing had entered the country with an invalid foreign student visa.

The Department of Homeland Security has ordered the U.S. Customs and Border Protection agents to verify that every foreign student who wants to enter the United States has a valid student visa, "effective immediately," a U.S. government official told CNN Friday.

The memo was part of the country's effort to reform the student visa system. This would include providing agents with real-time updates on all relevant information. Dias Kadyrbayev and Azamat Tazhayakov, the two friends of the bomber who have also been charged for obstructing the investigation, were reportedly staying in the U.S. without a valid student visa.

"The fact that a foreign national was able to re-enter the U.S. with what appeared to be a valid student visa, while Customs and Border Protection officers were unaware that his visa status had become invalid, represents a serious hole in our national security," U.S. Rep. Michael McCaul, head of the House Committee on Homeland Security, told CNN. "The front-line CBP officers did not have access to the system that would've informed them of a change in legal status."

According to McCaul, the incident shows the "disconnects" and problems related to sharing information among Homeland Security agencies.

Senator Chuck Grassley, ranking member of the Senate Judiciary Committee, also raised his concerns over this gap in the immigration system.

"It's surprising that the administration isn't already verifying that any student coming into the country has a valid student visa," Grassley said. "What's more concerning is that nearly 12 years after the 9/11 terrorist attacks, we haven't fixed the problems with identifying visa overstays."