Americans were stunned when Equifax (EFX 2.53%), one of the nation's three largest credit reporting firms, disclosed that a data breach had potentially exposed the personal records of 143 million consumers.

Many media outlets called the data breach the worst ever, but that was in reference to the sensitivity of the data (full names, Social Security numbers, birth dates, and addresses), not the actual number of people affected.

By that measure, the Equifax hack comes in sixth -- behind Yahoo!'s internet business (now owned by Verizon Communications), MySpace, the adult social network FriendFinder, LinkedIn, and eBay.

A chart of the six most disastrous data breaches to date.

Data sources: Company disclosures, industry reports. Chart by author.

These figures remind us that many companies are ill-equipped to deal with data breaches. As a result, research firm Gartner expects worldwide cybersecurity spending to rise from $90 billion this year to $113 billion in 2020.

Symantec, for example, recently reported that its identity theft protection solution LifeLock saw 10 times as many customer enrollments per hour in the week after the incident. Investors should keep an eye out for lucrative investments across the cybersecurity sector.