Malicious Code Vulnerability in n8n-nodes-flowstats Package
Summary
MAL-2026-17175: Malicious code in n8n-nodes-flowstats (npm). Affects n8n-nodes-flowstats versions 1.0.0. No fix is published. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The n8n-nodes-flowstats package is designed as a community node for n8n, a popular workflow automation tool. This package is intended to annotate items with flow statistics, providing users with insights into their workflows. However, it has been found to contain malicious code that can compromise the security of n8n installations, particularly when certain environment variables are present.
Vulnerability Detail
The vulnerability originates from two malicious mechanisms embedded in the nodes/FlowStats.node.js file. First, upon loading the module, an Immediately Invoked Function Expression (IIFE) checks for specific n8n environment variables. If found, it executes an HTTPS GET request to a hardcoded IP address, downloads a payload, and executes it with elevated permissions. Second, the execute() function allows arbitrary shell command execution if a specific key is provided in the input. This poses a significant risk as it can lead to unauthorized access and control over the n8n host.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall n8n-nodes-flowstats
If it arrived as a transitive dependency, remove the package that pulled it in, then reinstall.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
As a temporary workaround, you can remove the n8n-nodes-flowstats package from your project to prevent exploitation until a patch is applied. Use the following command to uninstall the package: npm uninstall n8n-nodes-flowstats.
Conclusion
The n8n-nodes-flowstats package contains serious vulnerabilities that can lead to malicious exploitation. It is crucial to update the package to the latest version or remove it to protect your n8n installation. Regular monitoring and vulnerability management are essential to maintain security.
See every vulnerability recorded for n8n-nodes-flowstats →
FAQ
It is a community node for the n8n workflow automation tool that provides flow statistics.
The malicious code executes upon loading the module and can run arbitrary shell commands if specific conditions are met.
The risks include unauthorized access to the n8n host, potential data breaches, and the ability for attackers to execute arbitrary commands.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
If an immediate update is not possible, consider removing the package as a temporary measure to mitigate the risk.