To check an email attachment for a virus, first confirm the sender really meant to send it, then save the file (without opening it) and scan it with a malware scanner such as Threat Eraser. Check the real file extension too: an "invoice" that ends in .exe, .js, .iso or .lnk is not a document. If you have any doubt, delete it and ask the sender through a different channel.
Email remains one of the main ways malware is delivered. The FBI's 2025 Internet Crime Report lists phishing as the most-reported type of complaint, with 191,561 reports, and many of those messages carry harmful attachments or links. A two-minute check is well worth it.
Step 1: Judge the email before the attachment
Most dangerous attachments can be spotted from the message around them. Be suspicious if:
- You were not expecting a file from this person or company.
- The sender's address does not match the name shown, or uses a free email service for a "company".
- The message is urgent: an overdue invoice, a missed delivery, a legal notice, a voicemail or a payslip.
- The wording is generic ("Dear customer") or unusually brief ("see attached").
- It asks you to "enable editing", "enable content" or enter a password to open the file.
- It is a reply in an old thread that suddenly includes an unrelated attachment. Hijacked email threads are common.
If something feels wrong, contact the sender using a phone number or address you already have, not the details in the email.
Step 2: Check what type of file it really is
In most email programs you can hover over or right-click the attachment to see its full name. On your PC, turn on file extensions in File Explorer (View > Show > File name extensions on Windows 11, or tick File name extensions on the View tab in Windows 10).
| Risk level | Extensions | Advice |
|---|---|---|
| High | .exe, .scr, .js, .vbs, .hta, .lnk, .bat, .ps1 | Never open from an email. Legitimate senders almost never send these. |
| High | .iso, .img, password-protected .zip or .rar | Often used to smuggle programs past filters. Scan and verify first. |
| Medium | .docm, .xlsm, older .doc and .xls | Can contain macros. Never click "Enable Content" on an unexpected file. |
| Medium | .html, .htm | Often fake login pages. Do not enter passwords. |
| Lower | .pdf, .docx, .xlsx, .jpg, .png | Safer, but can still contain malicious links. Scan if unexpected. |
Watch out for double extensions like remittance.pdf.exe. See our guide to double-extension files for how this trick works.
Step 3: Save and scan the attachment
- In Outlook, Mail or your webmail, choose Save as or Download rather than opening the file. Save it to your Downloads folder.
- Open File Explorer, go to Downloads, right-click the file and choose Scan with Microsoft Defender (on Windows 11, under Show more options).
- If it is a ZIP file, scan the ZIP, extract it, and then scan the extracted files.
- Or drag it onto the Threat Eraser window for a full check (see below). If you think a detection is wrong, read what to do about a false positive.
Step 4: Open it safely
- Keep Office's Protected View on. Files from the internet open read-only. Do not click Enable Editing or Enable Content unless you trust the sender and expected the file.
- Preview without downloading where your webmail offers it, for PDFs and images.
- Never enter your password into a page that opens from an attachment. Real services do not ask you to log in to view a document.
If you already opened a suspicious attachment
- Disconnect from the internet (turn off Wi-Fi or unplug the cable).
- Run a Threat Eraser Full Scan and quarantine anything it finds. For anything deeply hidden, also run a Microsoft Defender Offline scan from Windows Security > Virus & threat protection > Scan options.
- If you entered a password, change it from another device and turn on two-step verification.
- For businesses, tell whoever manages your IT straight away, as a single opened attachment can spread across a network.
Our guide on what to do if you clicked a phishing link covers the next steps in more detail.
How Threat Eraser helps check attachments
After saving an attachment, drag it onto the Threat Eraser window or use File > Custom Scan…. It checks the file against virus signatures, malware detection rules, and known malware hashes, and its categories include phishing documents, trojans and spyware/infostealers. It scans inside ZIP archives, including nested ones, and flags double extensions and hidden right-to-left characters in file names. Because the file is scanned on your PC and never uploaded, it is safe to check confidential business attachments.
With a license, Real-Time Watch scans files automatically a moment after they are saved to Downloads, Desktop or Documents, and detections can be quarantined so they cannot run, then erased for good. You can also add Scan with Threat Eraser to the Explorer right-click menu, so checking a saved attachment takes one click.
Find out more about Threat Eraser for Windows 10 and 11.
Frequently asked questions
Can I get a virus just by opening an email?
Simply reading an email in an up-to-date mail program is generally safe. The risk comes from opening attachments, enabling macros or clicking links.
Is it safe to preview an attachment in Outlook?
Previews are safer than opening, but it is still best to scan unexpected attachments and avoid enabling content.
Why would a sender password-protect a ZIP?
Legitimate senders sometimes do it for privacy, but criminals also use it to stop email filters scanning the contents, so confirm with the sender first.
