In a challenge to the prevailing belief that Apple computers are immune to the sort of cyberattacks that plague Windows-based machines, research firm Sophos has released a study claiming that 1 in 5 Macs has malware.

According to Todd Wasserman of Mashable, the report, released in April 2012, is based on a "100,000-strong snapshot" of the millions of Macs that downloaded Sophos's free Mac antivirus software. The study found that 20 percent of Macs were carrying one or more instances of Windows malware.

Such malware doesn't cause symptoms unless the Mac owners run Windows on their machines, but it can be spread to others.

However, this doesn't appear to be solely a Windows-based problem. The report also found that 2.7 percent of Macs were infected with Mac OS malware. The majority of such Mac OS malware is composed of fake antivirus attacks, like the recent Flashback botnet. Mac owners can contract such malware by downloading e-mail attachments, visiting rogue websites and unknowingly installing it via their USB drive.

To avoid downloading such malware, Sophos recommends running an antivirus program and keeping it up to date, exercising caution about which links you click on, keeping software patches current and keeping an eye out for e-mail-based scams.