Skip to content

    What is a malicious attachment?

    A malicious attachment is a file sent by email that carries code designed to infect the computer, steal data or open a door for an attacker. It matters because opening a single file can be enough to start an infection or a ransomware attack.

    Key points

    • Dangerous files include executables, scripts, documents with macros and shortcuts.
    • Attackers hide them in compressed or password-protected archives to avoid scanning.
    • A double extension such as invoice.pdf.exe tries to disguise an executable as a document.
    • Blocking by file type plus antivirus on every attachment removes most of the risk.

    Which file types are most dangerous?

    Executables and scripts are the most direct: .exe, .scr, .js, .vbs, .bat and .ps1 run code as soon as they are opened. Text and spreadsheet documents with macros ask the user to enable content and then run code. Shortcuts and disk images are also used because some systems open them without a warning.

    How do attackers get attachments past filters?

    They compress the file, sometimes several times, or protect the archive with a password written in the body of the message so the scanner cannot open it. They also rename extensions and change the content often so no signature matches yet.

    That is why blocking by file type matters as much as the antivirus itself: an executable has no business arriving in a normal mailbox.

    What should a user do with an unexpected attachment?

    Not open it. Confirm with the sender through another channel whether the file was really sent, especially when the message is urgent or the attachment is a compressed archive or a document that asks to enable editing.

    MIME header of a disguised attachment

    Content-Type: application/octet-stream; name="invoice.pdf.exe"
    Content-Disposition: attachment; filename="invoice.pdf.exe"
    Content-Transfer-Encoding: base64

    How AHSU 360 handles this

    The AHSU 360 scans every attachment with antivirus and blocks attachments by file type before the message reaches the mail server. Suspicious messages go to quarantine with an email summary, so the user can release a legitimate one without help.

    Questions and answers

    Is a PDF attachment safe?
    Not always. A PDF can carry links to fake pages or embedded content, though it is less risky than an executable. The sender and the context matter as much as the format.
    Why was a legitimate attachment blocked?
    Policies that block executables or password-protected archives also catch legitimate files. The safe path is sending these files another way, such as a link to a trusted shared folder.

    Related terms

    Reviewed 22/11/2026 · Email and email security for businesses since 2001.