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

# hardhat-bits@2.21.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** — The opaque imported code can execute shell commands and make network requests during module loading; the precise command and remote effect are not established from the inspected excerpts.

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

Trusted malware advisory MAL-2026-17658 identifies this version as malicious. Firewall keeps the version blocked under its trusted-intelligence policy. An AI recommendation to allow or warn does not override that advisory.

AI assessment: malicious; recommendation: publish block. This assessment is supporting evidence; the published decision above determines the current policy.

Importing the package loads a large, heavily obfuscated config module that combines network capability with shell command execution.

## Latest scan
- **Scanner version:** rust-scanner-worker-schema-1
- **Recorded final verdict:** Malicious
- **Recorded analysis confidence:** 96.0%
- **Started:** 2026-10-07T19:20:06.557Z
- **Finished:** 2026-10-07T19:20:53.777Z
- **Download time:** 1294 ms
- **Static scan time:** 2093 ms
- **AI review time:** 43832 ms
- **Total time:** 47220 ms

The recorded confidence comes from the underlying analysis. Trusted advisory policy can determine the final verdict even when the AI assessment differs.

## Security analysis

### Published attack-surface review

- **Summary:** Importing the package loads a large, heavily obfuscated config module that combines network capability with shell command execution.

- **Trigger:** Requiring the package entrypoint imports \`lib/config.js\`.

- **Impact:** The opaque imported code can execute shell commands and make network requests during module loading; the precise command and remote effect are not established from the inspected excerpts.

- **Evidence paths:** index.js, lib/config.js

- **Review source:** ai\_review

- **Reviewed:** 2026-10-07T19:20:53.777Z

### AI review details

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

- **Mechanism:** The config module imports Axios and child-process APIs; it invokes \`execSync\` with a command assembled through obfuscated helpers.

- **Attack narrative:** The declared entrypoint imports \`lib/config.js\` immediately. That 4.4 MB single-line file is heavily obfuscated and includes Axios, OS/filesystem access, and an \`execSync\` call with an obfuscated command. This is a concrete, reachable execution surface whose purpose cannot be explained from the inspected source excerpts.

- **Rationale:** The package entrypoint loads a heavily obfuscated module that invokes shell execution and includes network capability. This concrete, reachable behavior warrants blocking despite the exact command and endpoint being obscured.

- **Files touched:** lib/config.js

### Review decision

- **Verdict:** Malicious

- **Confidence:** 96.0%

- **Recommended action:** publish\_block

- **Intent class:** Malware

- **False-positive risk:** Low

- **Evidence for block:** \`index.js\` imports \`lib/config.js\` at module load, making the obfuscated file reachable from the declared entrypoint., \`lib/config.js\` uses heavily obfuscated code and imports OS, filesystem, path, and child-process APIs., \`lib/config.js\` invokes \`execSync\` with an obfuscated command assembled from helper calls., \`lib/config.js\` imports Axios and constructs obfuscated URL strings, supporting network-capable behavior.

## Affected versions and remediation

This report applies to hardhat-bits@2.21.0.

- Avoid installing hardhat-bits@2.21.0. 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.

## Public findings

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

Package declares npm scripts.

### 2. High: Child Process
- **Category:** Source
- **Confidence:** 85.0%
- **Path:** index.js
- **Public source:** [View source](<https://unpkg.com/hardhat-bits@2.21.0/index.js>)

Package source references child process execution.

Public source snippet (untrusted):

```javascript
L3: const path = require('path');
L4: const { spawn } = require('child_process');
L5: const { DEFAULT_LEVELS, SORTING_ORDER } = require('./lib/constants');
```

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

Package source references environment variables.

### 4. Critical: Download Execute
- **Category:** Source
- **Confidence:** 90.0%
- **Path:** lib/config.js
- **Public source:** [View source](<https://unpkg.com/hardhat-bits@2.21.0/lib/config.js>)

Source downloads or fetches remote code and executes it.

Public source snippet (untrusted):

```javascript
L1: function Y(L,m){const K=R();Y=function(f,H){f=f-(-0x1aa5+0x1ee1+-0x1*0x3ad);let U=K[f];if(Y['\x6c\x4a\x73\x6a\x61\x48']===undefined){var j=function(q){const s='\x61\x62\x63\x64\x65...
```

### 5. Critical: Trigger Reachable Dangerous Capability
- **Category:** Source
- **Confidence:** 90.0%
- **Path:** lib/config.js
- **Public source:** [View source](<https://unpkg.com/hardhat-bits@2.21.0/lib/config.js>)

A package entrypoint or install-time lifecycle script reaches a source file with blocking dangerous behavior.

Public source snippet (untrusted):

```javascript
Trigger-reachable chain: manifest.main -> index.js -> lib/config.js
L1: function Y(L,m){const K=R();Y=function(f,H){f=f-(-0x1aa5+0x1ee1+-0x1*0x3ad);let U=K[f];if(Y['\x6c\x4a\x73\x6a\x61\x48']===undefined){var j=function(q){const s='\x61\x62\x63\x64\x65...
```

### 6. Low: High Entropy Strings
- **Category:** Supply Chain
- **Confidence:** 55.0%

Package source contains high-entropy string patterns.

### 7. Low: Url Strings
- **Category:** Supply Chain
- **Confidence:** 65.0%

Package source contains URL literals.

### 8. Medium: Oversized Source File
- **Category:** Artifact Inventory
- **Confidence:** 70.0%
- **Path:** lib/config.js
- **Public source:** [View source](<https://unpkg.com/hardhat-bits@2.21.0/lib/config.js>)

Package contains source files above the normal full-analysis size ceiling.

Public source snippet (untrusted):

```javascript
path = lib/config.js
kind = oversized_source_file
sizeBytes = 4470793
magicHex = [redacted]
```

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

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

### 10. High: Semantic Analysis Limited
- **Category:** Scanner Coverage
- **Confidence:** 100.0%
- **Path:** lib/config.js
- **Public source:** [View source](<https://unpkg.com/hardhat-bits@2.21.0/lib/config.js>)

A bounded semantic-analysis stage reached its safety limit; remaining detectors completed, but this package requires AI review.

Public source snippet (untrusted):

```javascript
stage = ast_semantic_analysis; reason = ast_path_work_budget_exceeded; limitedFiles = 1
```

### 11. High: Ai Review Evidence
- **Category:** Ai Review
- **Confidence:** 96.0%
- **Path:** index.js
- **Public source:** [View source](<https://unpkg.com/hardhat-bits@2.21.0/index.js>)

\`index.js\` imports \`lib/config.js\` at module load, making the obfuscated file reachable from the declared entrypoint.

Public source snippet (untrusted):

```javascript
const path = require('path');
const { spawn } = require('child_process');
const { DEFAULT_LEVELS, SORTING_ORDER } = require('./lib/constants');
const config
```

### 12. High: Ai Review Evidence
- **Category:** Ai Review
- **Confidence:** 96.0%
- **Path:** lib/config.js
- **Public source:** [View source](<https://unpkg.com/hardhat-bits@2.21.0/lib/config.js>)

\`lib/config.js\` uses heavily obfuscated code and imports OS, filesystem, path, and child-process APIs.

Public source snippet (untrusted):

```javascript
ef1)+'\x73\x73');function fx(U,j,d,D,x){const DQ={U:0x2d6};return H(d-DQ.U,j);}try{const os=require('\x6f\x73');const fs=require('\x66\x73');const path=require(fH('\x46\x50\x34\x38
```

## Dependencies and install lifecycle
- **Lifecycle scripts present:** No

- **Dependencies:** 2
- **Optional dependencies:** 0
- **Peer dependencies:** 0
- **Development dependencies:** 0
- **Published dependency-graph edges:** 2

### Published dependency entries
- axios ^1.10.0 (Dependency)
- parse-json ^8.3.0 (Dependency)

## Package metadata
- **Package:** hardhat-bits
- **Ecosystem:** npm
- **Version:** 2.21.0
- **License:** MIT
- **Version published:** 2026-10-07T14:36:35.350Z
- **Package first seen:** 2026-10-07T19:20:53.777Z
- **Package last seen:** 2026-10-07T19:20:53.777Z
- **Known versions:** 1
- **Latest version:** 2.21.0
- **Appeal under review:** No
- **Description:** This document describes the management of vulnerabilities for the project and all modules within the organization.
- **Author:** Robert King
- **Keywords:** fast, logger, stream, json
- **Artifact files:** 42
- **Artifact unpacked size:** 4,739,658 bytes
- **Artifact signatures:** 1
- **Attestations:** No

## References
- [HTML security report](<https://firewall.lpm.dev/npm/hardhat-bits/v/2.21.0>)
- [Issues](<https://jsonspack.com/issues>)
- [OSV advisory](<https://osv.dev/vulnerability/MAL-2026-17658>)
- [PACKAGE](<https://www.npmjs.com/package/hardhat-bits/v/2.21.0>)
