Information Security Stack Exchange is a question and answer site for information security professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I get files with random extensions sometimes in order to bypass corporate firewalls. Usually I would just ask the other party what it is that I just received. Other times I get curious and open the file with notepad. Sometimes the file would have a plain text header which describes how to open it. Could this potentially cause "issues" if I didn't do it in a sandbox?

share|improve this question
To see what to open such a file with, I use the file command (You know how many people believe they can turn a Word doc file to pdf by renaming it?) – Hagen von Eitzen Jan 3 '14 at 22:49
up vote 3 down vote accepted

In theory, someone might be able to find a buffer overflow in notepad that could cause issues when opening a file, but the chances are pretty minimal and the file would have to be specifically made to exploit notepad. A sandbox is still technically the safest, but I generally view files in Total Commander's viewer (which is equivalent to opening it in notepad) because the risk is so low that it isn't really a problem unless you have really high security needs.

share|improve this answer

As another user said, the only way they could possibly affect you is by finding an exploit in notepad itself. This would most likely be a buffer overflow attack since the only time notpad seems to have any issues is when opening files that are larger than the PAGEFILE + RAM combined. Other exploits may exist but notepad has been around forever...its probably pretty tight.

However, a more major issue would be opening the files in a third party note editor like Notepad++ as these editors may have unknown attack vectors.

share|improve this answer

If you have to do this on a regular basis create a script that outputs the first line of the file. This will prevent any issues involving exploits targeted for notepad.

Here's an example:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.