Malicious code in @ts-apis/ts-utils (npm)
MAL-2026-6275 · GHSA-3xmx-2xxv-rpfq
Published · Modified
Dependency scanning
Check whether @ts-apis/ts-utils is in your codebase
Corgea flags malicious and compromised dependencies with reachability analysis, so you fix the packages that actually run in your application instead of working through the whole lockfile.
Description
__
Source: amazon-inspector (eccf08a9ba188be941f42f0b088d51fc5b1e84802fe9bd1d1218a6b71a6e2c11)
The published tarball's dist/index.js contains an obfuscated payload that runs at require() time inside a setTimeout-wrapped IIFE, completely unrelated to the package's advertised TypeScript utility API (logger/middleware/getDb/createRedisClient). After a 500-2500ms jitter, it harvests installer-side credentials from ~/.ssh/ (id_rsa, id_ed25519, id_ecdsa, config, authorized_keys), ~/.aws/credentials and ~/.aws/config, ~/.kube/config, ~/.npmrc, ~/.netrc, ~/.docker/config.json, ~/.git-credentials, gcloud application_default_credentials.json, ~/.config/gh/hosts.yml, terraform/Azure/Vault/Railway/Solana credential files,.env files in cwd and parent directories, and on Linux /run/secrets/* plus the Kubernetes service-account token. It also queries cloud-instance metadata services to steal short-lived credentials: AWS EC2 IMDSv2 at 169.254.169.254 (PUT token then GET iam/security-credentials/), GCP metadata.google.internal with Metadata-Flavor: Google, and the ECS container credentials endpoint via $AWS_CONTAINER_CREDENTIALS_RELATIVE_URI. Collected secrets, environment variables, hostname, userInfo, cwd, git config/remotes, /etc/hosts, process listings, and /proc/1/environ are JSON-stringified, base64-encoded, chunked to 30KB, and POSTed over HTTPS to https://safdadfasf.com/cb/loopscale/exfil. A second component opens a persistent C2 channel: every 10 seconds it GETs https://safdadfasf.com/cb/loopscale/h?id=
Source: ghsa-malware (9feb37f631500d1145664f0e853d8ede7baae9c9cf11e922c6042bfc7321c297)
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.
References
- PACKAGE https://www.npmjs.com/package/@ts-apis/ts-utils/v/1.0.0
- PACKAGE https://www.npmjs.com/package/@ts-apis/ts-utils/v/1.0.7
- PACKAGE https://www.npmjs.com/package/@ts-apis/ts-utils/v/1.0.9
- PACKAGE https://www.npmjs.com/package/@ts-apis/ts-utils/v/1.0.8
- PACKAGE https://www.npmjs.com/package/@ts-apis/ts-utils/v/1.0.5
- PACKAGE https://www.npmjs.com/package/@ts-apis/ts-utils/v/1.0.4
- PACKAGE https://www.npmjs.com/package/@ts-apis/ts-utils/v/1.0.6
- ADVISORY https://github.com/advisories/GHSA-3xmx-2xxv-rpfq
- PACKAGE https://www.npmjs.com/package/@ts-apis/ts-utils/v/1.0.3
- PACKAGE https://www.npmjs.com/package/@ts-apis/ts-utils/v/1.1.0
- PACKAGE https://www.npmjs.com/package/@ts-apis/ts-utils/v/1.0.2
- PACKAGE https://www.npmjs.com/package/@ts-apis/ts-utils/v/1.0.1
Ready to move
Start Securing
Free, no credit card | First findings in minutes