A self-hosted Discourse user, MiaZ, reported that Microsoft Defender flagged files in their Docker container as Wacatac malware after updating to Discourse v3.4.0.beta3. The flagged files were located in pnpm/store/v3/files and were identified by david as cached binaries of legitimate npm packages — specifically lefthook and esbuild. Verification via MD5 hashes confirmed the files matched official npm releases, indicating a false positive. david advised against removing the files, as they are essential for Discourse operation, and noted that similar false positives against npm packages are not uncommon, citing a prior example with esbuild. MiaZ thanked the team and contacted Microsoft Defender support. Their response included options like marking files as clean or suppressing alerts — which MiaZ declined to avoid missing real threats — and MiaZ submitted a feedback request to improve Defender’s scanning algorithm: Azure Feedback Link.
We have a self-hosted instance of Discourse on a virtual machine and after applying most recent Discourse updates v3.4.0.beta3 +431we have received alert from Microsoft Defender about Wacatac malware:
We have removed the file, restarted the virtual machine and now we´re waiting for another scan to run. This has already happened on December 2024 when we were pulling most recent Discourse updates.
It seems that Wacatac is somehow coming via Discourse updates or it might also be a false positive…
And for the one from December 2024:
/var/lib/docker/overlay2/d5d34d6148be507180106dc3b39b8b3d266b5e221fd5df48ce023df57186d4ef/diff/home/discourse/.local/share/pnpm/store/v3/files/23/f5520e308f56ab79324ef0ea1249acf7aa09f192d1b5e5599b3b284e46f1e6c0d6d58707b63a9c965399930b6148639ef2bd6d1d4d55343448ba42b4535440-exec
Those md5 hashes correspond to the published versions on npm, so we can be confident that they haven’t been tampered with between the registry and your installation:
So I think this has to be a false positive from Microsoft Defender. Removing esbuild from your Discourse installation will cause issues, so I’d recommend against that.
Searching online, it seems like Microsoft Defender falsely alerting against npm packages is fairly common. Here’s an example of a false detection of esbuild in the past.
As promised, this is the current feedback from Microsoft support:
Mark files as clean in Microsoft Defender for Cloud so to resolve alert → we did this, but we don´t see it as contributing to issue resolution since each time different file is falsely reported
Suppress entire alert in Microsoft Defender for Cloud → we didn´t want to do this so not to miss out on possible actual threats in the future
Submit idea for improvement of Defender scanning algorithm and/or internal database → we did this, waiting for feedback: Community