Malicious code in ai-node-relay (npm)
The ai-node-relay npm package contains obfuscated malicious code that, upon being required, immediately starts a public Fastify server listening on all interfaces and collects host fingerprint data. It sends this data to a configurable gateway URL and allows the gateway to overwrite encryption-related environment variables at runtime. While it does not perform credential scraping or remote code execution, the behavior expands trust to the configured gateway and poses a significant risk. The package is considered fully compromising to any system where it is installed or running.
AI Analysis
Technical Summary
The ai-node-relay npm package's main entry point is an obfuscated JavaScript file that, when required, launches a Fastify server bound to 0.0.0.0:4001 and initiates a heartbeat loop. It collects host fingerprint information (CPU, memory, platform, uptime) and posts it to a gateway URL configurable via environment variables. The gateway's JSON response can overwrite critical encryption environment variables in the running process, effectively allowing remote control over cryptographic material. There is no evidence of credential scraping or remote code fetching, and no hardcoded attacker endpoints. Despite this, the package's behavior of binding a public server on require and allowing runtime environment mutation constitutes a severe trust and security risk. The package is flagged as malicious and any system with it installed should be considered fully compromised.
Potential Impact
Any system with the ai-node-relay package installed or running is considered fully compromised. The package exposes a public server interface immediately upon being required, potentially allowing unauthorized access. It collects and transmits detailed host fingerprint data to a remote gateway and permits that gateway to overwrite encryption keys and secrets in the environment, which could lead to further compromise or unauthorized cryptographic operations. Secrets and keys stored on the compromised system should be rotated immediately from a separate, trusted system. Removal of the package alone does not guarantee elimination of all malicious components or backdoors.
Mitigation Recommendations
There is no official patch or fix available for this malicious package. The recommended mitigation is to immediately remove the ai-node-relay package from all affected systems. Treat any system with this package installed or running as fully compromised. Rotate all secrets and cryptographic keys from a different, trusted environment. Conduct a thorough security assessment and remediation of the affected systems. Exercise caution and perform human review before trusting or installing this package or similar packages from untrusted sources.
Malicious code in ai-node-relay (npm)
Description
The ai-node-relay npm package contains obfuscated malicious code that, upon being required, immediately starts a public Fastify server listening on all interfaces and collects host fingerprint data. It sends this data to a configurable gateway URL and allows the gateway to overwrite encryption-related environment variables at runtime. While it does not perform credential scraping or remote code execution, the behavior expands trust to the configured gateway and poses a significant risk. The package is considered fully compromising to any system where it is installed or running.
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 ai-node-relay npm package's main entry point is an obfuscated JavaScript file that, when required, launches a Fastify server bound to 0.0.0.0:4001 and initiates a heartbeat loop. It collects host fingerprint information (CPU, memory, platform, uptime) and posts it to a gateway URL configurable via environment variables. The gateway's JSON response can overwrite critical encryption environment variables in the running process, effectively allowing remote control over cryptographic material. There is no evidence of credential scraping or remote code fetching, and no hardcoded attacker endpoints. Despite this, the package's behavior of binding a public server on require and allowing runtime environment mutation constitutes a severe trust and security risk. The package is flagged as malicious and any system with it installed should be considered fully compromised.
Potential Impact
Any system with the ai-node-relay package installed or running is considered fully compromised. The package exposes a public server interface immediately upon being required, potentially allowing unauthorized access. It collects and transmits detailed host fingerprint data to a remote gateway and permits that gateway to overwrite encryption keys and secrets in the environment, which could lead to further compromise or unauthorized cryptographic operations. Secrets and keys stored on the compromised system should be rotated immediately from a separate, trusted system. Removal of the package alone does not guarantee elimination of all malicious components or backdoors.
Mitigation Recommendations
There is no official patch or fix available for this malicious package. The recommended mitigation is to immediately remove the ai-node-relay package from all affected systems. Treat any system with this package installed or running as fully compromised. Rotate all secrets and cryptographic keys from a different, trusted environment. Conduct a thorough security assessment and remediation of the affected systems. Exercise caution and perform human review before trusting or installing this package or similar packages from untrusted sources.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-6518
- Osv Schema Version
- 1.7.4
- Aliases
- ["GHSA-25p7-8xj5-25qp"]
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a3ef7b127e9c79719ffb92a
Added to database: 06/26/2026, 22:05:37 UTC
Last enriched: 07/09/2026, 10:48:25 UTC
Last updated: 07/31/2026, 02:12:13 UTC
Views: 39
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.