Skip to main content
green gradient background, "The Future of Application Security Is Already Here." and a read the report button.
npm Supply Chain Attacks Targeting Crypto TeamsResearch
4 min readFor Security Engineers

npm Supply Chain Attacks Targeting Crypto Teams

You're considering an accelerator program that promises free AI credits and security audits for your Web3 startup. The GitHub looks legitimate, and the npm packages have decent download counts. Then your EDR alerts start firing.

This isn't hypothetical. Elastic Security Labs recently documented an operation (tracked as REF8801) where attackers created a fake accelerator called Apex Accelerator, distributed malicious npm packages like @apexacc/cli and @apexacc/audit, and used promises of Anthropic Claude and Google Gemini credits as bait. The operation deployed information stealers and backdoors targeting both Windows and macOS systems.

Here's what you need to verify before your team installs anything.

Scope: What This Guide Covers

This guide addresses supply chain attacks delivered through npm packages, specifically targeting cryptocurrency and Web3 development teams. You'll learn how to verify package authenticity, implement controls to catch malicious dependencies, and secure AI agent configurations that attackers hijack to exfiltrate API traffic.

If you're running a development team that uses npm packages and AI APIs, bookmark this.

Key Concepts You Need to Understand

Package impersonation isn't typosquatting. Attackers create legitimate-looking organizations with professional branding, GitHub repositories, and documentation. The REF8801 operation included Russian-language comments in commit history, but the front-facing materials looked polished.

AI agent hijacking works by intercepting or redirecting traffic between your application and AI APIs. When your code calls Claude or Gemini, the malicious package routes requests through attacker-controlled infrastructure first. You get your API response, so you don't notice the interception.

Social engineering at scale means attackers research your tech stack before contact. They know you're using AI APIs. They know you're looking for security audits. They craft offers that align with your actual needs.

Requirements Breakdown

OWASP ASVS v4.0.3 Requirements

V14.2.1 requires that package managers use signed packages where possible. For npm, this means verifying package signatures and checking npm's provenance attestations when available.

V14.2.3 demands that you maintain an inventory of third-party components. You can't detect malicious packages if you don't know what you've installed.

NIST 800-53 Rev 5 Controls

SA-12 (Supply Chain Protection) requires you to employ anti-counterfeit technologies and methods for detecting counterfeit components. For npm packages, this translates to automated scanning and verification workflows.

SR-11 (Component Authenticity) mandates anti-counterfeit measures and detection for systems and components. Your CI/CD pipeline should flag packages from new or unverified publishers.

ISO/IEC 27001:2022 Controls

A.8.30 (Outsourced development) requires security controls for outsourced development activities. Third-party npm packages qualify as outsourced code. You need verification processes before integration.

Implementation Guidance

Before Installation

Run this verification checklist before installing any package:

  1. Check package age and publisher history. New packages from new publishers warrant extra scrutiny. Use npm view <package> time to see publication dates.

  2. Verify the publisher's other packages. Legitimate publishers have multiple packages with consistent maintenance. A publisher with one or two packages created in the same week is suspicious.

  3. Review the package dependencies. Run npm view <package> dependencies before installation. Packages that pull in unusual dependencies or obfuscated code need investigation.

  4. Scan the source repository. If the package links to GitHub, check commit history, contributor patterns, and issue discussions. The REF8801 packages had Russian-language comments that didn't match their English documentation.

During Development

Your package.json should use exact versions, not ranges:

{
  "dependencies": {
    "package-name": "1.2.3"
  }
}

Not this:

{
  "dependencies": {
    "package-name": "^1.2.3"
  }
}

Version ranges let attackers push malicious updates to packages you've already vetted.

Implement npm audit in your CI pipeline and set it to fail builds on high-severity findings. Configure it to run before every deployment:

npm audit --audit-level=high

For AI API Security

If you're using AI APIs like Claude or Gemini, implement these controls:

Network monitoring: Log all outbound connections to AI API endpoints. Alert on unexpected destinations or proxy patterns. The hijacking technique works by routing your API calls through attacker infrastructure.

API key rotation: Rotate keys every 30 days. If a package exfiltrates your key, you limit the exposure window.

Rate limiting and usage monitoring: Set up alerts for unusual API consumption patterns. A hijacked agent making extra calls will show up in your usage metrics.

Environment variable isolation: Don't store API keys in your codebase or package.json. Use environment variables or secrets management tools that packages can't easily access.

Common Pitfalls

Trusting download counts: Attackers inflate download numbers with automated scripts. The @apexacc/cli package appeared popular enough to seem legitimate.

Skipping verification for "small" packages: Malicious packages are often small utilities that seem harmless. You install them because they solve a minor problem, but they have access to your entire environment.

Assuming GitHub presence equals legitimacy: Creating a professional GitHub organization costs nothing. The REF8801 operation had repositories, documentation, and commit history.

Not monitoring post-installation behavior: Install-time scanning catches some threats, but sophisticated packages activate later. Monitor your application's network connections and file system access after deploying new dependencies.

Quick Reference Table

Verification Step Command/Tool Red Flag
Package age npm view <pkg> time Created within last 30 days
Publisher history npm view <pkg> maintainers New publisher, few packages
Dependency tree npm view <pkg> dependencies Obfuscated code, unusual deps
Source repository Check GitHub commits Language mismatches, sparse history
Security scan npm audit High/critical vulnerabilities
Network behavior Monitor outbound connections Unexpected API calls or proxies
Signature verification Check npm provenance Missing or invalid signatures

When an accelerator, audit firm, or "partner" asks you to install their npm package, treat it like you would any other third-party code integration. Verify the publisher, scan the code, and monitor the behavior. The promises of free AI credits or security reviews don't change the risk calculation.

Your package-lock.json is your dependency contract. Review it like you'd review any other contract before signing.

Topics:Research
Green background, the words "The Biggest AI Security Risk Isn’t the Model. It’s the Agent." A robot drawing. A button for "Get the Free Guide."

You Might Also Like