SoftBank is WeWork's biggest outside shareholder. J.P. Morgan Chase was supposed to lead its IPO. Now the two firms are trying to pull together a financing package to save the office-sharing company, according to people familiar with the matter.

Without additional funding, WeWork is poised to run out of cash by mid-November, said the sources, who asked not to be named because the discussions are confidential. SoftBank and J.P. Morgan have been seeking an emergency solution in the two-plus weeks since WeWork withdrew its IPO filing, with one option involving equity from SoftBank and debt from J.P. Morgan, the people said.

In its current effort to seek emergency financing, J.P. Morgan is talking to 100 investors who have signed non-disclosure agreements to potentially participate, the people said.

Bloomberg reported on Monday that WeWork was leaning toward an almost $5 billion financing package led by J.P. Morgan rather than selling a controlling stake to SoftBank, which has already plunged over $10 billion into the business. J.P. Morgan is the third-biggest outside shareholder, behind SoftBank and Benchmark.

It's been a dramatic reversal of fortune for WeWork, which was until recently one of tech's highest-flying private companies. SoftBank's latest funding earlier this year valued the company at $47 billion and set it up for what was supposed to be a blockbuster IPO. But public investors proved unwilling to comply, punishing cash-burning companies Lyft and Uber after their share sales in the months leading up to WeWork's filing.

When WeWork revealed a $900 million loss over six months in its prospectus, investors immediately balked. The company, which rents out co-working spaces to start-ups, freelancers and enterprises, has to plunge cash into real estate in some of the most expensive markets and makes money back over time as tenants pay their rent. In its prospectus, the company reported long-term lease obligations of $17.9 billion.

Just as the financials were being scrutinized, corporate governance issues began surfacing along with reports of problematic behavior from CEO Adam Neumann, who was fired last month. Neumann, the top stakeholder, will see his voting shares reduced in power from 10:1 to 3:1, a source confirmed to CNBC, meaning he will no longer have majority voting control. Now the company is gearing up for layoffs.

Representatives from SoftBank, J.P. Morgan and WeWork declined to comment.

WATCH: Layoffs expected at WeWork in coming weeks