The S&P 500 is up 32% from its low last October, while the Dow Jones Industrial Average has gained 23%. The recent stock run-up has many optimistic that a new bull market has arrived.

Despite the recent rally, some stocks have gotten left behind. PayPal (PYPL 2.90%) is down 76% from its all-time high after phenomenal growth during the pandemic. Meanwhile, 3M Company (MMM 0.46%) has gone through legal battles in recent years that are now coming to a resolution. While these stocks have faced challenges recently, they trade at dirt cheap valuations that deserve your attention. Here's why.

1. PayPal

PayPal was a huge winner during the pandemic. In 2020 and 2021, the fintech added 122 million new accounts, surpassed $1 trillion in total payment volume, and grew its revenue by 43%. In February 2021, management set a bold goal: doubling its active accounts and free cash flow by 2025. 

Since then, its customer growth has slowed significantly, leading management to revise its growth strategy. Rather than focusing on active accounts, the company would focus on getting its current customers to use its platform more frequently. This shift in focus kick-started the sell-off in PayPal stock from its all-time high of $310 per share to as low as $59 per share in May of this year.

PayPal has gone through growing pains in the past year, revising its earnings and dealing with the effects of decoupling from eBay, which spun off the fintech in 2015. PayPal's struggles got the attention of Elliott Investment Management, an investor looking to take an active role in righting the ship, and it opened a $2 billion stake in the company.

PayPal also has over 433 million active accounts and owns Braintree, an unbranded-processing solution for online businesses to accept digital payments. Last year Braintree's total processed volume (TPV) was $408 billion, up 40% from the prior year; this was a significant driver of its TPV growth in recent quarters. In the first quarter, transactions per account, management's new focus, has grown from 47 last year to 53 this year, up 13%. 

The size of its user base and increasing usage of its platform, especially from Braintree, shows that PayPal has some network effects similar to those of Visa or Discover, which can give it some staying power. With a price-to-earnings (P/E) ratio of 30.9 and a price-to-sales (P/S) ratio of 3, PayPal trades near its cheapest valuation since going public and could make an excellent bargain stock to buy and hold long-term.

PYPL P/E Ratio Chart.

PYPL P/E Ratio data by YCharts.

2. 3M Company

3M Company has dealt with its share of legal issues in the past few years. For one, it faces class action lawsuits relating to its earplugs for noise-related hearing loss in military personnel. Additionally, it has come under fire for using "forever chemicals," which have contaminated public drinking systems in regions across the U.S.

These legal issues have plagued the company for years, but things are finally coming to a resolution. Last month it agreed to a $10.5 billion to $12.5 billion settlement relating to its use of forever chemicals that polluted drinking water. While this is a sizable payout, it is below some legal experts' expectations. The settlement doesn't include personal injury or state lawsuits over damages to natural resources but is a step in the right direction. 

Then there's the earplug lawsuit. Barclays analyst Julian Mitchell estimates that the earplugs settlement will cost around $8 billion to resolve. While this is a significant payout, it's below previous estimates by Wall Street that saw liabilities as high at $14 billion. 

Wall Street hates uncertainty, and 3M stock has taken a beating in recent years. Its P/E ratio of 11.4 is its lowest since 2008, during the Great Recession. However, the company gained ground in resolving these issues, making the stock an appealing buy at today's prices.

MMM P/E Ratio Chart.

MMM P/E Ratio data by YCharts.

3M is amid a significant turnaround, restructuring its operations to streamline its business and cut costs, which management estimates could improve annual operating income by $700 million to $900 million. It also plans to spin off its healthcare business at the end of 2023, which experts say could unlock value for the beleaguered company.

3M has historically been a solid stock for investors. It has a long history of producing steady cash flow and raising its dividend payout for decades. Investors have understandably been frustrated by the stock performance in recent years. However, more clarity on the scope of its legal issues, implementation of a restructuring plan, and a historically low valuation make this stock a worthy consideration for investors.