Skip to content
EasyToPaste

The ZIP Password Is in the Same Email. Is It Safe to Open the Files?

No. A password-protected ZIP whose password is written in the email body is how malware gets past a scanner — the lock works against your defences, not for you.

EasyToPaste Team Published 5 min read
  • zip files
  • phishing
  • email
  • explainer

Short answer: no, and the reason is the opposite of what the sentence suggests. A password-protected ZIP whose password is typed into the same email is the standard shape of a malicious attachment, not a careful one. Encryption stops your mail gateway and your antivirus from reading the archive; it does not stop you. The password in the body is there so that the only inspection left is yours.

Two questions are tangled together here, and both answers are no.

If you received it, the lock is a reason for more caution, not less. Nobody scanned that file. A real invoice from a real supplier and a loader delivered by a criminal look exactly the same from the outside, and the password-in-the-body pattern is more characteristic of the second. Confirm the sender over a channel you picked yourself before typing the password anywhere.

If you sent it, the protection is already gone. The archive and the key travelled in one place, so anyone who reaches either mailbox — now, or in the breach that happens in a year — has both.

The fix, in one line: never let the file and its key share a channel. For a ZIP that means choosing AES-256 in the archiver and reading the archive’s passphrase out on a call rather than typing it below the attachment. For a single hand-off it means not building an archive at all: send a one-time encrypted link, where the key lives in the part of the URL after the # and never reaches the server. The mechanics are on How It Works.

Related: are password-protected ZIP files secure? · is a password-protected ZIP encrypted? · how to send a ZIP file securely.

Why the password in the body is the point, not an oversight

Security software judges a file by reading it. A signature match, a static inspection of the code, a sandbox that opens the document and watches what it tries to do — all of them need the bytes. Encrypt the archive and there are no bytes to read, only an opaque blob and a filename.

That is a problem for the defender and a gift to the attacker, and it has been used for years by campaigns that attach an encrypted archive and write the password directly above it. The message often supplies a reason, too: the file is password-protected for your security. It reads as diligence. It functions as an instruction to disable the only control that was still working.

None of this requires a sophisticated attacker. The archive is ordinary, the password is four characters, and the social engineering is a single sentence.

What the “it is locked, so it is safe” claim gets backwards

The claim confuses two different properties.

  • Confidentiality — whether a third party can read the file in transit. A password does help here, within the limits described in are password-protected ZIP files secure?
  • Safety — whether the file is harmful to open. A password says nothing about this whatsoever. It only guarantees that no automated system got a chance to form an opinion.

A locked box is not a safe box. It is an uninspected box, which is worse than an inspected one, and the person who locked it chose to tell you how to open it.

There is also the sender’s half of the confusion. If the password is in the same email, the confidentiality property is gone as well, so the sentence manages to be wrong about both halves at once.

What to do with one you have received

  1. Do not type the password yet. Opening it is the only step that cannot be undone.
  2. Check the sender out of band. Call the number you already hold for them, or message them in an account you set up yourself. Never the number, address or link in the email.
  3. Ask whether the attachment was expected. An unexpected archive from a known contact is the normal appearance of a compromised mailbox.
  4. Hand it to whoever handles this where you work, if that exists. An encrypted archive that nothing scanned is precisely what they want to see.
  5. If you must open it, do it somewhere disposable — a virtual machine or a sandbox, not your working machine.
  6. Treat a request to enable macros or editing, or a prompt for your credentials, as the answer. A document that needs permissions before it shows you anything is not shy, it is waiting.

What to do if you are the sender

The habit worth building is one rule: the file and its key never share a channel.

  • If the recipient needs an archive, choose AES-256 in the archiver rather than the legacy scheme — the difference is explained in AES-256 ZIP vs a one-time link — use a passphrase from a password manager, and read it out on a call. The step-by-step version is can I password-protect a ZIP folder?
  • If what you are sending is a credential rather than a document, do not send it at all where you can grant access instead. The options are ranked in how to send passwords securely.
  • If you want nothing left behind, use a one-time link. The key sits in the fragment after the #, which browsers do not transmit, so the server only ever holds ciphertext; the record is deleted when the secret is read or when it expires; and an uploaded file’s encrypted object is cleared by a storage lifecycle rule about 38 days after it was created, unreadable throughout because the key was never ours. See Security.
  • And if the mistake has already happened, what to do after pasting a password into Slack or email is the cleanup order.

The short version

  • A password-protected ZIP with the password in the email body is the normal delivery shape for malware, because encryption blinds the scanner and not the reader.
  • “Locked” means uninspected. It is not a safety property.
  • As the sender, putting both in one message cancels the protection you thought you had added.
  • Verify the sender out of band before opening, and open somewhere disposable if you must.
  • Send the file and its key by different routes, or use a link whose key never reaches a server.

Want to see the alternative? Create a secret with a test file and open the link in another browser window to see what your recipient would get.

Common questions

The password is in the same email as the ZIP. Is it safe to open the files?
No. Two different questions hide inside that sentence and both answers are no. As a recipient, the encryption is a reason to be careful rather than a reason to relax: a mail gateway and an endpoint scanner cannot read inside an encrypted archive, so putting the password in the body is how a malicious attachment is delivered past them. As a sender, the protection has been cancelled, because whoever can read the email has the file and the password together.
Why do attackers put the ZIP password in the email body?
Because it defeats the scanner without defeating the victim. Security software has to be able to read a file to judge it, and an encrypted archive is unreadable until someone supplies the password. Writing the password in plain sight costs the attacker nothing, since the target is a person who will type it in, and it buys the attachment a clean trip through the filters that would otherwise have stopped it.
Does antivirus or a mail gateway scan inside a password-protected ZIP?
Not by default, and often not at all. The contents are encrypted, so there is nothing for a signature or a sandbox to look at until the archive is opened with the password. Some gateways now try passwords found in the message body, and the stricter ones quarantine encrypted archives outright for exactly this reason, but you cannot assume either was in the path your message took.
I was told the files are locked, so opening them is safe. Is that true?
It is backwards. The lock says nothing about what is inside the archive; it only means nobody else has inspected it. A legitimate sender and an attacker produce an identical-looking encrypted attachment, and the password-in-the-body pattern is more characteristic of the second. Verify the sender through a channel you chose, such as a phone number you already hold rather than one printed in the email, before you open anything.
I sent a ZIP and its password in one email. What should I do now?
Treat the contents as exposed rather than protected, because for anyone with access to either mailbox they are. Rotate whatever can be rotated: passwords, keys, tokens. Documents cannot be rotated, so what is left is deleting the copies you control and knowing the exposure exists. Then send the replacement a different way, with the file and its key on separate routes, or with a link whose key is not in the message at all.

All articles