That can happen in a file manager, as well. So, the risk is the same. Itâs uncommon for users to edit an executable, as it is supposed to be run and not edited. So, the two most common actions are either editing/viewing the file content or running it as an executable (script).
If you download a PDF file from an untrusted source and then open it, itâs just as risky, as you opening it as an attachment, made available through an e-mail sent to you by an untrusted source. Essentially, when you open it as an attachment, it gets downloaded to your PC, anyway, so itâs the same. The difference is, that it seems like itâs never downloaded. In reality, all directly opened files are downloaded, too. But they are downloaded into a temporary folder, where it gets deleted on the next temp
cleanup.
The only difference that matters between opening it as an e-mail attachment and opening it on your own file system with a file manager is the way the file gets treated. If you open it in your browser, because you have your e-mail inbox opened in your browser, then the PDF will most likely open within the browser. However, opening it with a file manager, most likely wonât open it in the browser, but in an app. Itâs more likely that the browser is vulnerable, as Chrome, Firefox etc. is so popular, so itâs a welcome target for paid hackers. However, no hacker will even touch some open source unimportant PDF app, because literally nobody cares. It just wouldnât make any economic sense to pay a hacker to use an exploit on such an unimportant and unpopular PDF program.
There is another edge case, where files may not be downloaded to the computer, at all. For example, opening an Excel sheet online may result in it being opened online only, through a Google service. This would mean, you avoid the risk of running a malicious program on your computer, however on the other hand you are handing over possible private data to the Data Kraken, which feeds off our digital souls.
Depends on how the user achieves it. If you explicitly open it in a text editor with the Open with⌠button, then it should be safe, except that button has an exploit available. However, if you double click it, you can never be absolutely sure, it will open only for editing purposes, as the default behaviour might differ between OS distributions, and you might expect the wrong behaviour.
Additionally, just reading a file is not all the time absolutely safe. Sure, opening a text file canât do much harm, but opening a Word document with macros enabled may result in the same behaviour, as if you ran a malicious program.
Thatâs also the most common trick used in e-mail attachments. Most people just want to read the Word document, then open it, enable Macros and the damage is done. Macros in Word documents coming from untrusted sources are very dangerous, if you are a target who has anything valuable to offer.