What would happen if we discovered that Russians hacked into the results of the 2016 presidential election and tipped the outcome in favor of Donald Trump — literally changed the vote totals?

In the past few weeks, we have learned that the Russian government reached more than 10 million Americans with a misinformation campaign on Facebook, and that hackers targeted 21 state election systems, stealing information from 90,000 voting records in the state of Illinois alone. These are just the latest of many revelations about Russia’s unprecedented interference in the election.

It is cold comfort that we have no evidence so far that Moscow actually manipulated vote tallies to change the election’s outcome.

But what if it emerges that Russian operatives were successful on that front as well? Setting Trump aside, what if a foreign government succeeds in the future in electing an American president through active vote manipulation?

The Constitution offers no clear way to remedy such a disaster.

Any evidence that the Trump campaign colluded with Russia raises its own set of important issues — now being assiduously investigated by special counsel Robert Mueller. But the disturbing scenario in which hackers manipulate election results, conceivably rendering the true vote tally unrecoverable, would pose a unique threat to a foundational principle of our democracy: rule by the consent of the governed. We would in no sense have a government “by the people.”

Although such a constitutional crisis now seems all too plausible, we have yet to seriously consider provisions that might protect our democracy — measures that could allow us to reverse such a result.

The Electoral College can act, but only if the hack is discovered immediately

One tool to resolve a hacked election is that old, most vilified institution: the Electoral College. While many see the Electoral College as archaic and inherently undemocratic, the very mechanism that allows electors to deviate from the popular vote may be the simplest way to reverse an undemocratic election result. If notified of the outcome-altering interference in time, the electors could mitigate the damage by selecting a different candidate.

Unfortunately, this approach can only work if the interference becomes apparent between Election Day and when the Electoral College votes, typically a month or so later.

But what if we discover interference well after the Electoral College has voted — with an illegitimate president sitting in the Oval Office? In such a case, we lack the protections enjoyed by other nations, such as the United Kingdom. Under a parliamentary system, elected representatives can vote to dissolve the standing government and hold an election to install a new executive. (Similarly, some US states allow for recall elections that could solve this problem if Russia managed, for whatever reason, to swing a gubernatorial election.)

At first glance, the Constitution contains no provision that would rescue us. There are two mechanisms that allow for the removal of the president: impeachment and the 25th Amendment. But impeachment is reserved for presidents found guilty of “high crimes and misdemeanors,” and the 25th Amendment only provides for the removal of an executive who is “unable to discharge the powers and duties of his office.”

Does a president who unknowingly benefits from illegal hacking commit a high crime or misdemeanor? That’s far from clear. Is a president who is healthy and competent, but illegitimately elected, unfit to discharge the powers and duties of his office? To some degree that’s for Congress for decide, and the Supreme Court might defer to legislators who conclude that a president is unfit to serve. But the answer to that question, too, is ambiguous.

This brings us back to square one.

To avert a constitutional crisis, it is time that we devise a solution to this foreseeable problem. Naturally, any such reform should happen alongside continued efforts to improve our election infrastructure — building better systems for maintaining voter rolls and counting ballots, even as hackers continue to improve their infiltration methods.

We must use the same tools as the founders, law and institution building, to deter hostile foreign actors and fortify the process for choosing our leaders.

We may need a constitutional amendment

One way to do so would be to empower Congress to dissolve an illegitimate government and call for a special election. Norm Ornstein, of the American Enterprise Institute, has raised the possibility that Congress could pass legislation providing for a new presidential election — a “do-over” election, in effect. Article II, Section I of the Constitution gives Congress the power to “provide by Law” who shall succeed the president. But as the Constitution is currently written, Congress can only legislate on this issue if the president and vice president are no longer in office due to “Removal, Death, Resignation, or Inability.”

A constitutional amendment could give Congress the authority to act in the case of an illegitimate election as well. It would not be the first time that Congress has extended its authority in the area of presidential succession. The 25th Amendment, which gave Congress some authority to remove a president who is deemed unfit to serve, was ratified as recently as 1967. Now might be the time to extend congressional power in this domain to the scenario in which a president was elected illegitimately. Such a provision would provide a clearer blueprint for how our democracy would move forward, with Congress leading the way.

Another option would be to constitutionally empower the Electoral College to police foreign influence in our elections — even after a new president is inaugurated. The founders explicitly conceived of the Electoral College as a mechanism to prevent an illegitimate president from taking office. In the Federalist Papers, Alexander Hamilton wrote that the Electoral College was designed to check any “foreign powers [hoping] to gain an improper ascendant in our councils,” and that electors should guard against foreign capture of the presidency in particular.

Empowering the Electoral College with the investigative authority to carry out this obligation may seem like a drastic step, but it may be the simplest way to guard against an illegitimate presidency without departing far from the vision of our founders. Any such solution would also have to ensure that the electors — now a group largely chosen by party leaders — are the kind of people who could make the reasoned, nonpartisan judgments that their expanded role would require.

We should act before we find ourselves thrust into a constitutional crisis of historic dimensions. But any solution to this issue — most likely in the form of a constitutional amendment — would require bipartisanship in a time of unprecedented polarization. If recent history is any indicator, the Republican-controlled Congress (and Republican-controlled state legislatures) will be unwilling to work with Democrats to remedy this constitutional defect.

In the meantime, our Constitution leaves us powerless to protect against those waiting for the right moment to subvert our electoral system, assuming they have not already done so.

Vinay Nayak and Samuel Breidbart are students at Yale Law School.

The Big Idea is Vox’s home for smart discussion of the most important issues and ideas in politics, science, and culture — typically by outside contributors. If you have an idea for a piece, pitch us at thebigidea@vox.com.