Shadow Treasury minister says plan could 'compromise the privacy of individuals simply complying with their tax obligations'

The Treasury must urgently explain its plans which are intended to allow HM Revenue and Customs to sell the personal data of millions of taxpayers to private companies, Labour says.

The call comes after the Guardian revealed that ministers were planning to alter the law to allow sharing of anonymised data with third parties where public benefit exists. They are now examining charging options.

Critics fear that the data could include details about income, tax and payment history, and that the arrangements could carry a risk of people being identified. Even the perception that this could happen might lead to a breakdown in trust between HMRC and taxpayers, the Chartered Institute of Taxation warned.

Shabana Mahmood, the shadow exchequer secretary, has now joined the debate, calling on the Treasury "to explain urgently if such a programme exists, and if so what its purpose is".

She said: "We would be concerned if the government put anything forward that could compromise the privacy of individuals simply complying with their tax obligations."

The plan, overseen by the Tory exchequer secretary, David Gauke, has provoked a backlash from privacy campaigners and tax professionals.

The Tory MP David Davis, a former minister and shadow home secretary, branded it "borderline insane" and said the Treasury had come up with no credible justification.

HMRC has not made clear exactly what data it would share and with whom, but it has a wealth of information about people living in Britain. Its director of risk and intelligence said in 2012: "We have more data than the British Library."

The government has strict rules about what can be released outside HMRC, with a near-total ban on data sharing unless it is beneficial for the organisation's internal work.

Yet despite the restrictions HMRC has launched a pilot scheme that has released data about VAT registration, for research purposes, to three private credit ratings agencies – Experian, Equifax, and Dun & Bradstreet.

To comply with the law, the private ratings agencies, which determine credit scores for millions of people and businesses, have been contracted to act on behalf of HMRC and are "therefore treated as part of the department". They get access to tax data about businesses that would otherwise be confidential.

The government's plans to alter the law to allow the sale of anonymised individual tax data and release of the VAT register, were buried in documents as part of the autumn statement and recent budget.

Emma Carr, of Big Brother Watch, said the government should not try to sneak the plans through without a public debate. She said: "The ongoing claims about anonymous data overlook the serious risks to privacy of individual-level data being vulnerable to reidentification."

During the consultation process officials acknowledged "concerns around the dangers of individual identities being disclosed inadvertently" but they said they believed the data could be appropriately protected.

The Treasury confirmed it was proceeding with plans to legislate to make aggregated and anonymised data more widely available, as set out in an HMRC document that said: "The government has decided to proceed with the proposal to remove the legal restrictions that currently limit HMRC's ability to share anonymised individual-level data for the purpose of research and analysis and deliver public benefits wider than HMRC's own functions, but they accept that this must be done only where there are sufficient safeguards in place to protect taxpayer confidentiality."

An HMRC spokesman said: "HMRC is committed to protecting its customers' information. We shall be consulting further on implementing the proposals for sharing anonymised data, and would only take forward specific measures where there was a clear public benefit and subject to suitable safeguards."