Can PDFs have viruses?

Yes, they can. Because PDFs are one of the most universally used file types, hackers and bad actors can find ways to use these normally harmless files — just like dot-com files, JPGs, Gmail, and Bitcoin — to create security threats via malicious code.

Understanding how PDFs can contain viruses.

Security threats come in a few main varieties. Viruses are programs that might do nothing or change or delete data. Trojans usually gather data on a user or their computer. Malware is usually designed to harm a machine.

Viruses, Trojans, and malware have many ways of hiding inside a PDF and often show up in email downloads or attachments like eBooks and other documents. They usually come from unknown or unfamiliar senders.

Someone checks a pdf at a kitchen counter

PDFs and viruses.

You can defend yourself against viruses and other attacks through best practices, good judgment, and constant vigilance. Protect yourself by learning about the most common issues, including:

JavaScript

JavaScript is a programming language that supports functionality on the web. Most websites and web browsers have some kind of JavaScript element that’s used to execute code. PDFs, like other file formats, can have hidden JavaScript code that might exploit vulnerabilities in a PDF.

System commands

Opening a malicious PDF can launch malware that will start up whatever process the hacker has in mind. That is, by clicking on and opening a PDF or other file, a user also unknowingly starts up a predator program. Such attacks are technically possible today, but less common.

Hidden objects

Hackers try to circumvent antivirus and anti-malware software. Files and email attachments can have embedded or encrypted objects which prevent detection by cybersecurity measures or users. Usually, these hidden objects are executed when the file that hides them is opened.

How to defend against PDF viruses.

There are many proactive ways to protect against hacking. Effective ways to defend yourself include:

1. Recognizing phishing attempts.

If you get a suspicious email that says it comes from a trustworthy-seeming organization like a financial institution, don’t engage with it. Reach out to that financial institution directly and ask if that email is real. That way, you can stay protected by never engaging with the email in the first place.

It can also be useful to use authentication methods for trusted collaborators and only engage with files that come from trusted sources. Adobe Acrobat Sign includes a feature for identity authentication.


2. Using a trusted PDF reader.

One of the best defenses against PDF viruses is to use trusted software and keep it up to date. There are many PDF viewers, but not all of them are constantly updating to combat bad actors and help protect users. Adobe Acrobat Reader features regular security updates and is the industry standard for viewing and using PDFs.


3. Running regular virus scans.

Most operating systems like Windows and MacOS have built-in antivirus software. Third-party cybersecurity programs are usually redundant, but it’s still a good idea to regularly check your OS antivirus scanner.


A person standing at a kitchen counter eating from a bowl while reading their tablet

How to scan a PDF for viruses.

Checking a PDF for viruses is surprisingly easy, but there are many different ways to go about it. The best thing you can do to avoid problems in the first place is to download files from trusted sources only. But you won’t always know for sure. If you don’t want to risk it, use one of the multiple scanning tools available.

You might choose to purchase full-service antivirus software or take advantage of a free tool that operates automatically or manually. You can check your entire computer, multiple files at once, or separate files one at a time. Before you choose a method, consider which option makes the most sense for how many PDFs you need to check and how often.

Scanning a PDF for viruses on a Mac.

If you are on a Mac operating system, the built-in antivirus technology called XProtect will automatically scan files and block downloads if it finds a threat. However, antivirus software companies argue that with the increased use of Apple technology, this built-in feature may not be able to keep up with advanced threats.

You can purchase antivirus software designed for a macOS from brands like McAfee and Norton, or get free file scanning with software such as Bitdefender, Avira, or Avast. These programs can scan the entire computer or they can target specific files. Each program has a simple step-by-step interface.

To perform a targeted scan with Avast:


1. Open Avast Antivirus.


2. Go to Protection > Virus Scans.


3. Click the Targeted Scan tile.


4. Select the file you want to scan.


5. Click Open.


6. Wait for the progress screen to show that the scan is complete.


7. Move the detected files to quarantine by hovering the cursor and clicking Resolve.


Avira Antivirus has a drag-and-drop feature. To scan a PDF with Avira Antivirus for Mac:


1. Open Avira Antivirus.


2. Click Virus Scans.


3. Drag and drop the file in the Custom Scan tile.


Comodo Antivirus also has a drag-and-drop option. Just follow the instructions in the Quick Start Guide to install the software.

Scanning a PDF for viruses on a PC.

If you are using Windows 10 or 11, you can scan specific files and folders using Windows Security:


1. Right-click the file or folder.


2. Select Scan with Microsoft Defender.


3. Follow the instructions that appear for Scan options.


To automatically detect threats, ensure that Microsoft Defender Antivirus is turned on.

Scanning a PDF for viruses in a hurry.

Many tools work equally well for Mac or PC users. One of the most popular is VirusTotal, which might be the best solution when you’re in a hurry because it doesn’t even require a download or software installation.


1. In your internet browser, go to the VirusTotal website.

The VirusTotal homepage lets you choose a PDF to scan.

2. Select the tab for FILE, URL, or SEARCH. The SEARCH option lets you type in a URL, IP address, domain, or file hash.

On the VirusTotal website, select the FILE, URL, or SEARCH option.

3. Upload a file, copy and paste a URL, or enter your search terms.

On the VirusTotal website, upload a file, copy and paste a URL, or enter your search terms.

4. View results.

The VirusTotal website displays the results of a PDF virus scan.

The tools and steps suggested here are by no means exhaustive. New tools come and go. It’s worth a bit of searching to try new software, read reviews, and discover which methods work best for you. You will be glad you took the time to check a PDF when you discover that you prevented damage from malware or viruses.


PDF documents and phishing.

How do viruses, malware, and other nasty weapons that hackers use actually get on someone’s computer? The answer is a practice called phishing.

Phishing is when hackers make their emails appear as if they come from a familiar brand, a government agency, or other benign source. The victim then downloads a file or goes to a website that they think is from a trusted source, but there’s almost always a tell in phishing emails. Something might be slightly off, or it could come from an address that is clearly not correct.

So, can PDFs have viruses? They can, and they can look like a suspicious message with an attachment about your car insurance, but you don’t actually have a car. If so, you’re almost certainly looking at a message from a hacker who’s trying to dangle bait in front of you.

Stay safe with Adobe Acrobat and security.

Adobe Acrobat and Adobe Document Cloud include security features to make PDFs more secure and reliable.

To tap into additional virus and malware protection, you can:

1. Configure Acrobat not to launch non-PDF attachments with external applications.

Even if you accidentally download a malicious attachment, it’s possible to keep it from launching by default.


2. Adjust or disable JavaScript in Acrobat to further protect against vulnerabilities.

JavaScript code is a common hiding place for viruses. Acrobat allows users to adjust JavaScript behavior so that it executes only within a specific, desired level of security. It is also possible to disable JavaScript altogether, or add restrictions.


3. Use Adobe cloud storage for your PDF storage.

Protect PDFs with secure online storage like Adobe cloud, which uses up-to-date industry-standard security, safeguard documents, and better shield important information from malicious actors.


It will always be possible for PDFs, like any other type of document or bit of code, to carry viruses, malware, or tools for hackers. However, by taking these measures to defend yourself and by relying on proven software, you can make it less probable that any attacks succeed.

Keep exploring

https://main--dc--adobecom.hlx.page/dc-shared/fragments/seo-articles/seo-caas-collection

https://main--dc--adobecom.hlx.page/dc-shared/fragments/seo-articles/acrobat-color-blade