After years of seemingly boundless expansion, the U.S. tech industry has hit a wall. Companies are in cash preservation mode, leading to thousands of job cuts a month and a surge of layoffs in November.

While the sudden loss of a paycheck can be devastating for anyone, especially during the holiday season, the recent wave of reductions is having an outsized impact on skilled workers who are living in the U.S. on temporary visas and are at risk of being sent home if they can’t secure a new job in short order.

Tech companies are among the employers with the most approvals for H-1B visas, which are granted to people in specialty occupations that often require a college degree and extra training. Silicon Valley has for years leaned on temporary visas issued by the government to employ thousands of foreign workers in technical fields such as engineering, biotech and computer science. That’s a big reason tech companies have been outspoken in their defense of immigrants’ rights.

Workers on temporary visas often have 60 to 90 days to find a new gig so they can avoid being deported.

“It’s this amazing talent pool that the U.S. is fortunate to attract, and they’re always living on the edge,” said Sophie Alcorn, an immigration lawyer based in Mountain View, California, who specializes in securing visas for tech workers. “Many of them up are up against this 60-day grace period deadline. They have a chance to find a new job to sponsor them, and if they can’t do that, they have to leave the U.S. So it’s a stressful time for everybody.”

The already grim situation worsened in November, when Meta, Amazon, Twitter, Lyft, Salesforce, HP and DoorDash announced significant cuts to their workforces. More than 50,000 tech workers were let go from their jobs in November, according to data collected by the website Layoffs.fyi.

Amazon gave staffers who were laid off 60 days to search for a new role inside the company, after which they’d be offered severance, according to a former Amazon Web Services employee who lost his job. The person spoke to CNBC on the condition of anonymity.

In fiscal 2021, Amazon had the most approved petitions for H-1B visas, with 6,182, according to a National Foundation for American Policy review of U.S. immigration data. Google, IBM and Microsoft also ranked near the top of the list.

The former AWS employee has been in the country for two years on student and employment visas. He said he was unexpectedly laid off at the beginning of November, just months after joining the company as an engineer. Despite Amazon informing him that he had 60 days to find another position internally, the person said his manager advised him to apply for jobs elsewhere due the company’s pullback in hiring. Amazon said in November it’s pausing hiring for its corporate workforce.

An Amazon spokesperson didn’t provide a comment beyond what CEO Andy Jassy said last month, when he told those affected by the layoffs that the company would help them find new roles.

Companies generally aren’t specifying what percentage of the people being laid off are on visas. A search for “layoffs H1B” on LinkedIn surfaces a stream of posts from workers who recently lost their jobs and are expressing concern about the 60-day unemployment window. Visa holders have been sharing resources on Discord servers, the anonymous professional network Blind and in WhatsApp groups, the former AWS employee said.

It had already been a frenetic few years for foreign workers in the U.S. well before surging inflation and concerns of a recession sparked the latest round of job cuts.

The Trump administration’s hostile posture toward immigration put the H-1B program at risk. As president in 2020, Donald Trump signed an executive order suspending work visas, including those with H-1B status, claiming they hurt employment prospects for Americans. The move drew a strong rebuke from tech executives, who said the program serves as a pipeline for talented individuals and strengthens American companies. President Joe Biden allowed the Trump-era ban to expire last year.

Whatever relief the Biden presidency provided is of limited value to those who are now jobless. An engineer who was recently laid off by gene-sequencing technology company Illumina said he hoped his employer would sponsor his transfer to an H-1B visa. He’s here on a different visa, known as Optional Practical Training (OPT), which allows graduates in science, technology, engineering and mathematics (STEM) to work in the U.S. for up to three years after graduation.

The former Illumina employee, who spoke on condition that he not be named, not only has to find a new job within 90 days from the layoff date, but his OPT visa expires in August. Any company that hires him must be willing to sponsor his visa transfer and pay the related fees. He’s considering going back to school in order to extend his stay in the U.S., but he’s anxious about taking on student loans.

Illumina said in November it was cutting about 5% of its global workforce. A company spokesperson told CNBC that less than 10% of impacted employees were here on H-1B or related visas.

“We are engaging with each employee individually so that they understand the impact to their employment eligibility and options to remain in the U.S.,” the spokesperson said by email. “We are working to review each and every situation to ensure great care for those impacted, and to ensure compliance with immigration law.”

The ex-employee said he had dreams of working for Illumina, planting roots in the U.S. and buying a house. Now, he said, he’s just trying to find a way to stay in the country without going deep into debt. In just a matter of months, it’s “like a night and day difference,” he said.

WATCH: Tech layoffs double from October to November