On May 19, 2026, the charting library antv was attacked, and the latest version was embedded with malicious code.
On May 13, the popular TanStack series repo in the frontend community was also attacked.
On April 1, axios, which has a hundred million downloads weekly, was similarly attacked, and a malicious version was released.
It seems that news about supply chain attacks appears every month or even every week, and the targets are not limited to npm; Python’s PyPI, .NET’s NuGet, and even Docker Hub or VSCode extensions used by developers are all targets.
In this context, how should developers protect themselves?
This article mainly discusses supply chain attacks targeting npm, starting with the principles, followed by attack techniques and defense strategies.