News and Notes from the Makers of Nexus | Sonatype Blog

PhantomRaven: npm Malware Evolves Again

Written by Sonatype Security Research Team | October 31, 2025

Published 3:00 p.m. ET on October 31, 2025; last updated 5:00 p.m. ET on October 31, 2025

This week, an open source malware campaign dubbed 'PhantomRaven' has run rampant, flooding the npm registry with over a hundred malicious packages that saw more than 86,000 potential victims before discovery.

Unlike previous waves of typosquatting or credential-theft attacks, PhantomRaven introduces a new evasion tactic: remote dynamic dependencies, a mechanism that fetches malicious payloads from outside the npm registry, effectively masking the true dependency tree.

Sonatype, alongside other security research firms, has tracked this malicious campaign and continued to analyze indicators of compromise (IoCs) and tactics, techniques and procedures (TTPs) of the threat actors. Sonatype Security Research has uncovered 83 additional packages associated with this campaign, now reaching more than 200 total. These packages are brandjacking organizations like Adobe and AirBNB or pretending to be MCP servers.

Analysis of the 'petstore-integration-test' package demonstrated how the attackers evolved tactics over time in order to improve stealth and evade detection. In version 1.0.0, the threat actors used an earlier version of the PhantomRaven campaign's malware which did not contain remote dynamic dependencies. Over time, however, two additional versions of 'petstore-integration-test' were published (1.0.3 and 99.0.0) that used the more advanced evasion techniques described.

The full list of malicious packages associated with the PhantomRaven campaign is included at the bottom of this blog post.

A Campaign Hidden Beneath Zero Dependencies

The campaign, first detailed by researchers at Koi, appeared to begin in August 2025 and relied on dozens of seemingly benign npm packages. Each package advertised "zero dependencies," giving developers and scanners a false sense of safety. Underneath, however, they contained URL-based imports pointing to attacker-controlled servers.

This meant that there was no actual malicious code in the packages themselves. Instead, when one of these packages is installed, npm sees it requires a dependency from a remote server, and the package manager itself downloads the actual malicious package.

It's this secondary package that does what we've seen time and again:

  • Use a lifecycle hook to execute code

  • Grab environment variables with sensitive tokens in them and collect system information

  • Send stolen data off to a remote URL or collection

By putting the actual attack on a remote dependency hosted on an attacker controlled server, these packages avoid traditional static analysis techniques that look for the typical, known signs of attack. This also allows the attackers to deliver clean code to some users and malware to others, which can make analysis tricky.

For defenders, PhantomRaven illustrates a new attack surface: the build process itself. By leveraging install-time network calls, attackers can reach into developer machines, CI/CD runners, and container build pipelines long before runtime. Early analysis suggests the malware targeted sensitive environment variables, npm tokens, and source-control credentials.

Supply Chain Defense Must Go Deeper

PhantomRaven underscores a growing reality: open source security can no longer stop at version and vulnerability checks. Modern supply chain defense must account for install-time behavior and dynamic code execution, not just what's declared in package.json.

Sonatype researchers are continuing to analyze the campaign's indicators of compromise and affected infrastructure. A full list of confirmed malicious package names and hashes is being maintained in our internal threat repository and is listed below for reference.

Developers are urged to review npm dependencies that specify external URLs or contain lifecycle scripts and to monitor for outbound network requests during build. Sonatype customers can expect proactive alerts and updated blocklists as the analysis evolves – for more information, visit our Help site documentation on this campaign.

The Bottom Line

The PhantomRaven campaign expands the playbook for open source attackers – from tricking developers to manipulating the mechanics of dependency resolution itself. For defenders, the lesson is clear: even packages that look empty can carry invisible threats. Malicious open source is designed to evade typical software composition analysis (SCA) scanners – Sonatype Repository Firewall is the best defense against nascent attacks, compromises, and vulnerabilities.

Malicious Packages

  • @acme-types : acme-package
  • @aio-commerce-sdk : config-tsdown
  • @aio-commerce-sdk : config-typedoc
  • @aio-commerce-sdk : config-typescript
  • @aio-commerce-sdk : config-vitest
  • @apache-felix : felix-antora-ui
  • @apache-netbeans : netbeans-antora-ui
  • @gitlab-lsp : pkg-1
  • @gitlab-lsp : pkg-2
  • @gitlab-lsp : workflow-api
  • @gitlab-test : bun-v1
  • @gitlab-test : npm-v10
  • @gitlab-test : pnpm-v9
  • @gitlab-test : yarn-v4
  • @i22-td-smarthome : component-library
  • @item-shop-data : client
  • @msdyn365-commerce-marketplace : address-extensions
  • @msdyn365-commerce-marketplace : tax-registration-numbers
  • acme-package
  • add-module-exports
  • add-shopify-header
  • aikido-module
  • airbnb-babel
  • airbnb-base-typescript-prettier
  • airbnb-bev
  • airbnb-calendar
  • airbnb-opentracing-javascript
  • airbnb-scraper
  • airbnb-types
  • ais-sn-components
  • artifactregistry-login
  • audio-game
  • badgekit-api-client
  • bernie-core
  • bernie-plugin-l10n
  • chai-friendly
  • chromestatus-openapi
  • crowdstrike
  • durablefunctionsmonitor
  • durablefunctionsmonitor-vscodeext
  • durablefunctionsmonitor.react
  • e-voting-libraries-ui-kit
  • elemefe
  • eslint-comments
  • eslint-disable-next-line
  • eslint-github-bot
  • eslint-plugin-cli-microsoft365
  • eslint-plugin-custom-eslint-rules
  • external-helpers
  • faltest
  • filename-rules
  • firefly-sdk-js
  • firefly-shared-js
  • flowtype-errors
  • fq-ui
  • ft-flow
  • goji-js-org
  • google-cloud-functions-framework
  • important-stuff
  • ing-web-es
  • inline-react-svg
  • iot-cardboard-js
  • jest-hoist
  • jfrog-npm-actions-example
  • jira-ticket-todo-comment
  • jsx-a11y
  • labelbox-custom-ui
  • lfs-ui
  • lion-based-ui
  • lion-based-ui-labs
  • mocha-no-only
  • mourner
  • named-asset-import
  • no-floating-promise
  • no-only-tests
  • only-warn
  • op-cli-installer
  • pensions-portals-fe
  • polyfill-corejs3
  • polyfill-regenerator
  • powerbi-visuals-sunburst
  • prefer-object-spread
  • preferred-import
  • react-async-component-lifecycle-hooks
  • react-important-stuff
  • react-naming-convention
  • react-web-api
  • rxjs-angular
  • skyscanner-with-prettier
  • sort-class-members
  • sort-keys-fix
  • sort-keys-plus
  • spaintest1
  • syntax-dynamic-import
  • transform-es2015-modules-commonjs
  • transform-merge-sibling-variables
  • transform-react-constant-elements
  • transform-react-jsx-source
  • transform-react-remove-prop-types
  • transform-strict-mode
  • trezor-rollout
  • ts-important-stuff
  • ts-migrate-example
  • ts-react-important-stuff
  • twilio-react
  • twilio-ts
  • typescript-compat
  • typescript-sort-keys
  • uach-retrofill
  • ul-inline
  • unused-imports
  • vuejs-accessibility
  • wdr-beam
  • wm-tests-helper
  • xo-form-components
  • xo-login-components
  • xo-page-components
  • xo-shipping-change
  • xo-shipping-options
  • xo-title
  • xo-tracking
  • xo-validation
  • zeus-me-ops-tool
  • zeus-mex-user-profile
  • airbnb-base-hf
  • zohocrm-nodejs-sdk-3.0

Previously unreported: 

  • @amazon-bedrock-agents-healthcare-lifesciences/docs
  • @apachesling/slingpackager
  • @apachesling/slingpost
  • @dealmgmt/grid
  • @decentraland-gatsby/intl
  • @discord-external/activity-iframe-sdk
  • @dtpk-cc/components
  • @exarad/verfuegbarkeitspruefung-vue2
  • @foryjs/fory
  • @foryjs/hps
  • @i22/rocket
  • @i22/scroll-animation
  • @js-to-lua/convert
  • @js-to-lua/fast-follow-commands
  • @js-to-lua/handler-utils
  • @js-to-lua/lua-conversion-utils
  • @js-to-lua/lua-types
  • @morphodao/morpho-core-v1
  • @openzeppelin-compact/compact
  • @openzeppelin-compact/fungible-token
  • @openzeppelin-compact/utils
  • @pa-client/power-code-sdk
  • @raux/ra-react-big-calendar
  • adobe-alloy
  • adobe-alloy-mini-site
  • airbnb-angular
  • airbnb-bundle
  • airbnb-es5
  • airbnb-flow
  • airbnb-hooks
  • airbnb-lite
  • airbnb-relaxed
  • airbnb-slider
  • airbnb-with-tracking
  • annotate-pure-calls
  • braintree-sdk
  • cimpress-atsquad
  • closure-es6
  • discord-open-source
  • dynamic-import-node
  • dynamic-import-webpack
  • eslint-config-googlejs-es6
  • fbjs-opensource
  • google-jsdocless
  • google-payment
  • image_classification
  • internal-test-helpers
  • minify-dead-code-elimination
  • mycli123
  • netflix-dea
  • no-unsupported-browser-features
  • oclif-dev
  • oclif-typescript
  • openzeppelin-compact
  • petstore-integration-test
  • playwright-test-plugin
  • prefer-arrow
  • react-airbnb-prettier
  • rushstack-lockfile-explorer
  • simple-import-sort
  • some-other-config-you-use
  • stylelint-config-opbox
  • swift-playground-builder
  • transform-remove-console
  • typed-fp
  • typescript-airbnb-prettier
  • typescript-airbnb-prettier-svelte
  • vscode-notebook-renderer
  • vscode.markdown-it-renderer
  • wealthsimple-mcp-server
  • xo-address-components
  • xo-angular-shims-placeholder
  • xo-beaver
  • xo-credit-components
  • xo-device-info
  • xo-jquery-mask-plugin
  • xo-react
  • xo-space
  • xo-styles
  • xo-third-party-components
  • xo-typescript
  • xo-ui-components
  • yellowcard-styling-config