Advisory

MAL-2026-10511

Also known as: GHSA-w8hw-4vch-mrj4

Malicious package Its source marks this package as malicious: it is not a vulnerability in a legitimate one.

Summary

Malicious code in type-swap (npm)

Details

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

Source: amazon-inspector (6db27d60a7dec38dafef8ed810203dc0130cf340eae162410dfcb7b21a4e2658)
The package's declared main entry (index.js) exports a middleware factory that, when invoked by a consumer, spawns lib/caller.js as a detached child process with stdio ignored and unref()'d, concealing it from the parent. lib/caller.js performs an HTTPS GET to https://jsonhosting.com/api/json/e16583b1/raw, extracts a JavaScript payload from a cookie field in the response, and executes it via new Function.constructor("require", s)(require), granting the remote host arbitrary code execution in the installer's Node process with require bound. Additional remote endpoints (https://jsonkeeper.com/b/XRGF3 in lib/caller.js and https://jsonkeeper.com/b/4NAKK in lib/const.js) are stored base64-encoded under a fake process.env object keyed as DEV_API_KEY, staged for the fetched payload. The package name and README impersonate an unrelated logging library.

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

Severity

Not rated by the source.

Dates

Published
2026-07-13 22:17 UTC
Modified
2026-07-13 22:46 UTC

Affected packages and fixes

type-swap

npm · All systems

Affected

  • introduced 0 (semver)

Fixed versions

None listed

Fix

No fixed version is listed.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: OpenSSF Malicious Packages · Apache-2.0

Sources & licences