Safe and Risky Email Attachments: Which File Types to Trust

By J. Mesa

Email remains the most common way for malware to reach a business, and attachments are the usual delivery vehicle. A file that looks like an invoice, a shipping notice, or a resume can carry code that infects a computer when opened. Knowing which types deserve extra care, and what to do before you click, prevents many infections.

Why attachments are dangerous

Attackers rely on curiosity and routine. An accountant opens invoices all day, and a recruiter opens resumes. A well-timed message with a plausible file gets opened. Once opened, the file can run code, trigger a download, or ask you to enable macros or editing, which gives the malware permission to work. This is a leading entry route for ransomware.

File types to treat with suspicion

  • Executables and installers: .exe, .msi, .scr, .bat, .cmd, .com
  • Scripts: .js, .vbs, .ps1, .wsf, .hta
  • Shortcuts and system files: .lnk, .iso, .img
  • Archives: .zip, .rar, .7z, which often hide a harmful file inside or hold a password to avoid scanning
  • Office documents with macros: .docm, .xlsm, .pptm, and older .doc and .xls files that request macros
  • Disk images and unusual formats: .iso, .img, and .one in some cases
  • PDFs that ask you to click a link or enter a password. A PDF can be harmless in itself but lead to a fake sign-in page.
  • HTML attachments, which can display a fake login form directly in your browser

Double extensions, such as invoice.pdf.exe, are a trick to disguise a program as a document. Turn on the option that shows file extensions in your operating system.

Types that are usually safer

Plain text, images such as .jpg and .png, and files in the cloud viewer are lower risk, but no type is fully safe. Attackers sometimes embed harmful content in images and documents that exploit unpatched software, which is why updates matter.

Questions to ask before opening

  • Did I expect this message and this file?
  • Do I know the sender, and does the address match exactly?
  • Does the message create urgency or fear?
  • Does the file type match the description? An invoice should not be a .zip with a password.
  • Does it ask me to enable macros or editing?
  • Can I confirm with the sender through another channel, such as a phone call?

Our guide on how to spot a phishing email covers the warning signs in more detail.

Safer ways to handle attachments

  • Preview in the browser or cloud viewer instead of downloading and opening locally.
  • Ask the sender for a link to a shared file through a service you already use.
  • Scan the file with up-to-date endpoint protection before opening.
  • Keep macros off by default. Microsoft Office blocks macros in files from the internet by default, and you should keep that setting.
  • Open risky files in a sandbox or a separate device if you must handle them.
  • Never enable content because a document says it is needed to view the file.

Business settings that help

  • Filter email at the gateway to block dangerous file types and quarantine suspicious messages.
  • Block executable and script attachments outright.
  • Mark external email with a banner.
  • Turn on link and attachment scanning in your mail platform. See our Microsoft 365 security guide.
  • Run standard user accounts so a stray program cannot make system changes. See least privilege.
  • Protect your domain so criminals cannot easily spoof your own address, as explained in our email authentication guide.
  • Train staff with simulated attachments and brief reminders, as in our awareness program guide.

If someone opened a bad attachment

  • Disconnect the device from the network.
  • Tell IT or your provider immediately.
  • Do not log in to important accounts from that machine.
  • Change passwords from a clean device.
  • Scan the system and check for new accounts or rules.
  • Follow your incident steps, as outlined in incident versus breach.

How attackers disguise attachments

Criminals work hard to make a harmful file look ordinary. Learn their favorite tricks.

  • Double extensions. A file named statement.pdf.exe looks like a document, but the real type is at the end. Show file extensions in your settings to catch this.
  • Password-protected archives. The message includes a password, such as in the body of the email, so that security tools cannot scan the contents.
  • Macro-enabled Office files. The document asks you to click “Enable Content” to see the data. Doing so lets the embedded code run.
  • Links inside attachments. A PDF or document contains a button that leads to a fake sign-in page, so the attachment itself looks clean.
  • HTML attachments that open a login form in your browser, with the address of the sender’s choosing.
  • Image and PDF lures. A picture of a blurred document with a message to click for the full version.
  • Reply-chain hijacking. The attacker sends a malicious file in an existing conversation that they stole from another victim, so the message arrives with familiar context.

The last method is hard to spot, which is why confirmation outside the email thread helps. Call the sender if a familiar contact suddenly sends an unexpected file.

How to handle common business attachments

  • Invoices and statements. Check that you expected the invoice, and compare the details to your records. Ask the vendor for a link to their portal if you can.
  • Resumes. Recruiters and managers open them from strangers. Use a preview in the browser or a cloud viewer, and avoid enabling macros.
  • Shipping notices. Go to the carrier’s site and enter the tracking number yourself.
  • Scanned documents from printers. Copiers send these automatically. A message claiming to be from a printer you do not own is suspicious.
  • Shared file notifications. Check that the link goes to the real file-sharing domain, not a lookalike.

Settings to review in your mail system

A few administrator settings reduce risk without disrupting work.

  • Block executable file types and script files at the gateway.
  • Quarantine password-protected archives from outside senders, or require review.
  • Use link rewriting and attachment sandboxing if your plan includes them.
  • Tag messages from external senders with a clear banner.
  • Warn users when a message comes from a sender they have never contacted before.
  • Limit automatic preview of attachments in the email client.

If you are not sure which options your subscription includes, check the documentation or ask your provider. Our post on securing Microsoft 365 shows where several of these settings live.

What staff should do when they are unsure

  • Do not open the file.
  • Forward the message as an attachment to your security contact, or use the reporting button.
  • Wait for an answer.
  • Delete the message after the review, not before.

A reply within an hour keeps people from taking the risk. Thank the person who reported, even when the message turns out to be fine. Their habit protects everyone, and it reflects the culture we describe in our post on awareness training that works.

The bottom line

Treat every unexpected attachment as a question. Confirm the sender, check the type, and keep macros off. A thirty-second pause blocks a large share of email attacks.

Related reading: Halloween and Fall Scams: What to Watch For Before the Holidays Begin, How to Spot a Phishing Email: 9 Warning Signs, Antivirus vs. EDR: What Is the Difference, and Which Does Your Business Need?, How to Secure Microsoft 365 for a Small Business: 12 Settings to Change.