Supply chain · npm · High

Critical npm Package 'ai-p2p' Compromises Systems, Steals Credentials

Threat Engine Auto-Feed · data current as of 2026-07-16

The npm package 'ai-p2p' has been identified as malicious, leading to full system compromise upon installation. This poses a critical supply-chain risk, as all secrets and keys on affected systems are vulnerable to theft and should be rotated immediately.

  • Package: npm / ai-p2p
  • Affected versions: >= 0
  • Severity: critical
  • Reach: ~18/wk
  • Exposure: 60/100 (High)

What happened — Credential / secret theft

The 'ai-p2p' npm package contains malware that, when installed, fully compromises the host computer. This allows an external entity to gain complete control over the system.

How the attack works

This is a malicious package attack where a seemingly legitimate software component is embedded with harmful code. Upon installation, this code executes, establishing unauthorized access and control over the host system, typically to exfiltrate sensitive data or maintain persistence.

Who's exposed

Profiles most at risk

  • Development teams using npm for package management
  • Organizations with CI/CD pipelines that pull npm dependencies
  • Any user or system that has installed 'ai-p2p' directly or as a transitive dependency

Conditions that increase exposure

  • Unpinned or broad dependency versions (e.g., 'latest' or wide ranges) that allow malicious updates
  • Lack of dependency lockfiles (e.g., package-lock.json) to ensure consistent builds
  • Internal package mirrors that do not vet upstream dependencies for malicious content

Blast-radius scenarios

  • An attacker gains full control of the compromised system, potentially leading to further network intrusion.
  • All secrets, API keys, and credentials stored on the compromised computer are stolen.
  • The compromised system could be used as a pivot point for lateral movement within an organization's network.

What to do (defensive)

Detect

  • Review dependency trees for 'ai-p2p' in all projects and environments.
  • Scan package-lock.json or yarn.lock files for the presence of 'ai-p2p'.
  • Monitor network traffic for unusual outbound connections from systems where 'ai-p2p' might have been installed.

Contain

  • Immediately isolate any system identified with 'ai-p2p' installed from the network.
  • Block 'ai-p2p' from being downloaded or installed in your organization's package registries or proxies.
  • Suspend any CI/CD pipelines that may have pulled or built projects with 'ai-p2p'.

Remediate

  • Consider any computer that installed 'ai-p2p' as fully compromised and re-image it from a trusted source.
  • Rotate all secrets, API keys, and credentials that were stored on or accessible from the compromised computer, using a different, clean system.
  • Remove the 'ai-p2p' package from all projects and ensure it cannot be re-introduced.

Frontier verdict — High

Prioritize immediate rotation of all secrets and re-imaging of compromised systems due to critical 'ai-p2p' npm package malware.

Sources

For detection-engineering and awareness only · point-in-time · not security advice · sourced from the GitHub Advisory Database.