Insecure Credential Storage Affecting web3 Open this link in a new tab package, versions *

  • Attack Complexity


Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • snyk-id


  • published

    28 Apr 2019

  • disclosed

    26 Apr 2019

  • credit


Introduced: 26 Apr 2019

CWE-255 Open this link in a new tab

How to fix?

There is no fixed version for web3.


web3 is a JavaScript API which connects to the Generic JSON RPC spec.

Affected versions of this package are vulnerable to Insecure Credential Storage. The current implementation of web3.js could result in wallet decryption under certain circumstances. When a wallet is saved and encrypted into local storage, a private key is needed to load the wallet. However, this private key is available via LocalStorage and is readable in plaintext on a webpage after a wallet is loaded.

This implementation could be abused by an attacker through client-side attacks such as Cross-site Scripting (XSS) and could result in theft of a user's wallet private key.