The most recent, which will be applied as of February 13, Google will prevent the sending or receiving of .JS files, means the mail or attachments contain JavaScript code. For a long time, Gmail blocks sending and receiving a set of file types that are considered dangerous. This is why files with .EXE, .BAT, or .MSI and many more extensions are simply barred and deleted, ensuring that the user does not receive them and remain safe. But from next February 13th, Gmail will add to its list of barred extensions JavaScript files. These can contain malicious code and are even run inside Windows in the Windows Script Host, giving access to executables and their subsequent installation.
Sending .JS Files Via Gmail
Anyone attempting to send a .JS file will receive an error message, which will give you access to a more detailed explanation of the causes of the attachment blocking, as it does. Google can detect such files directly or when they are inside compressed files (.ZIP, .TGZ, .GZ or .BZ2)
Receiving .JS Files In Gmail
Since security must be bidirectional, Google will also block the reception of such files by rejecting the messages that contain them and sending notifications to the sender notifying them of the problem. For users who need to share .JS files, Google recommends using Google Drive, Google Cloud Storage, or any other cloud service. It may seem like a far-reaching move, but this new lock will ensure even more security for Gmail users by preventing them from receiving files that could be potentially dangerous.