Axios Supply Chain Attack Exposes Millions of Developers

The JavaScript world was hit by an attack on one of the biggest libraries in the ecosystem, Axios. It allows developers to make calls to APIs similar to the built-in fetch API that JavaScript comes with. With APIs being such a crucial part of how all modern websites work, the package sees ~100,000,000 downloads per week. The attack vector was something we have seen more and more recently, supply chain attacks. In simple terms what happened was the attacker managed to gain access to an API token that allowed uploading packages to npm, this allowed a malicious version of Axios to be uploaded. The package was then downloaded by users that required the vulnerable version of the package. It then used a post install script to run a remote access trojan on the users computer. And you might say: "I don't use Axios, I am safe" But here is the kicker, you might not be... A crucial concept to understand with npm is that it is a web of dependencies. Over 174,000 packages depend on Axios, if you installed any of those packages, and they relied on the vulnerable version? Your system might have been exploited, and you were none the wiser. Now this is of no fault of your own, after all you have to put a level of trust in tools we use. It is the world that we live in where modern software is developed in this way. That being said I have a few takeaways: - This is one of the most sophisticated attacks of this kind that has been seen, this is far from the end of attacks that will be facilitated via npm, PyPI, or other supply-chains. - Build a strong understanding of transitive dependencies, and what they mean for your project. Be aware that you do not rely on just the packages you install, but also the packages that others use. - Sometimes the right call might be to not install a package. It might make your job easier, but there is always a risk. Is that risk worth it to you? If you want to learn more Elastic has a good, easy to understand writeup: https://lnkd.in/gcvMK6jJ If you think you have been affected, this write up provides steps to check how: https://lnkd.in/gpVSNmxe #CyberSecurity #SupplyChainSecurity #JavaScript #npm #SoftwareSecurity #OpenSource #DevSecOps #AppSec #WebDevelopment #Infosec

To view or add a comment, sign in

Explore content categories