Advisory

MAL-2026-14197

Also known as: GHSA-vfw8-w58v-xv38

Malicious package Its source marks this package as malicious: it is not a vulnerability in a legitimate one.

Summary

Malicious code in twapfetch (npm)

Details

---
_-= Per source details. Do not edit below this line.=-_

Source: amazon-inspector (c319f6606c9407d69fa80de43ddc3b133cba284d9356a27cc12d37b3de036b3f)
[email protected] 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: ghsa-malware (3433e27e57dbfc28f127aeb9667599b30ec3cb28214918fbc7792d4f5e65dab0)
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.

Severity

Not rated by the source.

Dates

Published
2026-08-19 01:16 UTC
Modified
2026-09-04 06:45 UTC

Affected packages and fixes

twapfetch

npm · All systems

Affected

  • introduced 0 (semver)

Fixed versions

None listed

Fix

No fixed version is listed.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: OpenSSF Malicious Packages · Apache-2.0

Sources & licences