There is a new mania infecting the stock market: pot stocks.

Cannabis-related names are soaring as companies and investors are clamoring to get exposure to the burgeoning marijuana-legalization trend. But many veteran traders and investors are cautious on buying pot stocks after the sector's surge, saying the frenzy is reminiscent of previous bubbles.

In June, Canada announced it will legalize recreational marijuana use effective Oct. 17, sparking a series of industry moves. Soon after Canadian marijuana producer Tilray filed for an initial public offering, which occurred in July.

In August, Molson Coors said it will partner with The Hydropothecary Corp. to develop cannabis-infused beverages for the Canadian market. Later that month beer maker Constellation Brands invested an additional $4 billion in Canadian-cannabis producer Canopy Growth.

As a result of the news, pot stocks are soaring. Canopy Growth's stock has more than doubled this year.

Tilray shares are doing even better and have become the poster child of the pot stock frenzy.

The marijuana producer's shares are up more than 800 percent since its first day of trading after its July IPO and rose nearly 600 percent in the past month. The stock rallied as much as 94 percent Wednesday, a day after its CEO, Brendan Kennedy, told CNBC's Jim Cramer that pharmaceutical companies should partner with cannabis producers as a "hedge" against the space. Tilray shares later pared its gains and closed up 38 percent for the trading session after multiple volatility halts.