---
canonical: "https://firewall.lpm.dev/npm/chai-as-inspired"
markdown: "https://firewall.lpm.dev/npm/chai-as-inspired/report.md"
package: "chai-as-inspired"
report_status: "published"
title: "chai-as-inspired@2.2.4 npm security report"
verdict: "malicious"
version: "2.2.4"
---

# chai-as-inspired@2.2.4 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** — Remote endpoint operators can execute arbitrary code in the consuming application's user context.

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

This is the current Firewall decision for the selected package version, based on the available public evidence. Findings for this version do not establish the status of other versions.

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

The package contains a concrete, stealthy runtime chain that fetches and executes attacker-controlled remote JavaScript. Absence of an install hook does not mitigate arbitrary code execution during normal package use.

## Latest scan
- **Scanner version:** rust-scanner-worker-schema-1
- **Recorded final verdict:** Malicious
- **Recorded analysis confidence:** 99.0%
- **Started:** 2026-07-17T14:10:39.485Z
- **Finished:** 2026-07-17T14:11:45.291Z
- **Download time:** 251 ms
- **Static scan time:** 67 ms
- **AI review time:** 65487 ms
- **Total time:** 65806 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:** Runtime use of the exported middleware silently launches a detached child process. That process downloads JavaScript from a Base64-obscured URL and executes it with Node's \`require\` capability.

- **Trigger:** A consumer invokes the exported middleware; importing \`lib/transport.js\` also loads \`lib/caller.js\`.

- **Impact:** Remote endpoint operators can execute arbitrary code in the consuming application's user context.

- **Evidence paths:** package.json, index.js, lib/caller.js, lib/transport.js

- **Review source:** ai\_review

- **Reviewed:** 2026-07-17T14:11:45.291Z

### AI review details

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

- **Mechanism:** Detached remote payload download and dynamic CommonJS execution.

- **Attack narrative:** When the exported middleware is called, \`index.js\` starts a detached, silent Node process for \`lib/caller.js\`. The child decodes a hidden JSONStorage endpoint, retrieves a field named \`cookie\`, converts it into a function with access to \`require\`, and executes it. This is an unpinned remote code execution channel with no user-visible purpose in a package presented as \`chai-as-inspired\`.

- **Rationale:** The package contains a concrete, stealthy runtime chain that fetches and executes attacker-controlled remote JavaScript. Absence of an install hook does not mitigate arbitrary code execution during normal package use.

- **Files touched:** index.js, lib/caller.js, lib/transport.js

- **Network endpoints:** https://api.jsonstorage.net/v1/json/2ef8c758-a96f-459e-b036-b3b90379a165/f89e8264-86c2-4684-94da-c3f82d59370f

### Review decision

- **Verdict:** Malicious

- **Confidence:** 99.0%

- **Recommended action:** publish\_block

- **Intent class:** Malware

- **False-positive risk:** Low

- **Evidence for block:** \`index.js\` exports middleware that spawns detached \`node lib/caller.js\` when invoked., \`lib/caller.js\` Base64-decodes an external JSONStorage URL and fetches it with Axios., Fetched \`data.cookie\` is passed to \`new Function.constructor("require", s)\` and executed., The child uses detached mode, ignored stdio, and \`unref()\`, hiding remote-payload execution from the caller., \`lib/transport.js\` also imports \`./caller\`, so importing that transport path triggers its async loader.

- **Evidence against:** \`package.json\` has no preinstall, install, or postinstall lifecycle hook., Inspected files show no direct credential harvesting, filesystem writes, or destructive operations before the remote payload executes.

## Affected versions and remediation

This report applies to chai-as-inspired@2.2.4.

- Avoid installing chai-as-inspired@2.2.4. 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: Eval
- **Category:** Source
- **Confidence:** 80.0%

Package source references dynamic code evaluation.

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

Package source references network APIs.

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

Package source references environment variables.

### 5. High: Base64 Obscured Url
- **Category:** Source
- **Confidence:** 82.0%
- **Path:** lib/caller.js
- **Public source:** [View source](<https://unpkg.com/chai-as-inspired@2.2.4/lib/caller.js>)

Source decodes a Base64-obscured HTTP endpoint at runtime.

Public source snippet (untrusted):

```javascript
L2: 
L3: const axios = require("axios");
L4: const process = {
...
L12: (async function loadCallers(..._args) {
L13: const src = atob(process.env.DEV_API_KEY);
L14: const k = atob(process.env.DEV_SECRET_KEY);
```

### 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. High: Known Malware Source Fingerprint Signature
- **Category:** Supply Chain
- **Confidence:** 94.0%
- **Path:** index.js
- **Public source:** [View source](<https://unpkg.com/chai-as-inspired@2.2.4/index.js>)

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 = 306e52008bef5331
signatureType = suspicious_hashes
sourceLabel = OpenSSF malicious-packages
matchedPackage = chai-as-thread@7.0.8
matchedPath = index.js
matchedIdentity = npm:Y2hhaS1hcy10aHJlYWQ:7.0.8
similarity = 1.000
shingleOverlap = 12
summary = Malicious code in chai-as-thread (npm)
```

### 9. Medium: Secret Pattern
- **Category:** Secrets
- **Confidence:** 75.0%
- **Path:** docs/transports.md
- **Public source:** [View source](<https://unpkg.com/chai-as-inspired@2.2.4/docs/transports.md>)

Hardcoded password in docs/transports.md

Public source snippet (untrusted):

```markdown
patternName = generic_password
severity = medium
line = 550
matchedText = password...rd',
```

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

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

### Published dependency entries
- axios ^1.10.0 (Dependency)
- parse-json ^8.3.0 (Dependency)
- request ^2.88.2 (Dependency)
- sqlite3 ^5.1.7 (Dependency)

## Package metadata
- **Package:** chai-as-inspired
- **Ecosystem:** npm
- **Version:** 2.2.4
- **License:** MIT
- **Version published:** 2026-07-17T10:55:00.935Z
- **Package first seen:** 2026-07-17T14:11:45.291Z
- **Package last seen:** 2026-07-17T14:11:45.291Z
- **Known versions:** 1
- **Latest version:** 2.2.4
- **Appeal under review:** No
- **Description:** This document describes the management of vulnerabilities for the project and all modules within the organization.
- **Author:** Tyler
- **Keywords:** fast, logger, stream, json
- **Artifact files:** 43
- **Artifact unpacked size:** 270,324 bytes
- **Artifact signatures:** 1
- **Attestations:** No

## References
- [HTML security report](<https://firewall.lpm.dev/npm/chai-as-inspired>)
- [Issues](<https://jsonspack.com/issues>)
