Is it time to get out of junk bonds?

Savings bonds
Jitalia17 | E+ | Getty Images

Yield chasers have plowed into high-yield bonds in recent years, but with interest rate hikes looking increasingly likely, it may be time to head for the exits, analysts said.

"Not only do too many macro headwinds exist to create a compelling story for high yield, but fundamentals are the weakest they have been since the recession -- likely creating an environment where looking for a reason to sell becomes easy," analysts at Bank of America Merrill Lynch said in a note Thursday. "We caution investors to not grow complacent.

Read More Investors may love bonds now, but just wait

Other segments of the bond market have already faced a sell off. German bund yields have zipped higher, with the 10-year bund yield rising to around 0.85 percent last week from around 0.07 percent in April and pulling European sovereigns and U.S. Treasury yields up with them. Bond yields move inversely to prices.

U.S. yields have also been pushed higher by signs of economic improvement and the prospect that the U.S. Federal Reserve may hike interest rates this year for the first time since it went to a zero interest rate policy in 2008 during the Global Financial Crisis. Higher yields on the U.S. Treasurys, which are considered a "safe" segment of the bond market, would likely also spur selling riskier paper, like junk bonds, as investors can get a higher return with less risk elsewhere.

So far, high yield bonds haven't moved quite as much as other market segments. The U.S.-listed exchange traded funds (ETFs) SPDR Barclays High Yield Bond ETF and iShares iBoxx High Yield Corporate Bond ETF are each down around 1 percent so far this year. Fund flows into high-yield mutual funds and ETFs haven't shifted yet. While around $2.94 billion flowed out last week, that still leaves a net $15.7 billion of inflows so far this year, according to data from Jefferies.

But that could change.

Read More Are Asia's markets facing a 'hike hissy'?

"The risk is for the Fed to surprise markets with a move in September that causes a significant selloff -- particularly within a backdrop of growing geopolitical uncertainty," such as the Greece "debacle" and China's role in the underperformance of commodities, Bofa-ML said. The high-yield segment tends to have high retail ownership, making it susceptible to periods of uncertainty and volatility, it noted.

"The clock is ticking, in our view, until high yield has a correction of several points and we continue to believe the longer term prospects for the asset class are worrying," Bofa-ML said.

The bank isn't alone.

"We anticipate the sensitivity of both high yield and investment grade bonds toward benchmark US Treasury yields to increase," Nannette Hechler-Fayd'herbe, head of investment strategy at Credit Suisse's private bank, said in a note last month.

The bank is moving to neutral on high yield bonds.

--Patti Domm contributed to this article.

—By CNBC.Com's Leslie Shaffer; Follow her on Twitter @LeslieShaffer1