
"Your invoice is attached", "Your delivery details", "Quotation file"... a large share of malware and ransomware enters computers through an innocent-looking email attachment like these. When the attachment is opened, or a button inside it is clicked, the malicious code runs. The good news is that a few simple checks prevent most of this risk.
Risky file types
| File type | Risk | Why |
|---|---|---|
| .exe, .scr, .bat, .js, .vbs | Very high | Runs a program directly |
| .docm, .xlsm | High | Can contain macros |
| .zip, .rar, .7z (encrypted) | High | The password stops scanners seeing inside |
| .iso, .img | High | Can hide executable files |
| .html, .htm | Medium-high | Can open a fake sign-in page |
| .pdf, .docx, .xlsx | Low-medium | Links inside can be dangerous |
Warning signs
- An invoice, fine or delivery notice you didn't expect
- Pressure to pay or act urgently
- A sender address that doesn't match the name
- A message saying "enable content to view" or "turn on macros"
- An archive password sent along with the attachment
For more on phishing see our phishing guide and spam email guide.
- 1
Ask whether you were expecting it
- 2
Check the sender's real address
- 3
If unsure, verify with the sender by phone
- 4
Scan the attachment with up-to-date antivirus first
- 5
Refuse requests to enable macros or content
Safe habits
- Show file extensions: to spot hidden extensions like "invoice.pdf.exe" on Windows.
- Prefer preview: the preview feature of cloud email services reduces risk.
- Keep your system updated: see our software updates guide.
- Use antivirus: see our Windows Defender guide.
- Keep backups: the strongest defense against ransomware; see our 3-2-1 backup and ransomware guides.
If you opened it by mistake
- Disconnect the device from the network.
- Run an antivirus scan.
- On a work device, tell the IT team immediately.
- Change your passwords from another device in case of suspicious sign-ins.
Our incident response plan guide gives detailed steps for workplaces.
Common mistakes
- Treating every attachment from a familiar sender as safe. Accounts can be taken over.
- Turning on macros "so the document displays properly".
- Leaving extensions hidden.
- Not reporting the incident out of embarrassment.
Frequently asked questions
Is opening a PDF safe? Usually yes, but watch out for links and form requests inside it.
Doesn't my email service scan attachments? Most do, but they can't always catch encrypted archives and new threats.
Summary
Malicious attachments remain one of the most common attack routes. Be suspicious of unexpected attachments, don't enable macros, keep your system updated and back up regularly.
Serkan Akyürek is the founder and author of toolrota; he writes step-by-step guides on Excel, AI, the cloud, personal finance and digital security.