Skip to content
supplychainattack.orgSupply chain attack incident catalog
resolvedcritical

Malicious code in animate-css-vite (npm)

The npm package animate-css-vite contained obfuscated malicious code in plugin.js that fetches and executes remote code during the build process. The malicious plugin uses RC4/base64 obfuscation to hide network calls and eval execution with require scope, enabling arbitrary code execution in any consumer's build pipeline.

ShareXLinkedInHacker News
Disclosed
Last updated
Blast radius
Build-time code execution in any project consuming animate-css-vite as a PostCSS plugin dependency.
Ecosystems
Attack vectors
Affected entities
  • animate-css-vitenpm package containing malicious code in plugin.js

The npm package animate-css-vite was found to contain malicious code embedded in its plugin.js file. The code uses heavy obfuscation—a 130-entry RC4 string array with multiple indirection decoders and console-hook stubs—to conceal its true functionality.\n\nWhen a consumer's build process instantiates the plugin (via the exported createPlugin factory), the malicious code constructs a URL at runtime, calls fetch() to retrieve remote content, base64-decodes the response, and executes it using new Function(param, decoded)(require) inside a retry loop (up to 10 attempts with 60-second timeouts). This grants the remote operator arbitrary code execution within the build environment.\n\nA legitimate PostCSS plugin for vendor prefixes and CSS variables has no legitimate reason to fetch and execute remote code. The presence of require in the execution scope allows the attacker to access the Node.js module system and filesystem, making this a critical supply chain risk.\n\nThe incident was identified and credited to the OpenSSF's malicious-packages repository (MAL-2026-14226).

Indicators of compromise

Packages
  • animate-css-vite

Remediation

  • Immediately remove animate-css-vite from all projects and dependencies
  • Audit build logs and environment variables for signs of unauthorized access or data exfiltration during builds that used this package
  • Review and rotate any credentials or secrets that may have been exposed during the build process
  • Use a legitimate, well-maintained PostCSS plugin for CSS animations and vendor prefixes instead
  • Implement build-time security scanning and dependency verification to detect obfuscated or suspicious code patterns
  • Monitor npm package updates and security advisories for animate-css-vite and related packages

Sources

  1. GitHub Advisory GHSA-xfp3-36mf-rqj9 · GitHub Advisory Database

Cite this entry

"Malicious code in animate-css-vite (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 19, 2026; last updated August 19, 2026. https://supplychainattack.org/incident/malicious-code-in-animate-css-vite-npm-bk7yi2

Suggest a correction

Found an error or have a newer source? Corrections to factual errors take priority over new entries.

  1. containedcritical

    Malicious code in 3-buildsight-web (npm)

    The npm package 3-buildsight-web contains malicious code that fetches and executes arbitrary JavaScript from a remote Bitbucket URL on module load, granting full page privileges to an unverified third party.

    npmCompromised package
  2. resolvedcritical

    Malicious code in @usaa-grp-personal-profile/personal-profile-common (npm)

    Malicious package @usaa-grp-personal-profile/personal-profile-common version 999.0.0 published to public npm as a dependency-confusion attack targeting an organization's internal registry. The package contains preinstall and postinstall hooks that exfiltrate hostname, username, and working directory to an attacker-controlled OAST endpoint on every install.

    npmDependency confusionCompromised package
  3. resolvedcritical

    Malicious code in create-coin (npm)

    create-coin@20.1.1 on npm contained malicious postinstall code that collected sensitive environment variables, credentials, and host reconnaissance data. The package impersonated an esbuild platform build and exfiltrated data to a hardcoded endpoint.

    npmCompromised packageTyposquatting
  4. resolvedcritical

    Malicious code in @syncraft-labs/vue (npm)

    The npm package @syncraft-labs/vue version 0.4.1 contained malicious obfuscated code in its ESM build that implements a blockchain-hosted C2 dropper (EtherHiding pattern), enabling remote code execution on any consumer importing the package.

    npmCompromised package