Malicious code in chain-chai-test (npm)
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (4287ff6637bb0d3109dcdc3082aece79d69deca2a3580ebf850ec1c13e8a3e00) [email protected] advertises itself as a pino-style logger (keywords fast/logger/stream/json, exported alias module.exports.pino = middleware, pino-pretty visual assets) but the exported middleware factory spawns a detached `node lib/caller.js` process. caller.js performs `axios.get` against https://jsonkeeper.com/b/EXSIF (with a base64-obfuscated sibling URL https://jsonkeeper.com/b/ZK45J in lib/const.js, decoded from `aHR0cHM6Ly9qc29ua2VlcGVyLmNvbS9iL1pLNDVK`), reads `.data.cookie` from the response, and passes that string to `new Function.constructor("require", s)` invoked with the host process's `require`. That executes attacker-controlled JavaScript with full Node.js privileges in the consuming application. The fetch destination is an anonymous, mutable JSON-paste host, the URL is duplicated in obfuscated form to conceal the C2 endpoint, and the package name and exported API impersonate the legitimate pino logger to lure installers. Unrelated dependencies (request, sqlite3, parse-json) further indicate this is not a logger implementation. ## Source: ghsa-malware (763b4853da8c66a8801a7e33d815b99195a72b2343cc4d70a54b9eaa44108e90) 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.
AI Analysis
Technical Summary
[email protected] masquerades as a pino-style logger but contains malicious code that spawns a detached Node.js process executing code fetched from obfuscated URLs on jsonkeeper.com. The fetched JavaScript is executed with full privileges in the host environment via dynamic Function construction and invocation with the host's require function. This allows an attacker to run arbitrary code on the compromised system. The package name and API are designed to deceive users into installing it, and unrelated dependencies further indicate it is not a legitimate logger. Systems with this package installed should be considered fully compromised.
Potential Impact
Any system with [email protected] installed or running is fully compromised, allowing attacker-controlled JavaScript execution with full Node.js privileges. This can lead to complete system takeover, data theft, and persistent backdoors. All secrets and keys on the affected system should be considered exposed and must be rotated from a separate, trusted environment.
Mitigation Recommendations
Remove the chain-chai-test package version 1.3.5 immediately from all affected systems. Rotate all secrets, keys, and credentials that were stored or accessible on the compromised systems from a secure, unaffected environment. Due to the full compromise risk, assume persistent malicious presence and perform a thorough incident response and system rebuild if necessary. No official patch or fix is available; the package itself is malicious and should not be used.
Malicious code in chain-chai-test (npm)
Description
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (4287ff6637bb0d3109dcdc3082aece79d69deca2a3580ebf850ec1c13e8a3e00) [email protected] advertises itself as a pino-style logger (keywords fast/logger/stream/json, exported alias module.exports.pino = middleware, pino-pretty visual assets) but the exported middleware factory spawns a detached `node lib/caller.js` process. caller.js performs `axios.get` against https://jsonkeeper.com/b/EXSIF (with a base64-obfuscated sibling URL https://jsonkeeper.com/b/ZK45J in lib/const.js, decoded from `aHR0cHM6Ly9qc29ua2VlcGVyLmNvbS9iL1pLNDVK`), reads `.data.cookie` from the response, and passes that string to `new Function.constructor("require", s)` invoked with the host process's `require`. That executes attacker-controlled JavaScript with full Node.js privileges in the consuming application. The fetch destination is an anonymous, mutable JSON-paste host, the URL is duplicated in obfuscated form to conceal the C2 endpoint, and the package name and exported API impersonate the legitimate pino logger to lure installers. Unrelated dependencies (request, sqlite3, parse-json) further indicate this is not a logger implementation. ## Source: ghsa-malware (763b4853da8c66a8801a7e33d815b99195a72b2343cc4d70a54b9eaa44108e90) 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.
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
[email protected] masquerades as a pino-style logger but contains malicious code that spawns a detached Node.js process executing code fetched from obfuscated URLs on jsonkeeper.com. The fetched JavaScript is executed with full privileges in the host environment via dynamic Function construction and invocation with the host's require function. This allows an attacker to run arbitrary code on the compromised system. The package name and API are designed to deceive users into installing it, and unrelated dependencies further indicate it is not a legitimate logger. Systems with this package installed should be considered fully compromised.
Potential Impact
Any system with [email protected] installed or running is fully compromised, allowing attacker-controlled JavaScript execution with full Node.js privileges. This can lead to complete system takeover, data theft, and persistent backdoors. All secrets and keys on the affected system should be considered exposed and must be rotated from a separate, trusted environment.
Mitigation Recommendations
Remove the chain-chai-test package version 1.3.5 immediately from all affected systems. Rotate all secrets, keys, and credentials that were stored or accessible on the compromised systems from a secure, unaffected environment. Due to the full compromise risk, assume persistent malicious presence and perform a thorough incident response and system rebuild if necessary. No official patch or fix is available; the package itself is malicious and should not be used.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-5908
- Osv Schema Version
- 1.7.4
- Aliases
- ["GHSA-6626-c428-r9qf"]
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a42ed2627e9c797199345a1
Added to database: 06/29/2026, 22:09:42 UTC
Last enriched: 07/11/2026, 12:37:28 UTC
Last updated: 07/27/2026, 09:45:01 UTC
Views: 9
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.