Insecure Credential Storage in web3

web3 Updated 02 Oct 2025

Summary

30/05/2019
LOW
No i
Low
3.3

GHSA-27v7-qhfv-rqq8: Insecure Credential Storage in web3. Affects web3 versions < 1.5.2. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

web3 is an npm package that provides a JavaScript library for interacting with the Ethereum blockchain. It allows developers to create and manage wallets, send transactions, and interact with smart contracts. The package stores encrypted wallets in local storage and requires a password to load the wallet. However, a vulnerability exists where the private key of the loaded wallet is accessible via LocalStorage. This vulnerability poses a risk if there is a Cross-Site Scripting vulnerability that allows an attacker to access the private key.

Vulnerability Detail

The vulnerability in web3 arises from the insecure storage of encrypted wallets. While the wallets are encrypted and require a password to load, the private key is stored in LocalStorage once the wallet is loaded. This means that if an attacker can exploit a Cross-Site Scripting vulnerability, they can access the private key and potentially gain unauthorized access to the wallet and its associated Ethereum funds. The impact of this vulnerability can be significant, as it compromises the security of the user's Ethereum wallet and assets.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As there is no fix available, there is no specific workaround provided for this vulnerability. However, developers can mitigate the risk by implementing strong security practices in their applications, such as ensuring they have proper Cross-Site Scripting protections in place and regularly monitoring for any signs of unauthorized access or suspicious activity.

Conclusion

Insecure Credential Storage in web3 poses a risk to the security of Ethereum wallets and assets. While no fix is currently available, developers should consider using alternative modules and regularly check for updates and security advisories. Implementing strong security practices and monitoring for suspicious activity can help mitigate the risk. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for web3 →

Share this vulnerability

FAQ

web3 is an npm package that provides a JavaScript library for interacting with the Ethereum blockchain. It allows developers to create and manage wallets, send transactions, and interact with smart contracts.

Insecure Credential Storage refers to the practice of storing sensitive credentials, such as private keys or passwords, in an insecure manner. In the case of web3, the private key of a loaded wallet is stored in LocalStorage, which can be accessed by an attacker if they can exploit a Cross-Site Scripting vulnerability.

LocalStorage is a web browser feature that allows websites to store data locally on a user's device. It is similar to cookies but has a larger storage capacity and is not sent to the server with every request. In the case of web3, the private key of a loaded wallet is stored in LocalStorage.

Cross-Site Scripting (XSS) is a type of security vulnerability that allows attackers to inject malicious scripts into web pages viewed by other users. If a website is vulnerable to XSS, an attacker can execute arbitrary code in the context of the victim's browser, potentially accessing sensitive information or performing unauthorized actions.

To protect your application from this vulnerability, it is important to implement proper Cross-Site Scripting protections, such as input validation and output encoding. Additionally, regularly monitoring for any signs of unauthorized access or suspicious activity can help detect and mitigate potential attacks.

Related vulnerabilities

Recent vulnerabilities recorded for web3.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback