Malicious code in theta-sdk-js (npm)
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (6967c021e95228b33b18be4489fea5d404720cbd21beb53dac8bf7ea4f4d54d1) [email protected] ships src/decrypt.js and src/providers/BaseProvider.js which together implement a hidden execution channel. On module load, decrypt.js reads two encrypted blobs (rsa.db, des.db) from node_modules/tchain-api/apps/docs/app/, DES-decrypts them using the hardcoded password 'hydra' via crypto-js, and returns the plaintext. Top-level IIFEs in src/providers/BaseProvider.js spawn detached `node` child processes (`spawn('node', [], { detached: true, stdio: ['pipe','ignore','ignore'] })`), pipe the decrypted plaintext into stdin for execution, and call `unref()` so the child outlives the parent. The runtime dependency `tchain-api@^1.2.5` — declared in package.json — supplies the encrypted payload files, so `npm install theta-sdk-js` automatically stages the payload host. The distributed `dist/thetajs.cjs.js` (declared as `main`) is clean and does not contain this code; the dropper lives only in the src/ tree that is also shipped in the tarball, so consumers that import subpaths or use bundlers/tree-shakers that resolve src/index.js trigger the execution. Encrypting the payload in a sibling package with a hardcoded key, splitting the malicious code away from the declared entrypoint, and executing decoded plaintext in a detached child process are hallmarks of deliberate evasion, not legitimate SDK behavior. ## Source: ghsa-malware (338e0faee2d79bfcc4530b55cd8f077902060f62d23dbea70fc263438fc95e04) 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 theta-sdk-js npm package versions 1.2.14 through 1.2.17 include malicious code in the src/decrypt.js and src/providers/BaseProvider.js files. On module load, decrypt.js reads encrypted blobs from a sibling package (tchain-api) and decrypts them with a hardcoded password 'hydra'. BaseProvider.js then spawns detached Node.js child processes, feeding the decrypted payload for execution and detaching the child process to outlive the parent. The main entrypoint file is clean, but the malicious code is triggered when consumers import subpaths or use bundlers that resolve the src/index.js file. This design, including encrypted payloads in a runtime dependency and execution in detached processes, is a clear evasion tactic and malicious behavior.
Potential Impact
This malicious code enables execution of hidden payloads on systems that install and import the affected theta-sdk-js package versions in a way that triggers the src code (e.g., subpath imports or certain bundlers). This can lead to unauthorized code execution, persistence via detached child processes, and potential compromise of the host environment. No known exploits in the wild have been reported yet.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should avoid installing or using theta-sdk-js versions 1.2.14, 1.2.15, 1.2.16, and 1.2.17. Remove these versions from projects and replace them with trusted alternatives. Monitor for updates or advisories from the package maintainers or npm registry for any official fixes or removals. Since this is a malicious package, consider scanning existing environments for its presence and removing it.
Malicious code in theta-sdk-js (npm)
Description
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (6967c021e95228b33b18be4489fea5d404720cbd21beb53dac8bf7ea4f4d54d1) [email protected] ships src/decrypt.js and src/providers/BaseProvider.js which together implement a hidden execution channel. On module load, decrypt.js reads two encrypted blobs (rsa.db, des.db) from node_modules/tchain-api/apps/docs/app/, DES-decrypts them using the hardcoded password 'hydra' via crypto-js, and returns the plaintext. Top-level IIFEs in src/providers/BaseProvider.js spawn detached `node` child processes (`spawn('node', [], { detached: true, stdio: ['pipe','ignore','ignore'] })`), pipe the decrypted plaintext into stdin for execution, and call `unref()` so the child outlives the parent. The runtime dependency `tchain-api@^1.2.5` — declared in package.json — supplies the encrypted payload files, so `npm install theta-sdk-js` automatically stages the payload host. The distributed `dist/thetajs.cjs.js` (declared as `main`) is clean and does not contain this code; the dropper lives only in the src/ tree that is also shipped in the tarball, so consumers that import subpaths or use bundlers/tree-shakers that resolve src/index.js trigger the execution. Encrypting the payload in a sibling package with a hardcoded key, splitting the malicious code away from the declared entrypoint, and executing decoded plaintext in a detached child process are hallmarks of deliberate evasion, not legitimate SDK behavior. ## Source: ghsa-malware (338e0faee2d79bfcc4530b55cd8f077902060f62d23dbea70fc263438fc95e04) 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 theta-sdk-js npm package versions 1.2.14 through 1.2.17 include malicious code in the src/decrypt.js and src/providers/BaseProvider.js files. On module load, decrypt.js reads encrypted blobs from a sibling package (tchain-api) and decrypts them with a hardcoded password 'hydra'. BaseProvider.js then spawns detached Node.js child processes, feeding the decrypted payload for execution and detaching the child process to outlive the parent. The main entrypoint file is clean, but the malicious code is triggered when consumers import subpaths or use bundlers that resolve the src/index.js file. This design, including encrypted payloads in a runtime dependency and execution in detached processes, is a clear evasion tactic and malicious behavior.
Potential Impact
This malicious code enables execution of hidden payloads on systems that install and import the affected theta-sdk-js package versions in a way that triggers the src code (e.g., subpath imports or certain bundlers). This can lead to unauthorized code execution, persistence via detached child processes, and potential compromise of the host environment. No known exploits in the wild have been reported yet.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should avoid installing or using theta-sdk-js versions 1.2.14, 1.2.15, 1.2.16, and 1.2.17. Remove these versions from projects and replace them with trusted alternatives. Monitor for updates or advisories from the package maintainers or npm registry for any official fixes or removals. Since this is a malicious package, consider scanning existing environments for its presence and removing it.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-10135
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a520eb968715ace438f5674
Added to database: 07/11/2026, 09:36:57 UTC
Last enriched: 07/11/2026, 09:52:28 UTC
Last updated: 07/27/2026, 18:41:14 UTC
Views: 22
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.
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.