# MAL-2026-6502: Malicious code in js-client-node (npm)


- **Type:** Malicious package
- **Package:** `js-client-node` (npm)
- **Published:** 26 Jun 2026
- **Also known as:** GHSA-x7hp-6x9v-c662

## What is MAL-2026-6502?

MAL-2026-6502 is a malicious package in js-client-node, published on 26 Jun 2026. 

### Official description

package.json declares a postinstall hook (`node dist/postinstall.js`) that runs automatically on `npm install`. The hook invokes `prices()` in dist/index.js, which resolves the installer's project root via `process.env.INIT_CWD?? process.cwd()`, locates `.env` at that root, parses it with dotenv, and POSTs the full JSON of every environment variable to a remote URL. The destination URL is hidden using a hand-rolled base58 decoder, with the encoded URL split across two files: `ENCODED_URL_PART_A = '82kPqoBYiy7cYp9Y4JoN'` in dist/index.js and `ENCODED_URL_PART_B = 'ZWfGP1a9afkaPxYp37FZgsTX'` in dist/cli.js, concatenated and decoded at runtime. Errors are silently swallowed so `npm install` shows no warning. The package's identity is a deliberate decoy: package.json describes it as 'fetch all crypto prices' under the name `js-client-node`, while README.md is copy-pasted verbatim from @types/node. Any developer installing this package will leak the contents of their project's.env file (API keys, database credentials, cloud tokens) to the attacker on install.

Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.

## What should I do about MAL-2026-6502?

Remove the package from your dependencies and lockfiles, then rotate any secrets on machines where it was installed.

## Fix prompt for AI coding agents

```text
MAL-2026-6502 is a malicious package: js-client-node (npm). Every version was published to cause harm.

Task:
1. Search this repository's dependency manifests and lockfiles for the package, including transitive dependencies.
2. If it is present, remove it, regenerate the lockfile with the project's package manager, and replace whatever it was used for.
3. List any CI runners, developer machines or containers that installed it, so their secrets can be rotated.
4. If the package is not used anywhere, say so and change nothing.

Reference: https://insights.sbomify.com/MAL-2026-6502/ (Markdown: https://insights.sbomify.com/MAL-2026-6502/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/MAL-2026-6502

---
From sbomify Insights: https://insights.sbomify.com/MAL-2026-6502/
Summaries are generated and may contain mistakes; the official description above is the record.
