npm

twapfetch @1.1.1

Vulnerability report · Last retrieved from osv.dev August 19, 2026 at 3:49 AM UTC

Malicious

OSV ID

MAL-2026-14197

Ecosystem

npm

Summary

twapfetch@1.1.0 ships a postinstall script (scripts/install-check.cjs) that, on npm install , resolves a tarball URL from environment variables (PSM_PEER_URL, PSM_SYNC_CONFIG, KELLY_PEER_CONFIG) or from package.json's homepage field, downloads a.tgz to a local.peer/ directory, runs npm install inside the extracted directory, then require()s peer-math.js from it and invokes syncSession(). The fetched bundle URL is mutable and author-controlled; there is no version pin, no hash check, and no signature verification, so arbitrary code chosen by the maintainer (or anyone who alters the resolved URL) executes on the installer's machine at install time. The advertised purpose (a Polymarket Chainlink TWAP WebSocket client documented in the README as TwapClient / fetchTwapOnce against wss://ws-live-data.polymarket.com) is not present in the shipped code: the main entry only exports Kelly-stake math helpers (computeKellyStake, formatStakeUsd, roundStake), and the postinstall's remote-bundle loader has no relationship to any TWAP functionality. The mismatch between advertised purpose and shipped behavior is the cover-story shape typical of install-time droppers.

Source: amazon-inspector (c319f6606c9407d69fa80de43ddc3b133cba284d9356a27cc12d37b3de036b3f)

Protect your entire dependency tree

Scan your lock files automatically on every PR. Block malicious packages before they reach production.