registry  /  type-unique  /  3.1.3

type-unique@3.1.3

OSV Malicious Advisory

scanned 3h ago · by OpenSSF/OSV

OpenSSF/OSV advisory MAL-2026-10512 confirms this npm version as malicious. type-unique@3.1.3 presents itself as the pino logger (matching README, keywords, and package shape) but on require() its index.js spawns a detached `node lib/caller.js` child process. That child fetches JSON from https://jsonhosting.com/api/json/3ea04c38/raw, extracts a `cookie` field, and executes its content via `new Function.constructor('require', s)(require)`, giving remote content full Node.js capabilities...

Advisory
MAL-2026-10512
Source
OpenSSF Malicious Packages via OSV
Summary
Malicious code in type-unique (npm)
Details
type-unique@3.1.3 presents itself as the pino logger (matching README, keywords, and package shape) but on require() its index.js spawns a detached `node lib/caller.js` child process. That child fetches JSON from https://jsonhosting.com/api/json/3ea04c38/raw, extracts a `cookie` field, and executes its content via `new Function.constructor('require', s)(require)`, giving remote content full Node.js capabilities including the bound `require`. Additional C2 URLs (https://jsonkeeper.com/b/XRGF3, https://jsonkeeper.com/b/4NAKK) are stored base64-encoded as fake `DEV_API_KEY` constants in lib/caller.js and lib/const.js to hide the destinations. The fetched payload is unpinned, unauthenticated, and served from third-party JSON-hosting services controlled by the author, so arbitrary code can be delivered to any machine that loads the package. ## Source: ghsa-malware (a3ede5b2d04e8a69403b546398ae82a613127d9985e32b1b1299d67e522c8217) 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.
Decision reason
OpenSSF Malicious Packages via OSV confirms type-unique@3.1.3 as malicious (MAL-2026-10512): Malicious code in type-unique (npm)

Source & flagged code

0 flagged
No flagged code excerpts are attached to this scan.

Findings

1 High
HighOsv Malicious Advisory