WeWork is in talks with banks including JPMorgan to arrange financing that could help the office-sharing company stave off a looming cash crunch, The Post has learned.

The cash infusion for WeWork’s parent We Company — which was forced earlier this week to cancel an initial public offering that had been targeted to raise $3 billion — could come in the form of either debt, equity or a combination of both, a source close to the situation said.

The talks, which also are getting participation from Goldman Sachs, are still in the early stages and are fluid, sources cautioned. According to one source, one option has the banks arranging a loan as big as $2 billion or more.

Japanese tech conglomerate Softbank, which has taken heat over its disastrous, $11 billion dollar bet on WeWork, is not currently expected to participate in the JPMorgan-led financing, one of the sources said.

Spokespersons for JPMorgan and We declined to comment. Goldman Sachs didn’t immediately respond to requests for comment.

The embattled office space company had lined up $6 billion in debt financing that was contingent on the IPO, which got canceled amid a swell of controversy over lavish spending and alleged self-dealing by co-founder Adam Neumann, who was ousted as CEO last week.

Without more capital, We Co. could run out of money next year, Sanford C. Bernstein said in a Wednesday report. The San Francisco-based startup had $2.5 billion in cash as of June 30, and is presently losing $700 million a quarter, Bernstein said.

WeWork’s $702 million of bonds sold last year are presently trading at 85 cents on the dollar, according to reports.

WeWork is taking steps to stem the losses and satisfy creditors. Last week, it replaced Neumann with new co-CEOs, Artie Minson and Sebastian Gunningham, who are reportedly planning to sell assets and lay off thousands of employees.

Neumann, who is now nonexecutive chairman, stepped down as it became clear the company’s valuation was headed below $20 billion ahead of the IPO, sorely short of the $47 billion it got in its latest funding round led by Softbank.

JPMorgan has loans tied to WeWork and has been its lead lender.

Jamie Dimon’s bank, along with UBS and Credit Suisse, helped Neumann with a $500 million personal line of credit that allowed him to buy buildings that he then leased back to WeWork.

Also, JPMorgan led the financing of WeWork’s $850 million purchase of the Lord & Taylor building. The bank is also a big commercial real estate lender, and WeWork is one of the biggest New York City commercial tenants.