How do you get a computer virus?

Join Our Community of Science Lovers!

In particular, this reader wanted to know whether it is possible to get a computer virus just by reading a "regular" e-mail or if it is necessary to download a file in order to get one.

Geoff Kuenning, an assistant professor of computer science at Harvey Mudd College, explains:

You can absolutely get a virus from opening just a "regular" e-mail--if your mail reader supports attachments.


On supporting science journalism

If you're enjoying this article, consider supporting our award-winning journalism by subscribing. By purchasing a subscription you are helping to ensure the future of impactful stories about the discoveries and ideas shaping our world today.


Attachments are an extension to old-fashioned plain-text e-mail. The idea is to allow all sorts of files to be transferred without going through the hassle of downloading them separately. In the bad old (or good old) days, computer users had to send "pointers" to things. For example, you might tell somebody to look at a certain Web page to see a funny picture. Attachments save us from that nuisance.

If your mail reader supports attachments, the downloading is done automatically. Depending on your reader and your preferences, you may have to explicitly ask that an attachment be decoded and opened; this method is inconvenient but safer. Some mail readers will decode and even execute attached files as soon as you open the message, or even when you simply list the messages that are in your inbox. Microsoft Outlook is notorious for this kind of behavior. If the message is malicious, you will find your computer infected by a virus.

You can reduce the chance of this happening by setting your mail reader so that it never opens attachments automatically, and by never opening an attachment that you weren't expecting to get. Nowadays, it isn't even safe to open attachments from your best friend, because some viruses masquerade as people you know. You might think you are going to see Fred's pictures of his party, and actually wind up infecting your computer.

Answer originally posted September 9, 2002.

It’s Time to Stand Up for Science

If you enjoyed this article, I’d like to ask for your support. Scientific American has served as an advocate for science and industry for 180 years, and right now may be the most critical moment in that two-century history.

I’ve been a Scientific American subscriber since I was 12 years old, and it helped shape the way I look at the world. SciAm always educates and delights me, and inspires a sense of awe for our vast, beautiful universe. I hope it does that for you, too.

If you subscribe to Scientific American, you help ensure that our coverage is centered on meaningful research and discovery; that we have the resources to report on the decisions that threaten labs across the U.S.; and that we support both budding and working scientists at a time when the value of science itself too often goes unrecognized.

In return, you get essential news, captivating podcasts, brilliant infographics, can't-miss newsletters, must-watch videos, challenging games, and the science world's best writing and reporting. You can even gift someone a subscription.

There has never been a more important time for us to stand up and show why science matters. I hope you’ll support us in that mission.

Thank you,

David M. Ewalt, Editor in Chief, Scientific American

Subscribe