VYPR

npm · Malicious package advisory

Malware

analysis-chart

MAL-2026-6299

Malicious code in analysis-chart (npm)

Details


---
_-= Per source details. Do not edit below this line.=-_

## Source: amazon-inspector (a1ab4349bcc1e8f4434817d242b136f6e6050d4acb234aa833d81ffd74942066)
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.

## Source: ghsa-malware (82bbf41d04bd663ad1120c3d1247f5a7d17684a14e12d0fb19191da0c1da929f)
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.

Compromised versions (21)

  • 2.0.14
  • 2.0.16
  • 2.0.11
  • 2.0.13
  • 2.0.17
  • 2.0.18
  • 2.0.8
  • 2.0.10
  • 2.0.19
  • 2.0.12
  • 2.0.9
  • 2.0.15
  • 2.0.22
  • 2.0.25
  • 2.0.24
  • 2.0.23
  • 2.0.28
  • 2.0.26
  • 2.0.27
  • 2.0.21
  • 2.0.20

Any computer that installed or ran a compromised version should be considered fully compromised. Rotate every secret on that machine from a clean environment.