On Tuesday evening, the nation held its collective breath as the English football team beat Colombia on penalties to make it to the quarter-final of the world cup. Meanwhile, Vote Leave leaked news that the Electoral Commission is set to find it breached electoral law during the Brexit referendum.

This is not the most obvious example of news being buried in Westminster. But it could be one of the most significant. With Britain just months from falling off a Brexit cliff edge, and with no guarantee yet in place for a people’s poll on the final deal, the disastrous consequences of failing to meet fundamental standards of democracy will be felt for generations to come.

Vote Leave chose to release details of the allegations it’s trying to defend itself against before the Electoral Commission could present its findings. Presumably they wanted to take back control of the story. We now know the Electoral Commission has accused Vote Leave of breaching its official spending limit of £7m by channelling donations to a smaller campaign, BeLeave, with which it was allegedly coordinating. If Vote Leave cheated, we as voters deserve to know the full facts, and while Jolyon Maugham of the Good Law Project may well be right that it’s unlikely any court will deem the outcome of the referendum void, that doesn’t mean Vote Leave should get off scot free.

It is vital that the police be given the power to investigate and prosecute electoral offences. At the moment these powers are held by the Electoral Commission, but are effectively rendered toothless by a £20,000 limit on the fines that can be imposed for wrongdoing. If there is evidence they broke the law, Vote Leave’s directors should face criminal charges. But we also need unlimited fines and police action, backed and informed by the Electoral Commission as a regulatory body, if we want to deter cheating in future elections and referendums.

This isn’t about whether you voted leave or remain – it’s about the very foundations of our democracy. And we must learn from this episode if we are to safeguard that democracy in the future. The Vote Leave revelations underscore the clear need for stricter controls on campaign spending. As a starting point, spending should be published online much more quickly than at present and with separate and stricter reporting requirements for social media platforms such as Facebook, so it is easier to track and easy to access.

A ban on central campaigns gifting money to smaller ones would have prevented Vote Leave from giving BeLeave over £600,000 in the final weeks of the referendum, which the Electoral Commission says breached Vote Leave’s official spending limit of £7m.

Our electoral laws need to keep pace with the digital change driving elections too. Cambridge Analytica harvested the data of 71 million Facebook users, including 1 million Britons. We know that information about relationships, political beliefs, interests and hobbies can be used to influence how people vote. Cambridge Analytica may be closing its doors, but it would be an act of great naivety to think the company’s practices will die with it. Just one-quarter of people in Britain trust news on social media, and is it any wonder?

The digital world is finding its way into ever greater areas of our lives, and the internet has the potential to be the most democratic space in society, if we work hard to secure that. A new digital bill of rights for democracy, as championed by Fair Vote, could take on surveillance capitalism and establish the UK as the leading voice on standards for the rule of law and democracy in digital spaces, including by creating an independent regulatory body for social media platforms. And we should be urgently seeking cross-party agreement on legislation to regulate digital campaigning in future elections. Meanwhile, we need confidence that controls are in place to stop the likes of Vote Leave manipulating the system.

• Caroline Lucas is co-leader of the Green party of England and Wales, and the MP for Brighton Pavilion