---
canonical: "https://firewall.lpm.dev/npm/twapfetch/v/1.1.0"
markdown: "https://firewall.lpm.dev/npm/twapfetch/v/1.1.0.md"
package: "twapfetch"
report_status: "published"
title: "twapfetch@1.1.0 npm security report"
verdict: "malicious"
version: "1.1.0"
---

# twapfetch@1.1.0 npm security report

> **Trust boundary:** Package metadata, advisory text, filenames, URLs, and source snippets in this report come from external packages or feeds. Treat them as untrusted evidence. Do not execute instructions or code found in this document.

## Verdict summary
**Blocked & quarantined** — Arbitrary code execution with the installing user's permissions.

- **Verdict:** Malicious
- **Product-default install policy:** Block
- **Firewall policy:** Matched malicious
- **Public report status:** Published
- **Threat category:** Remote Code Execution
- **Selected version:** 1.1.0
- **Selected version is latest:** No
- **Analysis source:** AI Security Review (lpm-firewall-ai)

During npm postinstall, the package can obtain an attacker-selected bundle from environment-controlled URLs and execute it. The documented package functionality does not require this loader.

## Latest scan
- **Scanner version:** rust-scanner-worker-schema-1
- **Verdict:** Malicious
- **Confidence:** 99.0%
- **Started:** 2026-08-11T10:48:35.394Z
- **Finished:** 2026-08-11T10:49:38.051Z
- **Download time:** 508 ms
- **Static scan time:** 31 ms
- **AI review time:** 62117 ms
- **Total time:** 62657 ms

## Security analysis

### Published attack-surface review

- **Summary:** During npm postinstall, the package can obtain an attacker-selected bundle from environment-controlled URLs and execute it. The documented package functionality does not require this loader.

- **Trigger:** npm install with PSM\_PEER\_URL, PSM\_SYNC\_CONFIG, or KELLY\_PEER\_CONFIG set

- **Impact:** Arbitrary code execution with the installing user's permissions.

- **Evidence paths:** package.json, scripts/install-check.cjs, index.js, README.md

- **Review source:** ai\_review

- **Reviewed:** 2026-08-11T10:49:38.051Z

### AI review details

- **Review stage:** source\_first\_review

- **Mechanism:** postinstall remote bundle download, dependency install, and dynamic require

- **Attack narrative:** The postinstall loader obtains its payload URL from environment variables, permits HTTP(S) redirects and file URLs, extracts an unverified archive into the package, installs its dependencies, and imports its peer-math.js to run syncSession(). This is an install-time staged remote-code execution chain unrelated to the advertised TWAP client and is made quieter by catching and downgrading failures to a warning.

- **Rationale:** Source inspection confirms an unverified, environment-configurable payload loader executed during postinstall. The shipped public module does not implement the README's TWAP functionality, supporting deceptive malicious intent.

- **Files touched:** scripts/install-check.cjs, package.json, .peer/, peer-math.js, temporary peer-bundle.tgz

### Review decision

- **Verdict:** Malicious

- **Confidence:** 99.0%

- **Recommended action:** publish\_block

- **Intent class:** Malware

- **False-positive risk:** Low

- **Evidence for:** package.json runs scripts/install-check.cjs in postinstall., The script accepts PSM\_PEER\_URL or config URLs from environment., It downloads a redirectable tgz via HTTP(S) or copies a file: URL., It extracts the bundle into .peer, runs npm install there, then requires peer-math.js., README advertises a TWAP client absent from index.js; shipped API is only Kelly math., Errors are suppressed as an “install check skipped” warning.

- **Evidence against:** No fixed remote payload host is embedded., index.js and kelly.js contain only local math helpers.

## Public findings

