Somewhat incredibly, the administration is citing a McCarthy-era 1952 law that many read as explicitly antisemitic and targeted at Jewish eastern-european survivors of the holocaust lest they be too sympathetic to communism as the legal basis for these actions. That law sought to keep people out, but the administration seems to believe it can also be used to deport people.
An ironic quote:
"In a 1952 edition of The New York Times, then-Anti-Defamation League president Benjamin Epstein was quoted as saying that immigration regulations like the McCarran law were 'examples of the worst kind of legislation, discriminatory and abusive of American concepts and ideals.'"[0]
[0]: https://forward.com/news/702427/mccarran-walter-act-state-de...