A bidding war appears to be brewing for building products distribution company GMS (GMS 23.77%), and investors are excited by the possibilities.

Shares of GMS jumped 26% on Friday morning after the company was put in play by an unsolicited suitor.

Drywall installation at a construction site.

Image source: Getty Images.

A building products bidding war?

GMS is a construction products distributor and tool supplier for consumer and commercial customers. Late Wednesday, QXO (QXO 5.73%) proposed acquiring the business for about $5 billion, or $95.20 per share in cash, a premium of 27% to GMS's 60-day volume-weighted average.

QXO is a roll-up put together by Brad Jacobs, the M&A specialist behind companies including XPO and United Rentals. The company did its first deal in April, acquiring Beacon Roofing Supply for $11 billion, and continues to seek out acquisition opportunities toward its goal to build a $50 billion business in the years to come.

GMS said its board would review the proposal. QXO set a deadline of June 24 for a response, saying it intends to go directly to GMS shareholders if a deal can't be worked out.

But QXO might have competition for the business. Late Thursday, The Wall Street Journal reported that Home Depot (HD 0.91%) has also made an offer for GMS. So far, Home Depot has not gone public with a bid, and it is unclear what price it is offering for GMS.

Is GMS stock a buy?

Though nothing is certain, with two deep-pocketed suitors, it appears likely that GMS's time as an independent company is nearing an end. And it is possible that, since there are two bidders, the sale will be for a higher price than the $95.20-per-share QXO offer.

The market is already pricing that in, bidding GMS shares as high as $104 on Friday morning.

Though both Home Depot and QXO have the resources to engage in a bidding war, both have smart management teams and solid strategies and seem unlikely to dramatically overpay. It is also unclear whether Home Depot was simply being opportunistic, or if the company considers GMS to be strategic enough to engage in a battle.

Given the uncertainty of the outcome and the considerable premium already priced into GMS shares, investors should tread carefully.