Skip to main content
Menu
Advisories

Malicious code in @k.vict1999/pino-std-serializers (npm)

MAL-2026-18677Published Updated OpenSSFMalware

Description

@k.vict1999/pino-std-serializers ships lib/contract.js, byte-identical to the pino-testkit payload: an obfuscated module that decodes and evaluates code at load. It is a new name for the pino-testkit (MAL-2026-16484) campaign; the file hashes below match that record's evidence. The package presents itself as an ordinary utility, so the code runs on import or install without the user knowing.

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

Source: amazon-inspector (faee50309d40a7a81589d363805c0856b2c17ec601dcd02e8d1a337bf8b04f20)

The scoped package @k.vict1999/pino-std-serializers republishes the contents of pinojs/pino-std-serializers under a different scope and adds lib/contract.js, a file not present in the upstream project. lib/contract.js contains a custom shuffle-decoder that reconstructs string literals at runtime, uses a decoded property name to obtain the Function constructor, builds a function from a decoded source string, and invokes it (var cMp = kWJ(teD, HRZ); cMp(7746)). The obfuscation is deliberate — property names and the executed source are hidden behind a per-file decoder — and the file's only purpose is to assemble and execute that hidden code. The payload is not reached from index.js, no other shipped module requires lib/contract.js, and package.json declares no lifecycle hooks, so installing the package or require()-ing its documented entry point does not currently invoke the payload. The combination of a scoped re-publish of a popular logging utility whose legitimate code is preserved intact, together with an added obfuscated Function-constructor eval staged under lib/, matches the shape of a staged supply-chain lure where either a later version re-wires the entry point or a sibling module imports lib/contract.js to activate the hidden code.

Affected versions

References