The identities of the hackers and how they managed to breach the department’s security are unclear.
HUD spokesman Kasery Lovett told The Hill: “Another waste of taxpayer dollars and resources. Appropriate action will be taken for all involved”.
A draft proposal leaked to media last week showing the Trump administration was planning to sack half of all HUD employees.
At the weekend, Musk provoked anger from civil servants by saying they needed to provide a list of five things they had accomplished in the past week or face dismissal.
Several Cabinet members have told employees to ignore the instruction, prompting a power struggle in the administration.
Musk is one of the US President’s closest allies, having spent close to US$300 million ($523m) on his re-election campaign, and last month was appointed to run its Department of Government Efficiency.
In a joint Fox News interview between the two men last week, Trump said Musk warned him media reports about his influence were intended to divide them.
“Elon called me. He said, you know, they’re trying to drive us apart. I said, absolutely,” he told Fox News.
“They said, ‘We have breaking news. Donald Trump has ceded control of the presidency to Elon Musk. President Musk will be attending a Cabinet meeting tonight at 8.’”