Britain’s political parties are poised to grant themselves special powers to use personal data to find out how people are likely to vote, despite the Cambridge Analytica scandal, The Independent can reveal.

Legislation set to clear Parliament within weeks will allow the profiling of voters to help infer their political opinions, privacy campaigners have warned.

The move comes as controversy has engulfed Cambridge Analytica over its collection of Facebook data, with the aim of using it to profile and target people during election campaigns. Even before the scandal erupted, political parties had faced questions about their use of social media to carry out online campaigning.

All the major parties have agreed to the exemption from new data protection laws, arguing it clarifies their widely recognised right to canvas voters in order to target possible supporters.

But critics say technological advances now enable such data to be mined to discover people’s opinions without their active consent. Organisations outside of the main political parties will be barred from collating voting data in this way.

Ailidh Callander, a lawyer at the group Privacy International, told The Independent that “no meaningful justification” had been given for the powers in the Data Protection Bill.

“This exemption is open to abuse by political parties and those working for them and can be used to facilitate targeted and exploitative political advertising,” she warned.

Paul Bernal, a data protection expert at the University of East Anglia Law School, said: “There’s a reason that we have secret ballots in elections and that we don’t keep a record of how people voted.”

The Electoral Reform Society has also raised the alarm over “data harvesting and campaign targeting”, demanding an urgent review of regulations.

“Online campaigning is the 21st century’s wild west – and the Cambridge Analytica saga is a very stark reminder that we have to assess how to govern the new terrain,” said Willie Sullivan, the organisation’s senior director.

The controversy has blown up over the way Parliament will update data protection laws that were put in place 20 years ago.

A schedule in the new legislation will give additional rights to process personal data – gained from fundraising, surveys and casework – to “elected representatives”, or “a person acting with the authority of such a representative”.

They will be granted to MPs, MEPs, members of the Scottish Parliament, Welsh Assembly and Northern Ireland Assembly, and also to local councillors.

The law will say data should not be processed if the person involved is likely to suffer “substantial damage or substantial distress”, or if they have opted out.

But critics say such exemptions require people to choose to intervene – when they may not even know the data has been collected about them.

The Cambridge Analytica scandal has shown that even apparently innocent data, such as the music a person likes, can be used to work out their political opinions, they point out.

Privacy International said the proposed new rules were similar to the 1998 Act, but failed to recognise that “technology and data processing in the political arena have moved on”.

“As we can see from the work of Cambridge Analytica, personal data that might not have previously revealed political opinions can now be used to infer information about the political opinions of an individual,” Ms Callander added.

It would allow private firms, under contract to political parties, to “process personal data revealing political opinions for a wide range of purposes” without the explicit consent of the person concerned, Ms Callander said.

Mr Bernal said data that could reveal voting preferences should be given “more protection”, warning: “Almost anything can be used to at least have a guess at your political leanings.”

However, the Government, Labour and the Liberal Democrats defended the schedule in the bill, which has already cleared the Lords, is in its later stages in the Commons and is intended to reach the statute book next month. It is needed to conform with new data protection rules being imposed by the EU, which come into effect in May.

The Department for Digital, Culture, Media and Sport said that, without the special status for political parties, they would need separate written consent to use the data gathered from every doorstep conversation, or from any volunteer or political survey.

It described the measure as “both necessary and proportionate”, insisting it had “put the appropriate safeguards in place”.

Liam Byrne, Labour’s shadow digital minister, said: “Engaging, listening to and canvassing voters is fundamental to what political parties do and is expected by citizens as something fundamental to our democracy.

“That task is rightly, massively regulated by both the Information Commissioner and the Electoral Commission.

“The Data Protection Bill, and previous Data Protection Act, recognises the need for political parties of all stripes to process this data with lots and lots of appropriate safeguards.”

The Liberal Democrats argued the issue was entirely separate to the allegations against Cambridge Analytica, which “are deeply concerning to us and should be properly investigated”.

A spokeswoman said: “Liberal Democrats take the importance of data protection incredibly seriously, and potential abuses of it.