Vulnerabilities in pkg:npm/web3

PACKAGE
Advisory Summary

GHSA-27v7-qhfv-rqq8 is a LOW (CVSS 3.3) insecure credential storage vulnerability (General Security Weakness) affecting Web3 libraries in the npm ecosystem. The issue involves insecure credential storage in web3. Remediation is available in the latest vendor maintenance releases.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/web3

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-27v7-qhfv-rqq8 - LOW Insecure Credential Storage in web3

GHSA-27v7-qhfv-rqq8 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-27v7-qhfv-rqq8
Severity LOW
CVSS v3.1 Base Score 3.3
CWE Classification General Security Weakness
Affected Product Web3
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 3.3

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

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

How to Fix GHSA-27v7-qhfv-rqq8

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

web3 fixed: Latest secure release
npm install web3@Latest secure release
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 web3

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-27v7-qhfv-rqq8, inspect your project dependencies using npm:

npm ls web3

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

Note: The npm ls web3 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 General Security Weakness. In Web3, 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

All versions of `web3` are vulnerable to Insecure Credential Storage. The package stores encrypted wallets in local storage and requires a password to load the wallet. Once the wallet is loaded, the private key is accessible via LocalStorage. Exploiting this vulnerability likely requires a Cross-Site Scripting vulnerability to access the private key. ## Recommendation No fix is currently available. Consider using an alternative module until a fix is made available.

GHSA-27v7-qhfv-rqq8 Affected Web3 Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
web3
npm
≤ 1.5.2

References

Frequently Asked Questions

What is GHSA-27v7-qhfv-rqq8?
GHSA-27v7-qhfv-rqq8 is a security vulnerability in Web3 involving Insecure Credential Storage in web3 under General Security Weakness.
Which Web3 versions are affected?
Affected versions include releases prior to current release patches across affected packages: web3.
What version fixes GHSA-27v7-qhfv-rqq8?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is web3 affected?
Yes, web3 is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of GHSA-27v7-qhfv-rqq8?
GHSA-27v7-qhfv-rqq8 has a CVSS v3.1 base score of 3.3 (LOW) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with GHSA-27v7-qhfv-rqq8?
GHSA-27v7-qhfv-rqq8 is classified under General Security Weakness.
How can I check npm dependencies for GHSA-27v7-qhfv-rqq8?
Run the dependency tree command: 'npm ls web3'. 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-27v7-qhfv-rqq8",
  "modified" : "2021-08-31T20:56:47Z",
  "published" : "2019-05-30T17:26:30Z",
  "aliases" : [ ],
  "summary" : "Insecure Credential Storage in web3",
  "details" : "All versions of `web3` are vulnerable to Insecure Credential Storage. The package stores encrypted wallets in local storage and requires a password to load the wallet. Once the wallet is loaded, the private key is accessible via LocalStorage. Exploiting this vulnerability likely requires a Cross-Site Scripting vulnerability to access the private key.\n\n\n## Recommendation\n\nNo fix is currently available. Consider using an alternative module until a fix is made available.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "web3"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "1.5.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/ethereum/web3.js/issues/2739"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/ethereum/web3.js"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/SNYK-JS-WEB3-174533"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/877"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2019-05-30T17:25:54Z",
    "nvd_published_at" : null
  }
}