Hidden Malware in Open Code

The open-source community has long been a bedrock of innovation and collaboration. But beneath the surface, a darker current flows, one that cyber attackers have learned to exploit with growing sophistication. In a recent wave of disclosures, researchers uncovered malicious packages lurking in widely-used repositories like PyPI and npm, targeting developers and organizations through the very tools meant to empower them.

One such package, chimera-sandbox-extensions, was found on PyPI and had already attracted 143 downloads before its true nature was revealed. Disguised as a legitimate helper module for the Chimera Sandbox, a platform for machine learning experimentation, it was anything but helpful. Once installed, it quietly siphoned sensitive information including AWS credentials, CI/CD tokens, Jamf configuration data, and even Zscaler host details. MacOS systems, often overlooked in malware discussions, were not spared.

What’s chilling is the package’s design. It uses a Domain Generation Algorithm (DGA) to retrieve and execute a second-stage payload, one that transforms into a highly capable data stealer. It’s not a clumsy smash-and-grab it evaluates targets, then decides whether to proceed with deeper exploitation.

As if that weren’t enough, a separate investigation revealed multiple npm packages engineered for remote code execution and payload delivery. The cleverly obfuscated soldiers package, for instance, activates malicious code immediately upon installation using post-install scripts. Another, eslint-config-airbnb-compat, hid its second-stage payload within a transitive dependency, relying on JavaScript’s flexibility and obfuscation potential to mask its real intentions.

Some attacks even employed surreal complexity such as encoding .NET malware within the final pixels of an image hosted on ImgBB. The payload was later decrypted, reconstructed in memory, and executed bypassing traditional detection methods. It’s a reminder that attackers are not just leveraging advanced tools, but also adopting creative, multilayered approaches to stay ahead.

At the core of these threats lies a disturbing trend: malware embedded directly within developer toolchains. From crypto-targeting clippers and wallet drainers to credential stealers, the open-source supply chain is being targeted with increasing frequency and precision. Developers working on blockchain, financial services, and Web3 applications are especially vulnerable.

Slopsquatting a rising threat powered by AI-assisted coding only adds to the chaos. Language models hallucinate plausible-sounding package names. When these hallucinations are weaponized by adversaries who pre-register them on public registries, the result is an invisible trap. Developers, unaware of the bait, inadvertently bring threats into their environments.

These attacks may seem random on the surface, but they are anything but. They are calculated, deliberate, and often aimed at high-value enterprise and infrastructure targets. Healthcare, financial services, manufacturing, and government entities are prime targets precisely because of the sensitive data and systems they manage.

Conclusion:
Malicious actors are embedding themselves deeper into the software supply chain, hiding in plain sight within open-source dependencies and development workflows. Their methods are no longer rudimentary. They are persistent, nuanced, and capable of bypassing traditional security layers. As the boundaries between AI development, DevOps, and cybersecurity blur, so too must our defenses evolve.

Security is no longer just about patching vulnerabilities; it’s about understanding intent, recognizing patterns of abuse, and guarding every phase of development with vigilance.

About COE Security:
COE Security partners with organizations in financial services, healthcare, retail, manufacturing, and government to secure AI-powered systems and ensure compliance. Our offerings include:
  • AI-enhanced threat detection and real-time monitoring
  • Data governance aligned with GDPR, HIPAA, and PCI DSS
  • Secure model validation to guard against adversarial attacks
  • Customized training to embed AI security best practices
  • Penetration Testing (Mobile, Web, AI, Product, IoT, Network & Cloud)
  • Secure Software Development Consulting (SSDLC)
  • Customized CyberSecurity Services

We also assist in proactively defending against emerging threats in the software supply chain, including social engineering, slopsquatting, and malware hidden in development tools. Our solutions are tailored to help industries such as healthcare, finance, and the public sector mitigate risks at the intersection of code, compliance, and cybersecurity.

Follow COE Security on LinkedIn for ongoing insights into safe, compliant AI adoption and evolving threat landscapes. Stay updated. Stay cyber safe.

Click to read our Linkedin feature article