ai-node-relay
This report shows the evidence for ai-node-relay@0.0.2. 2 of 2 known versions are blocked or flagged. See all versions.
OpenSSF/OSV Malicious Advisory
imported 4mo ago · by OpenSSF/OSVOpenSSF/OSV advisory MAL-2026-6518 confirms this npm version as malicious.
Advisory
MAL-2026-6518
Source
OpenSSF Malicious Packages via OSV
Summary
Malicious code in ai-node-relay (npm)
Details
ai-node-relay ships dist/index.js as its npm main entry, processed with javascript-obfuscator (string-array rotation, _0x-prefixed identifiers, base64 string decoder). The file ends with a top-level main() invocation that boots a Fastify server bound to 0.0.0.0:4001 and starts a heartbeat loop — any consumer who does `require('ai-node-relay')` immediately spawns a public-interface listener rather than getting a library handle. On startup the relay collects host fingerprint data (os.cpus, totalmem/freemem, platform, release, arch, uptime) and POSTs it with nodeId/url to `${GATEWAY_URL}/api/internal/node/register`; the destination is operator-configured via env var (default http://localhost:3007), matches the documented registration flow, and does not include installer secrets or an env-var dump. During periodic syncFromGateway, the gateway's JSON response is allowed to overwrite process.env.ENCRYPTION_KEY, ENCRYPTION_SECRET, ENCRYPTION_SALT, ENCRYPTION_AAD, and ENCRYPTION_ALGORITHM in the running process — a legitimate control-plane behavior given the operator chose the gateway, but one that materially expands the trust placed in whatever URL is configured. There is no install-time lifecycle hook, no fetch-and-execute of remote code, no credential scraping from ~/.aws/~/.ssh/~/.npmrc, and no hardcoded attacker destination. The combined pattern (obfuscation hiding the control flow + require()-time server bind to 0.0.0.0 + gateway-driven mutation of crypto material) warrants human review of maintainer trust and README accuracy before recommending the package, but it does not by itself constitute a supply-chain attack against installers.
## Source: ghsa-malware (15dbf12bf77945563589af277a5a11fc548f282dfb1ab8fb8b0e8253d28ec854) 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.
Source & flagged code
0 flagged · loading sourceNo flagged code excerpts are attached to this scan.
Findings
1 High
HighOsv Malicious Advisory
Affected versions and remediation
This report applies to ai-node-relay@0.0.2.
The same advisory and Firewall decision cover 2 recorded versions
0.0.1, 0.0.2
The versions list below shows the verdict for each recorded version.
- Avoid installing ai-node-relay@0.0.2. Remove it from direct dependencies and check your lockfile for transitive copies.
- Choose an independently verified alternative or release. This report does not establish that other versions are safe.
- If this version ran, investigate the affected machine and build environment. Rotate credentials it could access and rebuild from a trusted environment.
Evidence last updated: .
Source advisory published: .
This report uses published external intelligence. The advisory does not provide a separate source-code analysis for each listed version.
Think this verdict is wrong? Dispute it on GitHub or read how reports are produced.