“Gmail currently restricts certain file attachments (e.g. .exe, .msc, and .bat) for security reasons, and starting on February 13, 2017, we will not allow .js file attachments as well. Similar to other restricted file attachments, you will not be able to attach a .js file and an in-product warning will appear, explaining the reason why,” the G Suite blog reported.
“If you still need to send .js files for legitimate reasons, you can use Google Drive, Google Cloud Storage, or other storage solutions to share or send your files,” the blog read.
The company’s move came after severe malware attacks reported by .js files in the past. According to Mashable, a vulnerability in Yahoo Mail gave hackers the opportunity to embed malicious .js code in emails last year. Once a user opened his or her email, the code would start working and allow the hacker to hijack the user’s account.
Microsoft also noticed that many spam campaigns were using .js attachments including ransomware in April last year. The malicious .js files might not do any harm by themselves, but they can act as downloaders for other programs that could lock you out of your computer or install other malware.
The company has also restricted certain other file attachments over Gmail in order to protect users from viruses. This includes .exe, .jse, .ade and .adp files.