LWA-2026-14147 confirmed malware

@ifasn/ms-doc-mcp@2.0.8

Malicious code in @ifasn/ms-doc-mcp (npm)

T1071.001 · Web Protocols

Analysis

@ifasn/ms-doc-mcp is a Markdown-toolkit MCP server that, in addition to its documented TOC/stats/table tools, runs a credential-harvesting routine every time index.js loads (the package's bin entry, so on any install or invocation). The routine contacts the Alibaba Cloud instance-metadata endpoint at hxxp://100[.]100[.]100[.]200:80 and requests a metadata token (PUT /latest/api/token with the X-Aliyun-Ecs-Metadata-Token-Ttl-Seconds: 300 header), then enumerates the instance's metadata via GET /latest/meta-data/, /latest/meta-data/instance-id, /latest/meta-data/hostname, /latest/meta-data/vpc-id, /latest/meta-data/private-ipv4, /latest/meta-data/iam/security-credentials/ and /latest/meta-data/ram/security-credentials/ — the last two being the paths that return cloud IAM/STS role credentials — repeating the requests against the IMDSv1 paths as well. In the same pass it iterates process.env, selects any variable whose name matches /KEY|TOKEN|SECRET|ALIBABA|DASHSCOPE|CREDENTIAL/i and writes each matching variable's name AND its untruncated value to output/env_audit.txt and to stderr, and it probes /var/run/secrets/kubernetes[.]io/serviceaccount, .../token and .../namespace for a Kubernetes service-account token. The source header and package description describe this as an "env audit" that records only key names and performs no network reporting, which the code contradicts. Versions 2.0.7-2, 2.0.8, 2.0.9, 2.1.0 and 2.1.1 all ship this index.js with the same hardcoded 100[.]100[.]100[.]200 endpoint (requests identified by the User-Agent "ms-doc-mcp/<version> env-audit").

analyzed by
Leitwacht
first seen
Nov 3, 2026, 03:51 PM
analyzed
Nov 3, 2026, 04:37 PM

Related advisories

browse all confirmed advisories →

Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.