Two workers at a major consulting firm have been sacked and face criminal charges for allegedly accessing the Prime Minister’s personal bank account details while deployed at Commonwealth Bank of Australia.

The workers started at Ernst and Young in March alongside a group of other graduate employees before being sent on secondment to CBA to consult on its technology systems.

The Australian Financial Review, citing anonymous people familiar with the matter, reports that the employees accessed the bank details of Anthony Albanese and a senior EY partner.

They have been sacked and were charged by the Australian Federal Police on May 6 for accessing the personal banking details of a federal parliamentarian.

The pair appeared in Sydney’s Newtown Local Court on Tuesday.

EY declined to comment on the report, while CBA said: “It is not appropriate for us to comment on individual contractor matters”.

The consultancy firm has since reiterated its policies to staff and stressed it was monitoring compliance measures.

The two staffers would have been given a system warning requiring them to confirm they were permitted to access a customer’s private information before looking at it, sources told the AFR.

They would have been granted access once they agreed that clearance had been provided to look at the confidential bank details.

EY trains its staff to only access accounts for proper work purposes and says workers should not look at private details out of curiosity.

The AFP charged a 21-year-old man with unauthorised access to, or modification of, restricted data.

He was also charged with “using a carriage service to make available, publish or otherwise distribute information that is personal data, of one or more individuals, and engaged in that conduct in a way that reasonable persons would regard, in all the circumstances, as menacing or harassing towards those individuals”.

Another 25-year-old man was charged with unauthorised access to restricted data.

The Prime Minister’s office has been contacted for comment.

Treasurer Jim Chalmers told reporters the allegations and charges are “incredibly concerning”.

“I need to be really careful not to interfere with any legal processes which are under way, but I think on the face of it any developments of that kind are incredibly concerning, not just in relation to the PM’s details, but any Australians’ details,” Mr Chalmers told reporters in Canberra.

“In general, that’s what I would say about that. I assume that there are now legal and other processes to play out, and I don’t want to get in the way of those.”