MKI
Your AI agent's memory plugin just became a supply chain worm
A compromised npm and PyPI package shows AI agent frameworks are now a live supply chain target, and what to check in your own stack this week.
On September 23, 2026, someone with publishing access to MemTensor’s MemOS — an open source memory framework for LLMs and AI agents with roughly 11,500 GitHub stars — pushed four malicious releases across two registries. Three landed on npm, one on PyPI. Every one of them bundled a cross-platform Go binary that searches the developer’s home directory for npm tokens, GitHub and GitLab keys, AWS credentials, Hugging Face tokens, and a handful of other secret formats, then reports back to a command-and-control server.
That’s a familiar shape if you’ve followed the last two years of npm incidents. What’s different this time is where the malware hooks in. It never touches a postinstall script — everyone scans those now. Instead it wires itself into the code path an AI agent calls every time it does its actual job: starting up, and recalling a memory. If anything in your stack touches an agent framework, a memory store, or a model-serving SDK, this one is worth twenty minutes of your week, whether or not MemOS itself is in your dependency tree.
What changed
Security firm Socket first reported the compromise on the day it happened, and three more research teams — Semgrep, StepSecurity, and Aikido — independently confirmed the technical details within 48 hours. The affected releases: npm’s @memtensor/memos-cloud-openclaw-plugin versions 0.1.21, 0.1.23, and 0.1.25 (the last one tagged latest at the time), and PyPI’s MemoryOS version 2.0.34 (Socket). The npm releases were published from an account with a legitimate release history but no matching gitHead, meaning they didn’t come from the project’s own CI — a strong signal of account or token compromise rather than an inside job.
The publishing timeline is its own tell. Between 02:23 and 05:55 UTC, malicious versions alternated with clean ones — 0.1.22 and 0.1.24 matched the last known-good release byte for byte apart from version strings — which researchers read as the attacker testing payload delivery while they still had access (Semgrep). Package size is a giveaway too: the PyPI wheel grew from 951 KB to over 19 MB, almost entirely from six bundled platform binaries for Linux, macOS, and Windows on both x64 and arm64.
Why this got past install-time scanning
Most supply chain defenses built up over the last few years watch preinstall and postinstall scripts, because that’s historically where malware executed. This payload doesn’t ship one. On the npm side, the malicious versions add a file, lib/sckit.js, and call it from two places that already exist in normal plugin operation: when the OpenClaw agent gateway starts, and inside the memory-recall hook that fires on every prompt (StepSecurity). That second call is the one to sit with — it passes the user’s current prompt text into the child process as an environment variable, meaning anything a developer asked their agent while the compromised plugin was loaded should be treated as potentially exposed.
The Python side is arguably more elegant, in the way that makes defenders uncomfortable. MemoryOS hooks configure_logging() in memos/log.py, appending a call to a new memos._stage0.trigger(). Because 149 modules across the package call get_logger() at module scope — including one imported directly by memos/__init__.py — a plain import memos is enough to reach the hook and launch the payload. No explicit function call, no install script, nothing a dependency-scanning tool watching npm install output would ever see (Semgrep).
Once running, the binary — internally named sckit — searches $HOME for credentials matching a dozen-plus formats: AWS access keys, GitHub and GitLab tokens, npm and PyPI tokens, Hugging Face tokens, HashiCorp Vault tokens, Slack tokens, Stripe live keys, SendGrid keys, SSH keys, and generic JWTs, then exfiltrates anything it finds to servers under the domain skyleen[.]fr (Socket). The embedded configuration explicitly names NPM_TOKEN as a target field, and one exported (though apparently unused) helper function maps NPM_TOKEN or NODE_AUTH_TOKEN directly into the child process environment — about as unambiguous a signal of intent as static analysis gets.
The part that hasn’t happened yet
The binary also contains functions named recursivePublish, prepareRemoteNode, prepareRemotePython, and prepareRemoteWorkflow, along with a GitHub Actions template designed to trigger the payload on every push to a compromised repository. Aikido, which is tracking the malware family as supplychain.local, found JavaScript and Python stubs built to relaunch the payload from other infected packages, consistent with a worm designed to steal a publishing token, use it to push a compromised release of something else, and repeat (Aikido). As of this writing, no research team has found evidence that this propagation has actually fired — the capability is there, dormant, which is exactly the state you’d want to notice before it isn’t.
Three properties make agent tooling an unusually good host for this kind of payload, and none of them are specific to MemOS. Credential density is higher than average: a machine running an AI agent typically already holds registry tokens, cloud keys, and API credentials, because the agent needs them to do useful work. Almost nobody threat-models pip install or npm install for an AI side project the way they would for a production service — the conversation around agent security has been almost entirely about prompt injection and jailbreaks. And, as this incident demonstrates directly, the prompts themselves are now part of the attack surface, carrying exactly the kind of sensitive material that traditional supply chain attacks never touched.
This isn’t a one-off technique
The timing here matters as much as the target. npm 12 shipped a security change that stops lifecycle scripts like preinstall and postinstall from executing automatically — exactly the mechanism most install-time malware scanning was built to watch. Nine days before the MemOS compromise, researchers at Checkmarx disclosed a separate, unrelated npm package called indexed-btree that had already adapted: it skipped lifecycle scripts entirely and hid its loader inside a legitimate-looking method on the package’s own B-tree data structure, triggering only when application code actually called it (The Hacker News). That package and ten related ones had racked up millions of downloads and an estimated €230,000 in cryptocurrency payouts before removal.
“The broader lesson is that security controls change attacker behavior rather than eliminate the underlying threat,” SOCRadar’s Ensar Seker told The Hacker News about the indexed-btree case. “Blocking lifecycle scripts is an important improvement, but attackers will continue searching for alternative execution paths.” MemOS and indexed-btree are unrelated campaigns, different malware families, different registries of intent — but they landed within nine days of each other and share the exact same adaptation: move the trigger from install time to first use, where a different, much smaller set of tools is watching. If your team’s dependency review still ends at “did the install log look clean,” that gap is the one worth closing first.
What we’d check this week
None of this requires MemOS in your dependency tree to be worth acting on, because the technique — not the specific package — is what’s new. A few concrete things worth doing regardless of your stack:
Search your lockfiles, requirements*.txt, poetry.lock, uv.lock, and any SBOMs you maintain for @memtensor/memos-cloud-openclaw-plugin and MemoryOS. If either shows up, Socket’s guidance is to pin to the last known-good releases — 0.1.20 on npm, 2.0.33 on PyPI — or remove the packages outright, and treat any host that loaded the bad versions as compromised, developer laptops and CI runners included (Socket). Rotate registry, source control, and cloud credentials reachable from any affected environment before anything else.
More durably, treat AI agent frameworks, memory plugins, and model-serving SDKs as first-class dependencies for supply chain review, not experimental add-ons that skip the process your production code goes through. That means the same discipline we wrote about for npm’s trusted publishing rollout back in September — provenance attestation, a real CI-backed publish pipeline, no ambient long-lived tokens sitting in ~/.npmrc — applies just as much to the openclaw plugin your team installed to try out an agent-assisted workflow as it does to your production framework.
Finally, treat agent prompts as data that can leave your organization through channels you didn’t design for. If a plugin, harness, or SDK you didn’t build yourself sits between a developer’s keyboard and a model, assume — until you’ve checked — that anything typed into it could be readable by whoever controls that plugin’s supply chain. That’s not a reason to avoid agent tooling. It’s a reason to give it the same vendor and dependency scrutiny you’d give a payment processor, which is a bar most teams, including ours until incidents like this one force the conversation, haven’t consistently applied. If you’re auditing what’s running in your own build and deploy pipeline and want a second set of eyes on it, that’s exactly the kind of maintenance work we do for client projects — get in touch if it would help to talk through your own dependency surface.
Sources
- Socket — MemTensor npm and PyPI Packages Compromised in Credential-Stealing Supply Chain Attack (September 23, 2026)
- Semgrep — AI Supply Chain Attack Hits an OpenClaw Memory Plugin
- StepSecurity — Sckit Supply Chain Worm Hits MemTensor npm & PyPI scopes (September 23, 2026)
- Aikido — Novel supplychain.local Go worm appears (September 23, 2026)
- SC Media — MemTensor npm, PyPI packages compromised with cross-platform credential stealer (September 24, 2026)
- SecurityWeek — In Other News: Clop Leak Site Takeover, Docker Botnet Hunts AI Keys, Water Utility Exposure (September 25, 2026)
- The Hacker News — Malicious npm Package indexed-btree Hid Its Loader in Runtime Code Before Removal (September 22, 2026)