# MAL-2026-6299: Malicious code in analysis-chart (npm)


- **Type:** Malicious package
- **Package:** `analysis-chart` (npm)
- **Published:** 23 Jun 2026

## What is MAL-2026-6299?

MAL-2026-6299 is a malicious package in analysis-chart, published on 23 Jun 2026. 

### Official description

The package's postinstall hook (install-hook.js, invoked via package.json scripts.postinstall) fetches an opaque binary 'payload.bin' from https://github.com/Dimitrijenco/Sticky_note/releases/download/v6/payload.bin — a third-party GitHub release on an account unrelated to the package's claimed author. The downloaded bytes are XOR-decrypted with key 0x42, then loaded into the installer's process: kernel32.dll is loaded via koffi, RWX memory is allocated with VirtualAlloc, the decrypted PE is copied via RtlMoveMemory, VirtualProtect is applied, and CreateThread is started at the parsed PE entry point. This is in-memory shellcode/PE injection on Windows developer machines, executing arbitrary attacker-controlled native code on `npm install`. After launching the payload, install-hook.js writes a cleanup.js that, after a 3-second delay, runs `cmd /c rmdir /s /q` on the package folder, removes 'analysis-chart' from the host project's package.json, unlinks install-hook.js, and self-deletes — anti-forensic evidence removal so the developer cannot inspect what ran. The package's index.js exposes a plausible-looking chart statistics API (stats, outliers, trend, correlation, movingAverage, analyze) that is functionally unrelated to install-hook.js and serves as decoy cover; author metadata 'Elena Vogt <elena@analysis-chart.io>' and the referenced repo appear fabricated.

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-6299?

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-6299 is a malicious package: analysis-chart (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-6299/ (Markdown: https://insights.sbomify.com/MAL-2026-6299/index.md)
```

## Sources

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

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