Amid all the finger-pointing over who’s to blame for the subway “summer of hell,” New York’s leading politicians at least agree on this much: The transit system needs more money.

Put aside, for a moment, the not-insignificant question of whether the Metropolitan Transportation Authority is even capable of spending the money effectively enough to unsnarl the system anytime soon.

If money is a big part of the solution, where will it come from?

Mayor de Blasio, unsurprisingly, looks to Albany. Gov. Cuomo says the city needs to do more.

While exaggerating the state’s MTA commitments so far, Cuomo has a point about the city. But the governor isn’t exactly being straightforward about his own financial capabilities.

In fact, to a degree unheard of at any time in the past 65 years, New York’s state treasury is swimming in excess cash that ideally could, and should, be devoted to projects like fixing the subways.

This isn’t the product of boosted tax revenue from a faster-growing economy, nor is it the result of superior money management.

Rather, over the past three years, Cuomo has reaped an unprecedented windfall of more than $10 billion in fines and penalties paid by major financial institutions for violating various state and federal banking laws.

Coming virtually out of the blue, the windfall represented a unique opportunity to get ahead of the state’s most pressing problems — including but not limited to those of the transit system.

It’s an opportunity Cuomo has mostly squandered.

When the first $5 billion materialized in 2014, Cuomo warned against spending it on recurring operating expenses like school aid. But since then, he’s used $1.2 billion just to balance his annual budgets, including $461 million to make up for a shortfall in projected fiscal 2018 tax receipts. Another $850 million was (properly) used to start paying back the federal government for Medicaid overbilling pre-dating Cuomo’s tenure.

The remaining $8 billion in windfall cash was deposited in a new Dedicated Infrastructure Investment Fund. Out of that, the MTA capital plan is slated to receive just $315 million — most of it earmarked not to improve the existing system but to start building a planned new Metro-North commuter rail line through The Bronx to Penn Station.

One major windfall-funded grant — of nearly $2 billion — is going to the state Thruway Authority, where it will underwrite roughly half the cost of the new Tappan Zee Bridge, Cuomo’s signature project. This will allow the governor to pretend for a few more years that tolls can be indefinitely “stabilized” — even as the bridge project sucks up revenue that used to subsidize capital needs throughout the Thruway system.

Another $1.7 billion has been allocated for upstate “economic revitalization” projects — which, in practice, will boil down to little more than gravy for politically wired developers and corporations promising jobs in exchange for tax subsidies.

Yet another $400 million is slated to fund “Phase II” of Cuomo’s so-called Buffalo Billion — a first-term Cuomo initiative funded mainly with borrowed cash. So far, its most tangible result has been a behind-schedule, $750 million solar-panel factory — which led to a federal bid-rigging probe.

The biggest remaining chunks of windfall cash have been allocated to affordable and supportive housing ($590 million), high-speed broadband Internet access ($500 million), health-care facilities ($355 million) and “security and emergency readiness” ($250 million, including $50 million in new GPS-equipped state snowplows).

To top it off, Cuomo is temporarily diverting $1 billion in windfall funds to jump-start an expansion of the Javits Center — despite the fact that when he first announced it in January 2016, he promised it would be “self-financed.”

Yet even now, there’s a silver lining to all this questionable spending: State financial records show that more than half the windfall cash hasn’t yet gone out the door.

So, write off the funds Cuomo has spent on or committed to the Thruway (which will still need to raise tolls) and housing programs (part of a settlement with the Legislature). That leaves $4 billion Cuomo and the Legislature could fairly quickly reprogram from lower-priority uses to transportation.

Reserve up to half that amount for highway and bridge construction outside the city — subway riders aren’t the only New York residents coping with a crumbling transportation system.

That would leave the MTA with at least $2 billion more to devote to improving the antiquated subway signal system.

Problem solved? No. But if more money really is part of the answer, setting better priorities for state windfall cash would be a start.

E.J. McMahon is research director at the Empire Center for Public Policy.