Can be Linux be infected with a PDF file?

Hello Friends

According with your experience, considering:

  • If a PDF file is infected by a virus/malware/trojan etc and if it is opened in Linux

Question

  • Can be Linux be infected with a PDF file?

Yes, I know that kind of programs are designed to attack Windows but I want to know the probability for Linux

Thanks in advance

2 Likes

I have never seen a virus on any linux system in my 15 years of using and supporting linux systems. As the operating systems are totally different I would say no chance of transfer from one to another.

Is a good starting point to check a file.

3 Likes

According to my searches, the theoretical answer may be yes.
PDF’s theoretically can contain java scripts.
And if there is a malicious one, the possibility of infecting depends on wether it is executed…
AFAIK Atril doesn’t run embedded javascripts, I beleive the same goes to Evince.
(Double check please to be sure!).
I’m not sure about Okular in KDE, as it seemed to have js support.
I think pdf viewer inside a browser has the attack surface, so a browser may get infected even in Linux.
I hate pdf’s displayed by browser, so I disable it always, rather lik to download pdfs and read via Atril. Not because of security concerns, but I find Atril way much more comfortable for pdf reading than Chromiums pdf reader :wink:

3 Likes

I thought browsers used whatever pdf reader you had installed… looks like I was misled there.? Maybe you can set the browser to use an external reader. ?

I suppose , if one had the browser in firejail, reading a pdf would be safe?

2 Likes

I have Chromium as default browser, as I like its better performance ove Firefox.
I have set it to “download pdfs” instead of “open pdfs in Chromium”.
So when I click on a link to pdf, it downloads and saves, and that wii be opened by XReader (Cinnamon equivalent of Atril/Evince) on my computer.
That’s more “natural” to me than showing a pdf in a browser tab.

4 Likes

Think this was your original question ?

It also makes a lot of sense for a browser team to use an existing pdf reader rather than attempt to write their own reader.

2 Likes

Huge thanks to all for the replies

Paul

I have never seen a virus on any linux system in my 15 years of using and supporting linux systems. As the operating systems are totally different I would say no chance of transfer from one to another.

Even with that … is important always be careful

Thanks again for the link suggestion

Think this was your original question ?

Related yes

Laszlo

According to my searches, the theoretical answer may be yes.

Has sense, but with a minor risk

PDF’s theoretically can contain java scripts

I didn’t know that … I am going to create other post if is possible use a tool (or command) in Linux to detect if a pdf file contains JS … wondered why is need it JS … I am going to do a research about that too

And if there is a malicious one, the possibility of infecting depends on wether it is executed…
AFAIK Atril doesn’t run embedded javascripts, I beleive the same goes to Evince.
(Double check please to be sure!).

Do you mean check with Atril and Evince?

I’m not sure about Okular in KDE, as it seemed to have js support.

Okular was mentioned in other post

I think pdf viewer inside a browser has the attack surface, so a browser may get infected even in Linux.

Understood. It even if JS is disabled in the Web Browser itself?

I hate pdf’s displayed by browser, so I disable it always, rather lik to download pdfs and read via Atril. Not because of security concerns, but I find Atril way much more comfortable for pdf reading than Chromiums pdf reader

I only open a pdf file in a web browser to see technical specs of something, laptop, ram etc … years ago to open and read an official documentation such as Spring Framework.

In what OS you use atril? It is for Mate Desktop

Neville

I thought browsers used whatever pdf reader you had installed… looks like I was misled there.? Maybe you can set the browser to use an external reader. ?

Good point, because I always had installed Adobe Reader on Windows I assumed the Web Browser associates that tool by default (with a previous detection)

I suppose , if one had the browser in firejail, reading a pdf would be safe?

Other good point too

1 Like