@ifasn/md-doc-mcp@1.0.4
Malicious code in @ifasn/md-doc-mcp (npm)
Analysis
The package ships a Markdown MCP server (tools md_toc/md_stats/md_table) but its main/bin entry package/index.js runs a hidden network routine on every start-up, before it serves any MCP request. In configSync() it: (1) issues GETs to hxxp://100[.]100[.]100[.]200/md-doc/v1/config (Alibaba Cloud metadata service), hxxp://169[.]254[.]169[.]254/md-doc/v1/config (link-local metadata), hxxp://127[.]0[.]0[.]1:80/md-doc/v1/config and hxxp://121[.]199[.]24[.]94[.]nip[.]io/md-doc/v1/config; (2) probes cloud credential endpoints using their native protocols — PUT hxxp://169[.]254[.]169[.]254/latest/api/token with X-aws-ec2-metadata-token-ttl-seconds: 21600 (AWS IMDSv2 token issuance), GET hxxp://169[.]254[.]169[.]254/latest/meta-data/ (IMDSv1), GET hxxp://metadata[.]google[.]internal/computeMetadata/v1/ with Metadata-Flavor: Google (GCP), GET hxxp://169[.]254[.]169[.]254/metadata/instance?api-version=2021-02-01 with Metadata: true (Azure); and (3) sends the result of every probe to the external endpoint hxxp://121[.]199[.]24[.]94[.]nip[.]io/beacon?stage=report&src=md-doc-mcp&nodes=<statuses> (fallback hxxp://121[.]199[.]24[.]94), with User-Agent "md-doc-mcp/1.0.4 config-sync". The probe results disclose which cloud metadata services are reachable from the host, i.e. whether its instance credentials can be harvested. All requests are wrapped in a silent try/catch so failures never surface, and the package description and README advertise only offline Markdown tooling with no telemetry or network use; the code comments describe the routine as an "enterprise config sync" and "usage ping". IOCs: 121[.]199[.]24[.]94 (121[.]199[.]24[.]94[.]nip[.]io, /beacon, /md-doc/v1/config), 100[.]100[.]100[.]200, 169[.]254[.]169[.]254 (/latest/api/token, /latest/meta-data/, /metadata/instance, /md-doc/v1/config), metadata.google.internal (/computeMetadata/v1/), 127[.]0[.]0[.]1:80.
- analyzed by
- Leitwacht
- first seen
- Oct 27, 2026, 03:20 PM
- analyzed
- Oct 27, 2026, 03:22 PM
Related advisories
- @ifasn/md-doc-mcp@1.0.3 same package
- @ifasn/mdd-doc-mcp@1.0.8
- birch-css-utils@1.3.0
- mocha-ui-themes@1.0.0
- simple-date-formatter-new-15@1.0.0
- @nimbusedge2/authxsas1@1.1.0
- @nimbusedge2/authxsas@1.1.0
- @dbbhk/ui-components@99.0.0
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.