Emad Al-Mousa describes a denial of service mechanism:
Denial of service attack is one of the common cyber security attacks that will cause interruption, outage and potentical finanicial and operational damages. So, its very nasty attack that attackers use for damage intent.
The main problem here is that any sql server database login (user) can create temporary tables in TEMPDB database and no specific permission is required to be granted to this account in the first place. Also, there is no way (I am currently aware off) that restricts a database login from temporary tables creation.
Prior to SQL Server 2025, I’m not sure of a great way to prevent this attack, assuming the attacker has access to run arbitrary queries against your instance.