Skip to content

Is a Password-Protected PDF Attachment Safe to Open?

  • pdf
  • phishing
  • security
  • protect pdf

A password-protected PDF attachment is not dangerous because of the password, but the password stops your email scanner from looking inside. In current phishing campaigns the password sits in the email body, and the PDF links to a page asking you to enter a code on Microsoft's real sign-in site. Verify the sender through another channel before opening it.

Why are phishing emails sending password-protected PDFs?

Email security filters open attachments before they reach your inbox and look for malicious links, scripts and known lures. An encrypted PDF cannot be read without its password, so the filter sees a locked file and usually lets it through. The attacker then puts the password in the message itself, so the only party who can open the file is you.

Security researchers at ANY.RUN described this pattern in an analysis of a phishing kit called SkyW4lker, published on 27 October 2026. The kit sends password-protected PDF, DOCX and XLSX files dressed up as contracts, invoices, commercial offers or confidential documents, with the password given in the email body. ANY.RUN says activity rose from 20 sandbox analyses in June 2026 to 200 in September, and Cybersecurity News reported on 4 November 2026 that the campaign was expanding against US companies.

How does the attack work once I open the PDF?

The PDF itself usually contains no exploit. It contains a link, and the link starts a chain of pages designed to look routine and to hide from automated scanners.

  1. You open the attachment with the password from the email.
  2. The document shows a "view document" or "access file" link.
  3. The link leads to a CAPTCHA page, sometimes after a lure page hosted on a legitimate service such as Google Sites, Miro or Zoom.
  4. A final page gives you a short code and asks you to enter it on Microsoft's genuine device sign-in page.
  5. When you enter the code and approve the sign-in, Microsoft issues access tokens to the attacker's session, not to you.

At no point do you type your password into a fake page. That is why the usual advice to check the address bar does not help here: the sign-in page really is Microsoft's.

What is device code phishing?

Device code flow is a legitimate Microsoft sign-in method for devices without a keyboard, such as conference-room screens or digital signage. The device shows a code, and you type that code on another device where you are already signed in. Microsoft's own documentation calls device code flow "a high-risk authentication method that can be part of a phishing attack" and recommends blocking it wherever possible.

In a phishing attack, the "device" is the attacker. Entering their code tells Microsoft that you want to sign that device into your account. Because you complete the sign-in yourself, your multi-factor prompt is approved by you as well.

How do I tell a genuine protected PDF from a phishing one?

Plenty of legitimate senders protect PDFs: banks, payroll providers, accountants and law firms often do. The difference is in how the password reaches you and what the document asks you to do.

SignalGenuine protected PDFLikely phishing
Where the password isAgreed in advance, or sent by text, phone or a separate messageIn the same email as the attachment
What the document containsThe actual statement, contract or reportA short page with a single "view" or "access" link
What it asks you to doRead, sign or return the documentPass a CAPTCHA, then enter a code on a sign-in page
SenderSomeone you expected to hear fromAn unknown contact, or a known contact with an unusual request
UrgencyNormal business paceDeadlines, legal notices or payment pressure

One signal on its own proves little. A password in the same email plus a document that only contains a link is enough reason to stop and check.

What should I do if I receive one?

Treat the attachment as unverified until you confirm it with the sender through a channel you already trust. Do not reply to the email to ask, because the reply goes to whoever sent it.

  1. Look up the sender's phone number or address yourself, not from the email, and ask whether they sent the file.
  2. If your organisation has a phishing report button or a security mailbox, report the message there.
  3. Never enter a code on a Microsoft sign-in page unless you started that sign-in yourself on a TV, console or shared device in front of you.
  4. If you already entered a code, tell your IT or security team straight away so they can revoke your sessions and tokens.

ANY.RUN and Microsoft both point administrators to the same control: review where device code sign-in is actually needed and block it through Microsoft Entra Conditional Access everywhere else. Microsoft suggests running such a policy in report-only mode first, or filtering sign-in logs by authentication protocol, to see who uses the flow today.

How do I read a protected PDF I know is genuine?

Once the sender has confirmed the file, you can work with it normally. If you need to forward it, archive it or let your own antivirus scan it, removing the password makes that possible. Unlock PDF removes a password you already know, and it runs in your browser without uploading the file.

If you only need the wording, for example to paste figures into a report, PDF to Text pulls out the text so you can read it without clicking anything in the document. Neither step makes an unverified file safe; they are for documents whose sender you have already confirmed.

How should I send a password-protected PDF without looking like a scam?

If you protect PDFs yourself, the safest habit is also the one that keeps you from resembling a phishing email. Send the password through a different channel from the file, such as a text message or a phone call, or agree a standing password with the recipient in advance.

Keep the document itself useful: put the real content in the file rather than a link to it. You can add an AES-256 open password with Protect PDF on ilovspdfs, which encrypts the file in your browser, then share the password separately.

Are PDFs themselves becoming more dangerous?

Not as a format. Barracuda's 2026 Email Threats Report, based on data gathered in January 2026, found that PDFs are the most commonly shared attachment type and that only 0.15% of the PDFs it analysed were malicious. The risk is concentrated in what malicious PDFs point to: the same report found that 70% of malicious PDFs contained QR codes leading to phishing sites.

That matches the SkyW4lker pattern. The file is a wrapper, and the attack happens on the pages it sends you to. A QR code, a link and a sign-in code all ask you to leave the document and act somewhere else.

Key facts

  • ANY.RUN published its analysis of the SkyW4lker phishing kit on 27 October 2026, tracking activity from June 2026 onward.
  • SkyW4lker sends password-protected PDF, DOCX and XLSX attachments with the password in the email body, so automated scanners cannot inspect the file.
  • ANY.RUN counted 20 SkyW4lker sandbox analyses in June 2026 and 200 in September 2026.
  • Microsoft calls device code flow a high-risk authentication method and recommends blocking it wherever possible through Entra Conditional Access.
  • Barracuda found that 0.15% of PDFs it analysed were malicious, and 70% of malicious PDFs contained QR codes leading to phishing sites.

Frequently asked questions

Can a password-protected PDF contain a virus?

A protected PDF can contain anything an ordinary PDF can, including malicious links, and the encryption hides that content from scanners until it is opened. In the campaigns described here, the file carries a link rather than an exploit, and the damage happens when you follow it. Keep your PDF reader updated either way.

Why did my email scanner not flag the attachment?

Most scanners cannot decrypt a PDF without its password, so they cannot read the links inside it. Attackers rely on this, which is why they put the password in the email. A clean scan result on an encrypted attachment means the scanner could not look, not that the file is safe.

I entered a code on Microsoft's sign-in page. What now?

Contact your IT or security team immediately and tell them the time and the email involved. They can revoke your sessions and refresh tokens and check your mailbox, OneDrive and Teams for activity. Changing your password alone may not end the attacker's access, because the attack uses tokens rather than your password.

Is it safe to remove the password from a suspicious PDF to check it?

Only do this after the sender has confirmed the file through a separate channel. Removing the password lets your own antivirus scan the file, but it does not neutralise links inside it. If you have not confirmed the sender, report the email instead.

Does this only affect Microsoft 365 users?

SkyW4lker targets Microsoft 365 accounts, and ANY.RUN says submissions came mostly from technology, manufacturing and government organisations, chiefly in the United States, India, Canada and the United Kingdom. The basic trick of hiding a link inside an encrypted attachment works against any email service. The advice to verify the sender applies to everyone.

Sources

Back to blog