The Landscape of Malicious Open Source Packages: 2025 Mid‑Year Threat Report

The Landscape of Malicious Open Source Packages: 2025 Mid‑Year Threat Report
Threat actors are increasingly weaponizing benign open source packages by employing techniques like typosquatting, obfuscation, and multi-stage malware to infiltrate software supply chains and remain undetected. These evolving tactics significantly impact developer ecosystems and software supply chains such as npm, PyPI, and Go Module. #npm #PyPI #GoModule

Keypoints

  • Threat actors exploit typographical similarity in package names (typosquatting) to deceive developers into installing malicious packages that steal sensitive data.
  • Repository and caching abuses, such as the Go Module Mirror caching a backdoored package for years, enable long-term persistence of malicious code.
  • Obfuscation techniques conceal malicious payloads within packages by encoding code and using randomized variable names, hampering static analysis and detection.
  • Multi-stage malware uses deferred payload delivery to reduce initial suspicion, with lightweight loaders fetching more dangerous backdoors post-installation.
  • Automation and AI accelerate the creation and publication of large volumes of obfuscated malicious packages, exploiting hallucinated package recommendations in code assistants and search engines.
  • Legitimate services and developer tools like Gmail, Sentry, and Discord are weaponized to exfiltrate stolen data while blending into normal network activity.
  • Defenders must rely on behavioral detection, strict dependency management, static and dynamic analysis, and specialized tooling to mitigate these supply chain threats effectively.

MITRE Techniques

  • [T1566] Phishing – Used via typosquatting by creating look-alike package names to trick developers into installing malicious packages (“…a typosquatted package harvested Chrome credentials, captured screenshots, and exfiltrated the data…”).
  • [T1027] Obfuscated Files or Information – Employed to hide malicious code using Base64 encoding, randomized variable names, and dense code formatting (“…heavily obfuscated JavaScript code…using randomized variable names and dense formatting…”).
  • [T1105] Ingress Tool Transfer – Implemented by multi-stage malware to download additional payloads after initial installation (“…a post-installation script to silently download a second-stage payload after installation completes…”).
  • [T1562] Impair Defenses – Abuse of caching mechanisms allowing backdoored packages to persist undetected for years in repository mirrors (“…the Go Module Mirror had already cached the malicious version — and continued serving it for three years…”).
  • [T1573] Encrypted Channel – Use of obfuscated shell commands and encoded byte arrays to evade detection and maintain covert communications (“…hidden shell commands reconstructed from byte arrays at runtime…”).
  • [T1071] Application Layer Protocol – Misuse of legitimate services such as SMTP (Gmail), webhooks (Discord), and error tracking tools (Sentry) for covert data exfiltration (“…used the nodemailer library to send stolen Solana private keys via Gmail…”).
  • [T1499] Endpoint Denial of Service – Automated mass publication of malicious packages to overwhelm detection systems and increase distribution (“…a threat actor published 280 malicious packages to npm registry over a single weekend using automation.”).

Indicators of Compromise

  • [IP Address] Command and control server – 49.12.198.231:20022 used in backdoor communication, 172.86.84.38:1224 hosting second-stage payloads.
  • [File Name] Malicious payload files – p.zi and p2.zip used for deferred execution and extraction in multi-stage attacks.
  • [Domain] Malicious download URLs – hxxp://172.86.84[.]38:1224/pdown serving secondary payloads.
  • [Package Names] Typosquatted libraries – metamaks (vs metamask), browser-cookie3 (vs browser-cookies3), @async-mutex/mutex as a malicious npm package.


Read more: https://socket.dev/blog/malicious-open-source-packages-2025-mid-year-threat-report

Views: 32