Trader on the floor of the New York Stock Exchange.

"We believe the greater risk is that the impact of the coronavirus on earnings may well be underestimated in current stock prices, suggesting that the risks of a correction are high," strategist Peter Oppenheimer wrote in a note.

Goldman Sachs sounded the alarm on Wednesday to clients about a possible correction in the stock market, noting investors are underestimating how big of a risk the coronavirus really is.

Investors have been grappling with the possible ramifications of the coronavirus outbreak in recent week. But except for a few pullbacks, the major U.S. stock indexes have taken the news in stride. On Wednesday, the S&P 500 and Nasdaq Composite jumped to record highs. Oppenheimer thinks the market could be in trouble if earnings expectations aren't ratcheted down.

"Equity markets are looking increasingly exposed to near-term downward surprises to earnings growth," Oppenheimer said. "While a sustained bear market does not look likely, a near-term correction is looking much more probable."

— CNBC's Michael Bloom contributed to this report.

Subscribe to CNBC PRO for exclusive insights and analysis, and live business day programming from around the world.