Malicious code in pino-testkit (npm)
The [email protected] npm package impersonates the legitimate pino logger by copying its metadata and README, but includes obfuscated malicious code. This code dynamically constructs and executes arbitrary functions, enabling arbitrary code execution when the package is required or used. This typosquatting package poses a risk of executing unauthorized code in consumers' environments.
AI Analysis
Technical Summary
The [email protected] package is a typosquatting malicious npm package that mimics the legitimate pino logger by copying its package.json metadata and README content. It includes an additional obfuscated file (lib/contract.js) that reconstructs the JavaScript Function constructor via character substitution and a deterministic shuffle, then dynamically builds and immediately invokes a function with arbitrary code. This function hoists require and module onto the global scope, allowing it to load arbitrary modules and execute arbitrary code. This behavior enables the attacker to execute arbitrary code on any system that requires or uses this package.
Potential Impact
Any consumer that installs and requires [email protected] is at risk of arbitrary code execution due to the dynamically constructed and executed payload. This can lead to full compromise of the environment where the package is used.
Mitigation Recommendations
No official patch or remediation is indicated. Consumers should avoid installing or using [email protected]. Verify dependencies to ensure the legitimate pino package is used and audit package names carefully to avoid typosquatting. Remove any instances of pino-testkit from projects and lockfiles.
Malicious code in pino-testkit (npm)
Description
The [email protected] npm package impersonates the legitimate pino logger by copying its metadata and README, but includes obfuscated malicious code. This code dynamically constructs and executes arbitrary functions, enabling arbitrary code execution when the package is required or used. This typosquatting package poses a risk of executing unauthorized code in consumers' environments.
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The [email protected] package is a typosquatting malicious npm package that mimics the legitimate pino logger by copying its package.json metadata and README content. It includes an additional obfuscated file (lib/contract.js) that reconstructs the JavaScript Function constructor via character substitution and a deterministic shuffle, then dynamically builds and immediately invokes a function with arbitrary code. This function hoists require and module onto the global scope, allowing it to load arbitrary modules and execute arbitrary code. This behavior enables the attacker to execute arbitrary code on any system that requires or uses this package.
Potential Impact
Any consumer that installs and requires [email protected] is at risk of arbitrary code execution due to the dynamically constructed and executed payload. This can lead to full compromise of the environment where the package is used.
Mitigation Recommendations
No official patch or remediation is indicated. Consumers should avoid installing or using [email protected]. Verify dependencies to ensure the legitimate pino package is used and audit package names carefully to avoid typosquatting. Remove any instances of pino-testkit from projects and lockfiles.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-16484
- Osv Schema Version
- 1.7.4
- Ecosystems
- ["npm"]
Threat ID: 6ab4be82f7a7c54106f0deee
Added to database: 09/24/2026, 06:09:06 UTC
Last enriched: 09/24/2026, 06:54:52 UTC
Last updated: 09/25/2026, 03:53:28 UTC
Views: 31
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.