Japan's SoftBank Group is in discussions to buy a majority stake in US shared office space provider WeWork Cos, a source said, potentially doubling down on one of its biggest bets on a loss-making startup. 

Pricing and other details have yet to be firmed up, the source said, adding that it was not a done deal.

A second source also said SoftBank is in talks about a major new investment in WeWork.

The Wall Street Journal reported earlier that SoftBank's investment could be between $15 billion and $20 billion and would likely come from SoftBank's Vision Fund. 

A smaller SoftBank investment under discussion earlier in the year valued WeWork at up to $40 billion, the Journal reported in June. 

SoftBank and its Vision Fund invested $4.4 billion in WeWork last year and the Japanese company holds two board seats. 

WeWork's prospects have been treated with skepticism by some Silicon Valley investors who see the company as an overvalued property play vulnerable to a property market downturn.

In its first ever release of financial results in August, WeWork said its second-quarter losses mounted. 

A majority stake in WeWork by SoftBank, which has raised more than $93 billion to create the technology-focused Vision Fund, would be a shift from its more common practice of taking minority stakes in high-profile late-stage startups. 

SoftBank has invested billions of dollars in loss-making US ride-services firm Uber Technologies but owns only a minority stake. 

WeWork and the Japanese company are closely entwined, with hundreds of SoftBank staff using space at the two companies' Japanese joint venture and SoftBank considering moving its headquarters into WeWork offices.

SoftBank's other real estate-related investments include Compass, an online real estate marketplace, Katerra, a construction start-up, and Indian hotel chain OYO Hotels.

SoftBank CEO Masayoshi Son points to artificial intelligence as the common thread linking its portfolio companies, with that technology in the future able to drive vehicles, diagnose diseases and power financial services.

Eight-year old WeWork's business is growing rapidly, with second-quarter sales more than doubling from a year earlier.

In September it surpassed JPMorgan, the biggest US bank, as the largest tenant of Manhattan office space, highlighting growing demand for flexible leases. 

WeWork's Chinese unit raised $500m in July from investors including SoftBank, Hony Capital and Trustbridge Partners, to drive its expansion in that country.

It also has operations in Ireland.