Minecraft mods can contain malware, as evidenced by the Fractureiser virus. It’s best not to use them if you’re concerned about internet security. If you do, run frequent scans with your antivirus software.