Malicious code in ai-texts-utils (npm)
The npm package ai-texts-utils@1.0.3 contains malicious obfuscated code bundled within its ai-texts dependency. The payload executes on module import and performs host fingerprinting via unreferenced os module logic hidden in obfuscated string-array rotation and anti-debug wrappers.
- Disclosed
- Last updated
- Blast radius
- Unknown; depends on adoption of ai-texts-utils@1.0.3
- Ecosystems
- Attack vectors
- Affected entities
- ai-texts-utils · 1.0.3
The npm package ai-texts-utils@1.0.3 was published with malicious code embedded in its bundled ai-texts dependency. The package exports legitimate string-normalization helpers (toText, normalizeText) but includes a heavily obfuscated payload appended to the module.
The obfuscated code employs multiple anti-analysis techniques: a 43-entry rotated string array, a custom base64 decoder, console method hijacking, and self-defending wrappers. Top-level immediately-invoked function expressions (IIFEs) execute on require(), reconstructing the global object via Function() and dereferencing encoded entries at load time.
The bundled README documents a getOsVersion() export and includes require('os'), but the plaintext module.exports does not surface this function. The unreferenced os import indicates host-fingerprinting logic resides in the obfuscated tail, executing silently on import. This pattern—benign code with appended obfuscated payload—is characteristic of malicious package injection rather than legitimate code protection.
The incident was identified and credited to the OpenSSF malicious-packages repository.
Indicators of compromise
- Packages
- ai-texts-utils@1.0.3
Remediation
- Remove ai-texts-utils@1.0.3 from all projects immediately
- Audit package-lock.json and yarn.lock files for any installations of ai-texts-utils@1.0.3
- Review npm audit logs for any systems that installed this package
- If installed, assume host fingerprinting data may have been exfiltrated; consider rotating credentials and monitoring for suspicious activity
- Use npm's package security features to block this version
- Verify no other versions of ai-texts-utils contain similar payloads before re-adopting
Sources
- GitHub Advisory GHSA-2gmj-4q5j-qpxf · GitHub Advisory Database
Cite this entry
"Malicious code in ai-texts-utils (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 19, 2026; last updated August 19, 2026. https://supplychainattack.org/incident/malicious-code-in-ai-texts-utils-npm-erivjo
Suggest a correction
Found an error or have a newer source? Corrections to factual errors take priority over new entries.
Related incidents
- resolvedcritical
Malicious code in rust-testing-utils (npm)
The npm package rust-testing-utils contained malicious code that impersonates the pino logger and executes remotely-fetched code with arbitrary privileges. The package spawns a child process that decodes a hardcoded URL, fetches attacker-controlled content, and executes it via Function constructor with full module-loading capability.
npmCompromised packageMalicious commit - containedcritical
Malicious code in stillm4ddpocs-demo-sprocket (npm)
The npm package stillm4ddpocs-demo-sprocket version 999.9.12 contains malicious code that exfiltrates system and project metadata via multiple channels (HTTPS, HTTP, and DNS) to a hardcoded callback host. The package uses a high version number to exploit dependency-confusion attacks against organizations with internal packages of the same name.
npmCompromised packageDependency confusion - containedcritical
Malicious code in @syncraft-labs/react (npm)
The npm package @syncraft-labs/react contained obfuscated malicious code in its ESM distribution that implements the EtherHiding pattern, fetching and executing arbitrary code from an Ethereum smart contract via RPC endpoints. The tampering occurred post-build in the dist/index.js artifact.
npmCompromised package - containedcritical
Malware in hydration-dim-kit
Malware was discovered in the npm package hydration-dim-kit. Any computer with this package installed or running should be considered fully compromised. All secrets and keys must be rotated immediately from a different computer.
npmCompromised package