---
id: "GHSA-39q9-338w-8vhv"
kind: "package"
aliases: ["GHSA-39q9-338w-8vhv", "MAL-2026-10535"]
title: "Malicious code in my-empty-package (npm)"
severity: "critical"
cvss: null
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "my-empty-package", "fixed": [], "affected": "= 1.0.0", "ecosystem": "npm"}]
ecosystems: ["npm"]
tags: ["malicious", "package"]
not_affected_if: []
published_at: "2026-07-14T03:57:12+00:00"
first_seen_at: "2026-10-28T19:03:54+00:00"
updated_at: "2026-10-28T19:04:01+00:00"
sources: [{"source": "osv-malicious", "url": "https://osv.dev/vulnerability/MAL-2026-10535", "first_seen_at": "2026-10-28T19:03:54+00:00"}]
---

# Malicious code in my-empty-package (npm)

## Affected

- npm:my-empty-package affected = 1.0.0 fixed ?

## Timeline

- 2026-10-28T19:03:54+00:00 osv-malicious https://osv.dev/vulnerability/MAL-2026-10535

## From the sources

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

## Source: amazon-inspector (914ffc98ce1f6553e4f9655208318800d0d22663842eb4c9a3d0d51d4f143bdd)
package.json declares `postinstall: node index.js`. On `npm install`, index.js branches on `os.platform()` and executes platform-specific shell commands: `osascript` on macOS, `powershell -WindowStyle Hidden -EncodedCommand <base64-UTF16LE>` on Windows, and `python3 -c 'os.system(...)'` on Linux. After the payload runs, a cleanup step renames a shipped `package.md` over `package.json` and unlinks `index.js` itself, removing the install-time script from disk and presenting a different manifest to any post-install inspection. The hidden-window base64-encoded PowerShell invocation is a standard malware evasion technique. Manifest swap + entrypoint self-deletion is anti-forensic behavior with no legitimate purpose. Even though the current payload body is a benign demonstration (opens the calculator), the delivery framework is a fully-functional install-time RCE dropper skeleton: any content placed in the platform branches would execute automatically on install with the user's privileges and then erase its own traces.

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

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
