OpenSSF/OSV advisory MAL-2026-4567 confirms this npm version as malicious. On install, scripts/postinstall-message.mjs reads the consumer project's package.json via process.env.INIT_CWD, and if freertc appears in dependencies/devDependencies with any value other than 'latest', it overwrites the entry to 'latest', writes the modified package.json back to disk, and invokes spawnSync('npm', ['install'], { cwd: projectRoot })...
Source
OpenSSF Malicious Packages via OSV
Summary
Malicious code in freertc (npm)
Details
On install, scripts/postinstall-message.mjs reads the consumer project's package.json via process.env.INIT_CWD, and if freertc appears in dependencies/devDependencies with any value other than 'latest', it overwrites the entry to 'latest', writes the modified package.json back to disk, and invokes spawnSync('npm', ['install'], { cwd: projectRoot }). This silently mutates the installer's committed manifest (and lockfile, via the recursive npm install) without consent, converting any pinned version constraint into the mutable 'latest' tag. The effect is that every subsequent install on the consumer's machine — and on every collaborator's machine once the modified package.json is committed — will automatically pull whatever the newest published freertc release happens to be, including any future compromised release. This removes version pinning, the consumer's primary defense against supply-chain attacks on this package, as a direct consequence of installing it. The postinstall hook also performs an outbound fetch to registry.npmjs.org to gather version info as part of the same flow. Independent of the version-rewrite behavior, the package contains additional outbound network calls in bin/freertc.mjs and a ping/network-id pattern in scripts/non-cloudflare-server.mjs that warrant scrutiny but are reachable only via explicit CLI/server invocation, not at install time.
Decision reason
OpenSSF Malicious Packages via OSV confirms freertc@0.1.33 as malicious (MAL-2026-4567): Malicious code in freertc (npm)