A tool server is set up to load extra code before it starts
Infection level: HIGHEX-025 · MCP server environment changes how its program loads
What the attacker is trying to do
The settings for a tool server include a variable such as NODE_OPTIONS or LD_PRELOAD. These make the program load code of the attacker's choosing before it starts, without changing the command you see, so the server looks the same but does more.
Defanged example
No example file exists for this rule yet.
How to fix it
Remove the variable from the server's env unless you know exactly why it is there. NODE_OPTIONS=--require, LD_PRELOAD and similar variables run code of their choosing before the server starts, without changing its command or arguments, so a reviewer looking at the command line would not notice.
Technical details
- Detected by
- a structure check on JSON files
- Checks files of type
- mcp-config, config
- OWASP
- ASI07 Supply Chain Vulnerabilities; MCP04 Malicious MCP Package