Embedded Malicious Code Affecting @solana/web3.js package, versions >=1.95.6 <1.95.8


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Mature
EPSS
0.04% (12th percentile)

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 IDSNYK-JS-SOLANAWEB3JS-8453984
  • published4 Dec 2024
  • disclosed3 Dec 2024
  • creditUnknown

Introduced: 3 Dec 2024

Malicious CVE-2024-54134  (opens in a new tab)
CWE-506  (opens in a new tab)

How to fix?

Avoid using all malicious instances of the @solana/web3.js package.

Overview

@solana/web3.js is a Solana JavaScript SDK

Affected versions of this package are vulnerable to Embedded Malicious Code that is designed to steal private keys from unsuspecting developers and users, potentially enabling attackers to drain funds from dApps, like bots, that handle private keys directly.

The malicious code was added to npm releases 1.95.6 and 1.95.7 after a publish-access account was compromised.

Notes:

  1. This issue should not affect non-custodial wallets, as they generally do not expose private keys during transactions.

  2. This is not an issue with the Solana protocol itself but with a specific JavaScript client library and only appears to affect projects that directly handle private keys and that were updated within the window of 3:20pm UTC and 8:25pm UTC on Tuesday, December 2, 2024.

  3. Developers who suspect they might be compromised should rotate any suspect authority keys, including multisigs, program authorities, server keypairs, and so on.

References

CVSS Scores

version 4.0
version 3.1