A Treasury Department official revealed Tuesday that an Elon Musk aide had been mistakenly granted permission to change the highly sensitive payment system, which contains millions of Americans’ private information. This admission was made in a sworn declaration to a federal court amid heated criticism that the 25-year-old employee of billionaire Musk held editing rights over a system that handles trillions in government payments.

Musk announced that Elez, who was not a federal employee, would be reinstated after he resigned on Friday, following his linkage to a racist account. Musk has been tasked by President Donald Trump to cut down on government spending in his new role as head of the Department of Government Efficiency (DOGE).

According to the sworn declaration, Elez was to have read-only access under the supervision of the Bureau of the Fiscal Service (the Treasury Department section responsible for managing payments and collection).

Joseph Gioeli from the Payments section said that on the morning of February 6, the database access of Mr. Elez to SPS had been set up with read/write permissions, instead of just read-only.

Secure Payment System is the acronym for this system. Initial investigation revealed that all of Elez’s interactions with the SPS occurred in a monitored session. “No unauthorized actions have taken place,” said the official. Elez gained access to a laptop computer belonging to the Treasury Department, which sparked a riot among Trump critics and raised concerns about the security of Americans’ data.

DOGE does not have a statutory status in the federal government, which would require authorization from Congress. Neither Musk nor his aides is a civil servant or federal employee. Elez is one of the two DOGE employees who had access to the Treasury Payment System.

The U.S. press reported a confidential assessment by the Treasury Department, warning that this access posed an “unprecedented risk of insider threats.”

A court order forced Elez to revert to a read-only authorization for the payment system before he resigned. Democrat legislators and citizen advocacy groups had warned of the dangers that the data he was able to access could pose to the national economy and security.

Thomas Krause, another member of the DOGE Team, submitted an oath to the same court on Tuesday. He stated that he had been employed by the Treasury as a “Senior Consultant for Technology and Modernization” without pay since Jan. 23, 2009.

He later was delegated duties as “Fiscal Assistant Secretary,” but stated, “I have yet to assume the duties.” Krause’s title is shown in the Treasury Department organizational chart.

In his statement, he said that even though he coordinated with officials from USDS/DOGE and provided them with regular updates about the team’s status, a high-level directive was received by them. He added the team of the Treasury Department consisted of him and Elez.