← Back to blog

TanStack npm Supply Chain Attack Exposes 170 CrowdSec Repos

A supply chain compromise of TanStack's npm packages led to stolen credentials and unauthorized access to 170 private GitHub repositories at CrowdSec. The breach exploited a former employee's still-active access.

TL;DR

  • Malicious TanStack npm packages were used in a supply chain attack to steal developer credentials.
  • CrowdSec reported that about 170 private GitHub repos were copied in May due to compromised credentials.
  • The breach occurred through a former employee whose access wasn't revoked and whose laptop was infected.
  • This highlights risks of unrevoked access and third-party package vulnerabilities.
  • Organizations should enforce timely access revocation and audit third-party dependencies.

In a recent incident disclosed by French cybersecurity firm CrowdSec, threat actors leveraged a supply chain vulnerability in TanStack’s popular npm packages to gain unauthorized access to internal systems. This breach resulted in the copying of approximately 170 private GitHub repositories.

The company revealed that the compromise stemmed from a former employee's laptop, which had been infected during the malicious npm package attack. Despite the employee having left the organization, their GitHub access remained active, enabling attackers to exploit this oversight and exfiltrate sensitive data.

Attack Vector and Timeline

  • The initial compromise occurred in May 2024 when CrowdSec developers unknowingly installed malicious versions of TanStack npm packages.
  • These packages were designed to harvest credentials, including those for GitHub.
  • An employee who had recently left the company still had active GitHub credentials, which were harvested and used by attackers.
  • On May 22, threat actors accessed and copied around 170 private repositories before being detected.
  • CrowdSec publicly disclosed the breach on September 18, months after the initial compromise.

Security Implications and Lessons

  • This breach underscores the critical importance of deprovisioning access immediately upon employee departure.
  • Supply chain attacks targeting widely-used open-source packages can have far-reaching consequences.
  • Organizations should implement strict credential hygiene and monitor for anomalous access patterns.
  • Regular audits of third-party dependencies and automated access reviews are essential for defense-in-depth.
  • Incident response timelines are crucial—delayed disclosures can impact trust and remediation efforts.

Sources

Sources

Security email updates

One digest email when we publish new security articles (TL;DR plus links to read more). Unsubscribe anytime from the message footer. See our Privacy Policy.

TanStack npm Supply Chain Attack Exposes 170 CrowdSec Repos — Agent Breach Blog | Agent Breach