Security has become mission-critical to companies in an increasingly digital and technology-driven world. The consequences of failure are costly. An annual report by International Business Machines estimates that the typical breach can cost companies $4.9 million in damages.
Therefore, it should come as no surprise that cybersecurity is a hot topic in the stock market. Research from Roots Analysis estimates that the global cybersecurity market will grow from $215 billion last year to $697 billion by 2035, representing an 11.3% annualized growth rate over the next decade.
But don't look to the antivirus programs your parents used on their computers in the late 1990s. Today, a new crop of next-generation security companies is taking over the field. Here are five cybersecurity stocks to consider buying and holding for the next decade.

Image source: Getty Images.
1. Palo Alto Networks
A highly connected world creates security vulnerabilities. That's where Palo Alto Networks (PANW 1.73%) comes in. The company specializes in firewall technology, which acts like a security guard on a network, monitoring what is trying to get in, and stopping suspicious actors. The company has expanded into cloud security and integrated artificial intelligence (AI), a common theme on this list, to improve its protection.
It is one of the largest dedicated cybersecurity companies and is driving growth by transitioning its business model from selling specific solutions tailored to individual customer needs to a platform strategy. Analysts estimate that Palo Alto Networks will continue to grow its earnings by an average of 20% annually over the long term, as spending across the broader security market increases.
2. CrowdStrike Holdings
It's hard to discuss cutting-edge security without including CrowdStrike Holdings (CRWD 0.88%). The company has garnered recognition for its endpoint security, which protects connected devices (endpoints) in a network, such as laptops or smart devices. It has expanded to become a comprehensive security platform with enhanced capabilities, sold to customers as product modules.
Cross-selling has driven staggering growth for CrowdStrike. Today, nearly a quarter of its customers use at least eight product modules. And with just $4.4 billion in annual recurring revenue, there is still ample room for growth. The company's success has fetched a lofty price-to-sales ratio (P/S) of 28, but it could be worth nibbling on and adding more aggressively on dips. CrowdStrike is on its way to becoming a substantial business.
3. Cloudflare
The internet runs on massive content delivery networks (CDN), and Cloudflare (NET -5.76%) is one of the largest. Beyond powering the internet, it helps secure it by mitigating distributed denial-of-service (DDoS) threats, a type of cyberattack where malicious traffic floods a site, slowing it or crashing it altogether.
The company has over 250,000 paying customers, and its network is a great distribution tool for products and services.
Its global CDN coverage also makes it a player in edge computing, where companies bring computing resources out of centralized cloud centers to localized locations to improve performance and speed. Think upcoming opportunities like autonomous vehicles and robotics, where secure, fast connections will be crucial for the technology to work at scale.
4. SentinelOne
Security technology often flags potential threats that a human analyst then reviews and assesses. SentinelOne (S -0.25%) uses AI to detect and deter cyberthreats autonomously. As a direct competitor to CrowdStrike, it also specializes in endpoint security and has received praise for its high-level technology capabilities.
SentinelOne is smaller than its archrival and isn't yet profitable. However, it benefits from the same big-picture growth trends as the others on this list, and its P/S of 6.7 makes it arguably the bargain among this group. Sometimes, you don't need to be the biggest to be successful. The stock could have tremendous long-term upside from here.
5. Microsoft
Cybersecurity isn't among the things investors associate with Microsoft (MSFT 1.59%), but make no mistake, the technology giant is a colossal presence in the industry. It builds security products and services into its Windows operating software, protecting millions of Windows computers and devices worldwide.
Microsoft is involved with various technology end markets, so this is far more than a cybersecurity investment. The company's exposure to AI, cloud computing, and enterprise software -- as well as Windows and Microsoft 365 productivity software -- makes it a well-rounded bet on the broader technology sector. That's worth holding as an anchor for a growth-focused portfolio.