How AI and Supply Chain Attacks Are Putting Enterprise Code at Risk
Recently, a serious security breach has highlighted the growing dangers in the world of enterprise software. Hackers used clever tricks to compromise popular tools like the Nx build system and some React packages. These attacks show how bad actors are getting more sophisticated, especially by using artificial intelligence to boost their data theft efforts.
The Nx Build System Gets Hit by Malicious Packages
The attack on Nx started on August 26, 2025, when hackers uploaded fake versions of Nx packages to the npm registry. These fake packages looked normal but contained malicious scripts. Once installed, these scripts aimed to steal sensitive information from developers’ systems. The malware targeted things like cryptocurrency wallets, API tokens, SSH keys, and environment variables stored on infected machines.
What made this attack stand out was how it used AI tools. The malware would activate AI command-line tools like Claude, Gemini, and Q with dangerous flags. These flags tricked the AI into giving up filesystem data and helping hackers do reconnaissance. The attackers used these methods hundreds of times successfully, sometimes even bypassing security measures meant to stop such abuse.
Other Malicious Packages Disguise Their True Nature
At the same time, another security firm called JFrog found eight malicious packages on npm. These packages had names like react-sxt and react-typex. They were heavily obfuscated, with over 70 layers of hidden code, making them very hard to analyze. These packages were designed to steal data from Chrome browsers on Windows, including passwords, credit card info, cookies, and even cryptocurrency wallets.
The malicious code used advanced evasion tricks. For example, it could bypass shadow copying, impersonate system processes like LSASS, and avoid detection by antivirus tools. These techniques show just how far attackers are willing to go to stay hidden and steal valuable data.
The Scope and Response to the Attacks
The Nx attack was extensive. Researchers found over a thousand GitHub tokens, dozens of cloud credentials, and around 20,000 files leaked from thousands of repositories. The stolen data was uploaded to attacker-controlled repositories with names like “s1ngularity-repository.” GitHub responded quickly, disabling these repositories within nine hours. Still, the damage was done quickly, and some data was downloaded by attackers before the repositories were taken down.
The use of AI in these attacks is particularly concerning. Hackers prompted AI tools with flags that allowed them to spy on file systems and gather information. The attack started from a vulnerable GitHub workflow that allowed code injection through unsanitized pull request titles. This flaw gave hackers the ability to run malicious commands with high privileges, affecting not just individual machines but entire build pipelines and CI/CD systems.
In response, security teams are working hard. JFrog and npm have removed the malicious packages, and security tools like JFrog Xray now scan for these threats. Organizations are being advised to delete compromised Nx versions, review configurations for malicious changes, and rotate all affected credentials—including GitHub tokens, npm tokens, SSH keys, and environment secrets. Regular credential rotation and thorough system reviews are now essential steps in defending against such sophisticated attacks.
In summary, these incidents reveal how cybercriminals are evolving their techniques. By combining AI-driven reconnaissance with advanced obfuscation, they’re making it harder for companies to protect their software supply chains. The lessons here are clear: organizations must increase visibility across their entire software ecosystem and adopt automated security measures to catch threats early. Even after removing malicious packages, the risk remains if systems were already compromised, so vigilance and proactive security practices are more important than ever.















What do you think?
It is nice to know your opinion. Leave a comment.