Skip to main content
MalwarePublished

type-swap (npm) · Malicious Code

Affects type-swapSource GCVE Database

0

Malicious package : remove type-swap and rotate any secrets on hosts that installed it.

Data as of 14 Jul 2026, 09:46 UTC

Classification

Malicious package

Published to npm · OSV MAL-2026-10511

What to do

Remove type-swap from every project, lockfile and image that pulls it in. Treat any host that installed it as compromised: rotate the credentials, tokens and keys it could read, from a clean machine.

Affected software

ProductAffectedFixed in
npmtype-swapAffected
  • =3.1.3
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

Description

The npm package 'type-swap' version 3.1.3 contains malicious code that executes a concealed detached child process. This process fetches and executes remote JavaScript code, enabling arbitrary code execution within the installer's Node environment. The package impersonates a legitimate logging library to evade detection. Any system with this package installed should be considered fully compromised, and all secrets and keys on that system must be rotated immediately. Removal of the package does not guarantee elimination of all malicious components.

References

Community reviews

Loading reviews…