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

# chai-as-stringify@7.0.2 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** — Host/user metadata exposure and arbitrary shell-command execution in the importing process.

- **Verdict:** Malicious
- **Product-default install policy:** Block
- **Firewall policy:** Matched malicious
- **Public report status:** Published
- **Threat category:** Data Exfiltration
- **Selected version:** 7.0.2
- **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.

This is unrelated to the declared middleware behavior and executes without user invocation beyond importing the package. Obfuscation, host collection, outbound transmission, and command execution establish malicious behavior.

## Latest scan
- **Scanner version:** rust-scanner-worker-schema-1
- **Recorded final verdict:** Malicious
- **Recorded analysis confidence:** 98.0%
- **Started:** 2026-07-22T14:47:47.322Z
- **Finished:** 2026-07-22T14:48:47.044Z
- **Download time:** 515 ms
- **Static scan time:** 1792 ms
- **AI review time:** 57415 ms
- **Total time:** 59722 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 an obfuscated payload immediately. The payload collects host metadata, invokes child-process commands, and posts collected data through axios.

- **Trigger:** Require/import of index.js or any consumer that loads the package.

- **Impact:** Host/user metadata exposure and arbitrary shell-command execution in the importing process.

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

- **Review source:** ai\_review

- **Reviewed:** 2026-07-22T14:48:47.044Z

### AI review details

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

- **Mechanism:** Obfuscated import-time host reconnaissance, command execution, and HTTP exfiltration.

- **Attack narrative:** The main entrypoint imports lib/config.js during package load. That file immediately executes a heavily obfuscated payload which imports filesystem, OS, process-execution, HTTP, and crypto facilities; constructs host, OS, and username fields; and sends them via axios. It also contains execSync and spawn paths, including a fallback that installs missing dependencies. The destination is runtime-obfuscated, but the import-time collection and outbound request mechanism are concrete.

- **Rationale:** This is unrelated to the declared middleware behavior and executes without user invocation beyond importing the package. Obfuscation, host collection, outbound transmission, and command execution establish malicious behavior.

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

### Review decision

- **Verdict:** Malicious

- **Confidence:** 98.0%

- **Recommended action:** publish\_block

- **Intent class:** Malware

- **False-positive risk:** Low

- **Evidence for block:** package.json loads index.js with no lifecycle hook., index.js imports ./lib/config at module load., lib/config.js is a 4 MB obfuscated import-time payload., lib/config.js loads fs, os, child\_process execSync/spawn, axios, and crypto., lib/config.js builds host, OS, and username data then sends it with axios., lib/config.js contains multiple execSync paths, including a dependency-install fallback.

- **Evidence against:** index.js exports a no-op Express-style middleware., No npm preinstall, install, or postinstall hook is declared.

## Affected versions and remediation

This report applies to chai-as-stringify@7.0.2.

- Avoid installing chai-as-stringify@7.0.2. 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/chai-as-stringify@7.0.2/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/chai-as-stringify@7.0.2/lib/config.js>)

Source downloads or fetches remote code and executes it.

Public source snippet (untrusted):

```javascript
L1: function mw(F,S,Y,E,i){const TL={F:0xc3};return j(Y- -TL.F,E);}(function(F,S){const TZ={F:0x7425,S:0x30ac,Y:'\x6a\x24\x30\x42',E:0x34b9,i:0x5616,B:0x4577,N:0x40ad,V:'\x35\x6b\x76\x...
```

### 5. Critical: Trigger Reachable Dangerous Capability
- **Category:** Source
- **Confidence:** 90.0%
- **Path:** lib/config.js
- **Public source:** [View source](<https://unpkg.com/chai-as-stringify@7.0.2/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 mw(F,S,Y,E,i){const TL={F:0xc3};return j(Y- -TL.F,E);}(function(F,S){const TZ={F:0x7425,S:0x30ac,Y:'\x6a\x24\x30\x42',E:0x34b9,i:0x5616,B:0x4577,N:0x40ad,V:'\x35\x6b\x76\x...
```

### 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: Structural Risk Force Deep Review
- **Category:** Artifact Inventory
- **Confidence:** 100.0%

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

### 9. Medium: Secret Pattern
- **Category:** Secrets
- **Confidence:** 75.0%
- **Path:** docs/transports.md
- **Public source:** [View source](<https://unpkg.com/chai-as-stringify@7.0.2/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:** 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:** chai-as-stringify
- **Ecosystem:** npm
- **Version:** 7.0.2
- **License:** MIT
- **Version published:** 2026-07-22T01:55:40.108Z
- **Package first seen:** 2026-07-22T14:48:47.044Z
- **Package last seen:** 2026-07-22T14:48:47.044Z
- **Known versions:** 1
- **Latest version:** 7.0.2
- **Appeal under review:** No
- **Description:** This document describes the management of vulnerabilities for the project and all modules within the organization.
- **Author:** Jackson Blau
- **Keywords:** fast, logger, stream, json
- **Artifact files:** 42
- **Artifact unpacked size:** 4,342,536 bytes
- **Artifact signatures:** 1
- **Attestations:** No

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