Malicious code in chai-sdk (npm)
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (9192d163b3814064c95a23cb11e218732346628f3109517aab7697c2dcb6d016) On require, index.js spawns a detached background node process that runs lib/initializeCaller.js. That module axios.get()s a base64-obfuscated URL (decodes to https://amethyst-lorrin-26.tiiny.site/index.json) and passes the response's `cookie` field to `new Function('require',...)` which is then invoked with the real `require`, giving the remote operator arbitrary Node.js execution inside the installer's process. The URL is stored as a base64 blob decoded via atob() and wrapped in a function named `initializeCaller` with comments framing it as routine middleware — deliberate cover for the exfiltration/execution primitive. The package is published as `chai-sdk` but its entrypoint exports an object named `pino` with pino's DEFAULT_LEVELS, messageKey, and mirror files (lib/proto.js, lib/multistream.js, lib/redaction.js), masquerading as the popular pino logger so consumers integrate it as a benign logging dependency. Import-time fetch is from an anonymous, mutable tiiny.site host with no pinning, hash, or signature — whatever JavaScript the operator serves runs with the consumer's Node privileges. ## Source: ghsa-malware (73f55ea2148f54488c6dd557e27e14ff69b4368dac55afc8cb336fc3bc59c853) 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
The npm package 'chai-sdk' has been identified as containing malicious code. Installation or execution of this package results in a full compromise of the host system, potentially allowing an attacker to gain complete control. Due to the severity of the compromise, all sensitive credentials on the affected system must be considered exposed and rotated from a secure environment. The malicious package should be removed; however, because the attacker may have established persistent access or installed additional malware, removal of the package does not ensure complete remediation.
Potential Impact
Full system compromise on any computer with the 'chai-sdk' package installed or running. All secrets and keys stored on the compromised system are at risk and should be considered exposed. The attacker may have persistent access beyond the presence of the package itself.
Mitigation Recommendations
Remove the 'chai-sdk' package immediately. Rotate all secrets and keys stored on the compromised system from a different, secure computer. Because the system may be fully compromised, consider rebuilding or replacing the affected system to ensure complete remediation. Patch status is not applicable as this is a malicious package rather than a vulnerability with a vendor fix.
Malicious code in chai-sdk (npm)
Description
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (9192d163b3814064c95a23cb11e218732346628f3109517aab7697c2dcb6d016) On require, index.js spawns a detached background node process that runs lib/initializeCaller.js. That module axios.get()s a base64-obfuscated URL (decodes to https://amethyst-lorrin-26.tiiny.site/index.json) and passes the response's `cookie` field to `new Function('require',...)` which is then invoked with the real `require`, giving the remote operator arbitrary Node.js execution inside the installer's process. The URL is stored as a base64 blob decoded via atob() and wrapped in a function named `initializeCaller` with comments framing it as routine middleware — deliberate cover for the exfiltration/execution primitive. The package is published as `chai-sdk` but its entrypoint exports an object named `pino` with pino's DEFAULT_LEVELS, messageKey, and mirror files (lib/proto.js, lib/multistream.js, lib/redaction.js), masquerading as the popular pino logger so consumers integrate it as a benign logging dependency. Import-time fetch is from an anonymous, mutable tiiny.site host with no pinning, hash, or signature — whatever JavaScript the operator serves runs with the consumer's Node privileges. ## Source: ghsa-malware (73f55ea2148f54488c6dd557e27e14ff69b4368dac55afc8cb336fc3bc59c853) 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
The npm package 'chai-sdk' has been identified as containing malicious code. Installation or execution of this package results in a full compromise of the host system, potentially allowing an attacker to gain complete control. Due to the severity of the compromise, all sensitive credentials on the affected system must be considered exposed and rotated from a secure environment. The malicious package should be removed; however, because the attacker may have established persistent access or installed additional malware, removal of the package does not ensure complete remediation.
Potential Impact
Full system compromise on any computer with the 'chai-sdk' package installed or running. All secrets and keys stored on the compromised system are at risk and should be considered exposed. The attacker may have persistent access beyond the presence of the package itself.
Mitigation Recommendations
Remove the 'chai-sdk' package immediately. Rotate all secrets and keys stored on the compromised system from a different, secure computer. Because the system may be fully compromised, consider rebuilding or replacing the affected system to ensure complete remediation. Patch status is not applicable as this is a malicious package rather than a vulnerability with a vendor fix.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-6931
- Osv Schema Version
- 1.7.4
- Aliases
- ["GHSA-xc9r-f5wv-cvxx"]
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a4e4f19c9d9e3dbe328ec58
Added to database: 07/08/2026, 13:22:33 UTC
Last enriched: 07/08/2026, 13:55:43 UTC
Last updated: 07/31/2026, 11:01:19 UTC
Views: 57
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.