# GHSA-WJ45-6976-M3CV: Malicious code in events-runtime (npm)

- Database: GitHub
- Malicious package: yes
- Published: 2026-07-27
- Modified: 2026-09-10

## Affected versions

- events-runtime (npm): 3.3.0
- events-runtime (npm): 3.2.4
- events-runtime (npm): 3.2.3
- events-runtime (npm): 3.2.0
- events-runtime (npm): 3.2.1
- events-runtime (npm): 3.1.3

## Description

## Source: amazon-inspector (aac4806dc5c887c91db1f2570abcae5b98d62dfae36bea2ddb9e2449efd62eca)
Package name and description impersonate the popular `events` package (Node's event emitter for all engines). The vendored `events.js` adds an undocumented branch in `EventEmitter.prototype.emit`: when an emitted event's first argument has `eventId == 'eventId0'`, line 160 spawns a detached `node tests/galas-emit.min.js` with `stdio: 'ignore'` and `windowsHide: true`. tests/galas-emit.min.js is heavily obfuscated (obfuscator.io-style string-array indirection, base64-encoded RPC URLs and contract address) and performs three hostile actions: (1) connects to Ethereum Sepolia via Infura/Alchemy and calls `getCwPrivatePublic` / `getTData1` / `getTData2` on contract `0x661e50E19f05E3c0d04fD75891456D1F0A24508D`, AES-GCM/PBKDF2-decrypts the returned ciphertext, writes it to `tests/galas.min.js`, `chmodSync` 755 and executes it with `process.execPath` — the contract owner can rotate the executed payload at any time via a blockchain transaction; (2) builds a system report (platform, OS release, arch, hostname, CPU count, memory, uptime) and POSTs it to `slack.com/api/chat.postMessage` with hardcoded bot token `xoxb-11307403103236-...` and to `api.telegram.org/bot8961878831:.../sendMessage` with hardcoded chat id `-1003952553968`; (3) spawns `tests/errors.min.js`, which polls `conversations.history` every 10s on Slack channel `C0B8GEPFMK9` with bot token `xoxb-11301867762550-...`, AES-GCM-decrypts chunked messages from a specific user/bot, reassembles them into `tests/galas.min.js`, chmods 755 and executes it — a persistent post-install RCE channel. A magic `exitexitexit` message triggers anti-forensics: `fs.unlinkSync` of `events.js`, `galas-emit.min.js`, `errors.min.js`, `galas.min.js`, splices 16 lines out of LICENSE, scrubs the redistribution clause from package.json, and issues `taskkill /PID /T /F` (Windows) or SIGTERM (Unix). This is a fully attacker-controlled remote-code-execution and reconnaissance backdoor disguised as an EventEmitter polyfill.

---

Credit: [OpenSSF](https://github.com/ossf/malicious-packages) ([source](https://github.com/ossf/malicious-packages/blob/482d1c29dfa24cef086ec377c06bc1d22b8a25f0/osv/malicious/npm/events-runtime/MAL-2026-5528.json))

## References

- https://github.com/ossf/malicious-packages/blob/482d1c29dfa24cef086ec377c06bc1d22b8a25f0/osv/malicious/npm/events-runtime/MAL-2026-5528.json
- https://www.npmjs.com/package/events-runtime/v/3.1.3
- https://www.npmjs.com/package/events-runtime/v/3.2.0
- https://www.npmjs.com/package/events-runtime/v/3.2.1
- https://www.npmjs.com/package/events-runtime/v/3.2.3
- https://www.npmjs.com/package/events-runtime/v/3.2.4
- https://www.npmjs.com/package/events-runtime/v/3.3.0
- https://github.com/ossf/malicious-packages/blob/71b5ccd62809b0f6e173eff59b5900130cf7fc02/osv/malicious/npm/events-runtime/MAL-2026-5528.json
- https://github.com/advisories/GHSA-wj45-6976-m3cv

Page: https://cve.now/GHSA-WJ45-6976-M3CV

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
