Versions 2.0.9 and 2.1.1 of the npm package @ifasn/ms-doc-mcp contain malicious code
Malicious code in @ifasn/ms-doc-mcp (npm)
A GitHub security advisory flags versions 2.0.9 and 2.1.1 of the npm package @ifasn/ms-doc-mcp as containing malicious code, with no fixed version yet. The package describes itself as a Markdown toolkit MCP server providing table-of-contents generation, word counting and table formatting, but its main/bin entry calls imdsAudit() at module load, probing the Alibaba Cloud instance metadata service at 100.100.100.200, enumerating RAM and IAM credential endpoints, and using both the v1 unauthenticated and v2 token-authenticated access paths. The temporary role access keys, instance ID, hostname, vpc-id and private network address it obtains are written to stdout and to output/imds_audit.txt, and when the package runs inside an MCP server, stdout is exactly the channel that returns data to the MCP client and model, so credentials may leak off the local host. Code comments describe this behavior as an audit with zero network exfiltration, which does not match the package's declared Markdown tool purpose.
An MCP package disguised as a Markdown toolkit reads Alibaba Cloud instance credentials at load time and returns them via stdout; teams using third-party MCP services can use this to check their dependencies.