# Remove instrumentation-undici malware (GHSA-xqrc-pjq4-v9m9)

> Treat any host that installed instrumentation-undici as compromised, remove it, and rotate secrets from a clean machine.

Source: https://fullbytedeveloper.com/blog/patch-instrumentation-undici-malware
Published here: 2026-11-26

GitHub Advisory Database published malware for the npm package `instrumentation-undici` on 2026-11-24 (GHSA-xqrc-pjq4-v9m9). Affected versions are all versions (`>= 0`). Patched versions: none. If that name was installed or running on a machine, treat the host as fully compromised and rotate from somewhere else. [1]

Related reading: [Refuse fake Claude npm packages](/blog/refuse-fake-claude-npm-packages), [How the September 2025 npm worm spread](/blog/shai-hulud-npm-worm-response) and [Patch simple-git --exec injection (CVE-2026-134815)](/blog/patch-simple-git-exec-injection). Browse the [Security topic](https://fullbytedeveloper.com/blog/topic/security).

## Confirm the advisory identity

GHSA-xqrc-pjq4-v9m9 is labelled Malware. Ecosystem: npm. Package: `instrumentation-undici`. Published and updated 2026-11-24. Weakness: CWE-506 Embedded Malicious Code. Patched versions: none. The advisory page showed 0 Dependabot alerts at read time. [1]

Do not invent a CVSS number for this entry. Quote only what the advisory prints. [1]

## Detect it in the tree and in lockfiles

From each project root and each CI image that installs npm deps:

```bash
npm ls instrumentation-undici
rg -n "instrumentation-undici" package-lock.json npm-shrinkwrap.json yarn.lock pnpm-lock.yaml 2>/dev/null
```

You should see either an empty `npm ls` tree (clean for that project) or a resolved version under `node_modules`. A lockfile hit without a current install still means the name was resolved once and belongs on the refuse list. Search CI caches and offline mirrors for the same string. [1]

Run the same pair of checks on every workspace that shares a lockfile (monorepo packages, Docker build contexts, and developer laptop clones). Malware advisories of this class are about the name being present on a computer, not about a vulnerable range you can pin past. [1]

If `npm ls` prints the package under a transitive parent, record that parent name before you delete anything. You need it to stop the next install from pulling the same malware through another path. The advisory itself only names `instrumentation-undici`; the parent is your local tree evidence. [1]

## Rotate secrets from a different computer

The advisory says any computer that has this package installed or running should be considered fully compromised. Rotate all secrets and keys stored on that computer immediately from a different computer. Remove the package, but do not assume removal clears every payload that may already have run. [1]

Do the rotation on a clean laptop or a locked-down break-glass host. Do not mint new tokens on the same machine that ran the malware package. [1]

Incident checklist (secret classes to rotate when that host could reach them):

1. Cloud provider keys and roles (AWS, GCP, Azure access keys, long-lived IAM users).
2. Git host tokens and SSH keys (GitHub, GitLab, Bitbucket PATs and deploy keys).
3. Package registry tokens (`npm`, private registries, Artifactory, CodeArtifact).
4. CI and CD secrets (pipeline env vars, deploy keys, signing certificates).
5. App runtime secrets (database passwords, API keys, JWT signing keys, webhook secrets).
6. Browser and desktop session material on that host (SSO cookies, password-manager vault access, SSH agent keys loaded in memory).
7. Anything else that host could read from disk, env, keychain or agent sockets.

The advisory does not enumerate those classes by name. It says rotate all secrets and keys. The list above is the operational expansion of that sentence for a developer workstation. [1]

After rotation, review what that host could have published or pushed: recent commits, npm publishes, CI variable changes, and deploy credentials touched from that machine. The advisory does not list those review surfaces; they are the usual follow-on once keys are replaced. [1]

## Keep the name on the refuse list forever

Patched versions: none. The advisory states improvements are not currently accepted on this advisory because the package is malware and has no patched versions. There is no upgrade path. Refuse the name in every allowlist, SCA policy and autocomplete suggestion forever. [1]

| Finding | Action |
|---|---|
| `npm ls` empty and lockfiles clean | Keep the refuse rule; no host rotation required for this name |
| Lockfile hit, never installed on a machine | Drop the dep, regenerate the lockfile, keep refuse |
| Installed or running on a host | Full compromise response: rotate from another computer, then remove [1] |
| Someone asks for a "safe version" | Answer: none. Patched versions are none [1] |

Add a CI grep (or SCA deny rule) that fails the build when the string `instrumentation-undici` appears in any lockfile or install log. A later "fixed" release under the same name would still be malware until GitHub Advisory Database says otherwise, and today it says patched versions are none. [1]

Same class of response as other GitHub Advisory Database malware package entries: compromised host, rotate from elsewhere, refuse the name. Do not wait for a patched version that the advisory says does not exist. Source code on the advisory: none known. Improvements are not accepted on this advisory for that reason. [1]

Your next CI run should fail closed if `instrumentation-undici` appears in a lockfile or an install log.

Send this to the teammate who still npm installs whatever Autocomplete suggested without reading the package name.

## Sources

1. [GitHub Advisory Database: Malware in instrumentation-undici (GHSA-xqrc-pjq4-v9m9)](https://github.com/advisories/GHSA-xqrc-pjq4-v9m9)
