Vulnerabilities in pkg:npm/bcoin

PACKAGE
Advisory Identifier: GHSA-hx3r-jv9q-85jw
Advisory Summary

CVE-2018-17145 is a HIGH (CVSS 7.5) bitcoin inventory out-of-memory denial-of-service attack vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Bcoin libraries in the npm ecosystem. The issue involves bitcoin inventory out-of-memory denial-of-service attack (cve-2018-17145). Remediation is available by upgrading affected packages to version 1.0.2.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/bcoin

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/bcoin. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-hx3r-jv9q-85jw CVE-2018-17145 HIGH Bitcoin Inventory Out-of-Memory Denial-of-Service Attack (CVE-2018-17145)

CVE-2018-17145 at a Glance

CVE Identifier CVE-2018-17145
GHSA Identifier GHSA-hx3r-jv9q-85jw
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Bcoin
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2018-17145

To remediate this vulnerability, upgrade all affected Bcoin dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

bcoin fixed: 1.0.2
npm install bcoin@1.0.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls bcoin

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2018-17145, inspect your project dependencies using npm:

npm ls bcoin

Analyze the terminal output to locate any version of Bcoin in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.2), your application is affected.

Note: The npm ls bcoin command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Bcoin, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

There was an easily exploitable uncontrolled memory resource consumption denial-of-service vulnerability that existed in the peer-to-peer network code of three implementations of Bitcoin and several alternative chains. For more details please see: https://invdos.net/ For the paper: https://invdos.net/paper/CVE-2018-17145.pdf

CVE-2018-17145 Affected Bcoin Versions

1 component(s)
Fixed Versions:
1.0.2
Product / Package Ecosystem Affected Versions Fixed Version
bcoin
npm
< 1.0.2
1.0.2

References

Frequently Asked Questions

What is CVE-2018-17145?
CVE-2018-17145 is a security vulnerability in Bcoin involving Bitcoin Inventory Out-of-Memory Denial-of-Service Attack (CVE-2018-17145) under CWE-400: Uncontrolled Resource Consumption.
Which Bcoin versions are affected?
Affected versions include releases prior to 1.0.2 across affected packages: bcoin.
What version fixes CVE-2018-17145?
Upgrading to 1.0.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is bcoin affected?
Yes, bcoin is affected in releases prior to 1.0.2. Upgrade your dependency to 1.0.2 or later.
What is the CVSS score of CVE-2018-17145?
CVE-2018-17145 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2018-17145?
CVE-2018-17145 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check npm dependencies for CVE-2018-17145?
Run the dependency tree command: 'npm ls bcoin'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-hx3r-jv9q-85jw",
  "modified" : "2021-10-04T21:16:21Z",
  "published" : "2020-09-10T19:44:58Z",
  "aliases" : [ "CVE-2018-17145" ],
  "summary" : "Bitcoin Inventory Out-of-Memory Denial-of-Service Attack (CVE-2018-17145)",
  "details" : "There was an easily exploitable uncontrolled memory resource consumption denial-of-service vulnerability that existed in the peer-to-peer network code of three implementations of Bitcoin and several alternative chains.\n\nFor more details please see:\nhttps://invdos.net/\n\nFor the paper:\nhttps://invdos.net/paper/CVE-2018-17145.pdf",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "bcoin"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/bcoin-org/bcoin/security/advisories/GHSA-hx3r-jv9q-85jw"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-17145"
  }, {
    "type" : "WEB",
    "url" : "https://en.bitcoin.it/wiki/Common_Vulnerabilities_and_Exposures#CVE-2018-17145"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/bcoin-org/bcoin"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/bitcoin/bitcoin/blob/v0.16.2/doc/release-notes.md"
  }, {
    "type" : "WEB",
    "url" : "https://invdos.net"
  }, {
    "type" : "WEB",
    "url" : "https://invdos.net/paper/CVE-2018-17145.pdf"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-09-10T19:44:16Z",
    "nvd_published_at" : null
  }
}