Playbooks · Coding tasks
Two MCP packages on npm were stealing secrets
Written November 12, 2026
Two npm packages that call themselves Markdown toolkits start collecting data the moment the server launches, before any tool is called. One tries to send a report out over plain HTTP. Check your installs for the two names today.
What the two packages are
Knostic's report covers two packages from the npm account ifasn, both at version 2.1.1 and both published on November 3, 2026: @ifasn/mmdd-doc-mcp and @ifasn/ms-doc-mcp. Each describes itself as a Markdown document toolkit MCP server, and each does ship three Markdown tools: md_toc for tables of contents, md_stats for text statistics, and md_table for table formatting. Knostic found those tool functions to be plain text code with no file or network access. The problem is the second routine each package runs alongside them. Neither package has a README or a repository link.
The first package: a report sent out over HTTP
@ifasn/mmdd-doc-mcp calls its collection routine, deepAudit(), at the top level of its code, so it starts whenever the server is launched and runs in the background. It records the names and lengths of credential-like environment variables, its own and those of other readable processes, but not their values. For command lines, it keeps the first 200 characters of any readable process whose command line contains -D, password, secret or jasypt. That is the part that can capture real secrets, because some programs receive passwords and keys as command-line options.
It also queries the Alibaba Cloud metadata service at 100.100.100.200, including the role-credential list paths, with and without a metadata token. Knostic's review makes a useful correction here: only HTTP status codes and response lengths go into the report, so the metadata checks show which paths are reachable but do not themselves contain cloud credentials. The joined results are cut to the first 1,500 characters, URL-encoded, and carried in the URL of a plain HTTP GET request to a hardcoded destination, first a nip.io hostname and then a bare IP address if the first does not return HTTP 200. The file header says, in Chinese, that results are written to stderr and an artifact file with no network reporting. The code does the opposite: it writes no report file and sends the report over the network.
The second package: secret values written to disk
@ifasn/ms-doc-mcp starts its own routine, envAudit(), at launch. Where the first package records variable names and lengths, this one keeps the full, untruncated values of every variable in its own environment whose name matches KEY, TOKEN, SECRET, ALIBABA, DASHSCOPE or CREDENTIAL. It also notes whether Kubernetes service-account files exist and how large they are, without reading them, and runs similar metadata checks that keep only status codes and lengths. The report goes to stderr and to an attempted write of output/env_audit.txt in the working directory. Knostic found no code that sends this haul to an external server, and no path from those outputs to the publisher. Its header says the scan records key names only, not values. The code records the values.
What to do if either name is in your tree
- Search your MCP configuration for the two names. Look for
@ifasn/mmdd-doc-mcpand@ifasn/ms-doc-mcpin every client configuration and lockfile you use, and remove either package from the configuration. Collection runs each time the server is launched, so every environment where it ran needs the same pass. - For the first package, look for the outbound requests. Knostic lists the destinations, the
/beaconpath, and the user agentmmd-doc-mcp/2.1.1 deep-audit. Then work out which processes on the same host had secrets on their command lines, and rotate those secrets if they may have been captured. Capture depended on what the server could read and on the 1,500-character limit. - For the second package, search the output it left behind. Look in the server's stderr, in client or platform logs, and in its working directory for
ENV-VALUE:lines and foroutput/env_audit.txt. Rotate any secret that appears there. - Treat launch behaviour as the tell for the next one. A document formatter has no reason to probe a cloud metadata address or open an outbound HTTP connection when it starts. Code that runs at launch, before any tool call, is the first place to read in any server you install.
The wider context, from Hanging Context's write-up of the same findings: Snyk counted 4,524 unique MCP servers across 10,000 developer environments, and 1 in 12 developers with an MCP server installed had a high or critical security finding. Most teams cannot say which servers their agents are running, which is why an inventory comes before any other fix.
Limits
- Knostic's work is a static code review of the two 2.1.1 archives. The packages were not installed or run for the report, and no destination was contacted.
- No victims have been confirmed for either package, and no successful delivery of the first package's report has been confirmed. Knostic's AgentMesh scanner rated the first package Dangerous, which prompted the review, and lists both analyzed versions as Dangerous.
- The second package's secret values were not shown to leave the machine. They were written to stderr and a local file, and who could read that output depends on the environment it ran in.
- This page covers only the two named packages at version 2.1.1. It makes no claim about other packages from the same account or about MCP servers in general.
Related playbooks
- A malicious MCP server probed cloud credentials
- Manage Airbyte pipelines through its MCP server
- Apify MCP Server 0.21.8 hardens the bridge
- AWS MCP server let deny lists silently fail
Sources
- More Than Markdown: Hidden Data Collection in Two MCP Packages — Knostic
- Your agents plug into servers nobody watches — Hanging Context
Back to: Coding playbooks hub · Also: Cloakroom: hide your secrets from your agent · Patch your MCP reference servers now