Packages / @solana/web3.js / Security

Malicious packageMAL-2024-11183GHSA-2mhj-xmf4-pr8mPublished 3 Dec 2024

Malicious code in @solana/web3.js (npm)

Affected releases · @solana/web3.js

  • 1.x1.95.6 – 1.95.7Fixed in 1.95.8

On 1.x, the newest line:

npm install @solana/web3.js@1.95.8
3.x
  1. Not affected

    3.0.0 – 3.1.1

    5 releases, latest

1.x
  1. Not affected

    1.0.0 – 1.95.5

    300 releases

  2. Affected

    1.95.6 – 1.95.7

    2 releases

  3. Safe

    1.95.8 – 1.99.0

    9 releases

664 stable releases of @solana/web3.js, oldest to newest, one row per major.

Is your project affected?

Paste your package.json, or type the range you declare for @solana/web3.js. It is read in your browser and sent nowhere.

What happens

If one of these versions was installed

  1. Treat the machines and CI runners that installed it as compromised.
  2. Rotate the npm, GitHub and cloud tokens they could reach.
  3. Reinstall from a lockfile that pins a version outside the list.

-= Per source details. Do not edit below this line.=-

Source: ghsa-malware (507e136eb7d13bd9c88a5e20d692768a759c2ae382d1ab54ba66c196b560cacb)

Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.