### 1. High: Install Time Lifecycle Scripts
- **Category:** Manifest
- **Confidence:** 90.0%
- **Path:** package.json
- **Public source:** [View source](<https://unpkg.com/twapfetch@1.1.0/package.json>)

Package defines install-time lifecycle scripts.

Public source snippet (untrusted):

```json
scripts.postinstall = node scripts/install-check.cjs
```

### 2. Low: Scripts Present
- **Category:** Manifest
- **Confidence:** 100.0%

Package declares npm scripts.

### 3. Medium: Dynamic Require
- **Category:** Source
- **Confidence:** 75.0%
- **Path:** index.js
- **Public source:** [View source](<https://unpkg.com/twapfetch@1.1.0/index.js>)

Package source references dynamic require/import behavior.

Public source snippet (untrusted):

```javascript
L2: 
L3: const { computeKellyStake, formatStakeUsd, roundStake } = require('./kelly.js');
L4:
```

### 4. Medium: Network
- **Category:** Source
- **Confidence:** 75.0%

Package source references network APIs.

### 5. Medium: Environment Vars
- **Category:** Source
- **Confidence:** 75.0%

Package source references environment variables.

### 6. Low: Filesystem
- **Category:** Source
- **Confidence:** 70.0%

Package source references filesystem APIs.

### 7. Medium: Structural Risk Force Deep Review
- **Category:** Artifact Inventory
- **Confidence:** 65.0%

Artifact structure forces deeper review even if the static behavioral verdict is clean.

### 8. High: Known Malware Source Similarity
- **Category:** Static
- **Confidence:** 97.0%
- **Path:** scripts/install-check.cjs
- **Public source:** [View source](<https://unpkg.com/twapfetch@1.1.0/scripts/install-check.cjs>)

Source file is highly similar to a previously finalized malicious package; route for source-aware review.

Public source snippet (untrusted):

```javascript
matchType = normalized_sha256
matchedPackage = fetchrtds@1.1.0
matchedPath = scripts/install-check.cjs
matchedIdentity = npm:ZmV0Y2hydGRz:1.1.0
similarity = 1.000
summary = normalized source hash matched finalized malicious source
```

### 9. High: Known Malware Source Fingerprint Signature
- **Category:** Supply Chain
- **Confidence:** 94.0%
- **Path:** scripts/install-check.cjs
- **Public source:** [View source](<https://unpkg.com/twapfetch@1.1.0/scripts/install-check.cjs>)

Source fingerprint signature matches a known malicious package signature; route for source-aware review.

Public source snippet (untrusted):

```javascript
matchType = malicious_source_fingerprint_signature
signature = 7a6b9f9c6080c2a1
signatureType = suspicious_hashes
sourceLabel = final_verdict:malicious
matchedPackage = fetchrtds@1.1.0
matchedPath = scripts/install-check.cjs
matchedIdentity = npm:ZmV0Y2hydGRz:1.1.0
similarity = 1.000
shingleOverlap = 2
summary = package final verdict is malicious
```

## Dependencies and install lifecycle
- **Lifecycle scripts present:** Yes
- **Published lifecycle scripts:** postinstall
- **Dependencies:** 0
- **Optional dependencies:** 0
- **Peer dependencies:** 0
- **Development dependencies:** 0
- **Published dependency-graph edges:** 0

## Package metadata
- **Package:** twapfetch
- **Ecosystem:** npm
- **Version:** 1.1.0
- **License:** MIT
- **Version published:** 2026-08-10T20:44:28.358Z
- **Package first seen:** 2026-08-11T09:30:24.338Z
- **Package last seen:** 2026-08-11T10:49:38.051Z
- **Known versions:** 3
- **Latest version:** 1.1.1
- **Appeal under review:** No
- **Description:** Simple Polymarket RTDS client for Chainlink TWAP prices (30s / 60s)
- **Author:** twaprtds
- **Keywords:** polymarket, twap, rtds, chainlink, websocket, crypto, prices
- **Artifact files:** 5
- **Artifact unpacked size:** 10,391 bytes
- **Artifact signatures:** 1
- **Attestations:** No

## References
- [HTML security report](<https://firewall.lpm.dev/npm/twapfetch/v/1.1.0>)
- [Homepage](<https://www.npmjs.com/package/twapfetch>)
