Malicious Laravel Packages on Packagist Deliver Persistent Remote Access Trojan

Related

Python-Based PyRAT Targets Windows and Linux Systems

What happened K7 Security Labs researchers identified a Python-based remote...

Share

What happened

Security researchers have uncovered malicious PHP packages on the Packagist repository that masquerade as helpful Laravel utilities but install a persistent remote access trojan (RAT) when included as dependencies.

Who is affected

Developers and organizations using Laravel who have installed nhattuanbl/lara-helper, nhattuanbl/simple-queue, or nhattuanbl/lara-swagger in their applications are at risk, as these packages either contain or pull in the RAT payload.

Why CISOs should care

This incident represents a software supply chain compromise where trusted package repositories are leveraged to deliver malware. A successful install gives attackers full remote control over affected hosts, access to environment variables (including credentials), and persistence across platforms (Windows, macOS, Linux), posing a severe operational and data security risk. 

3 practical actions

  1. Audit dependencies: Immediately scan Laravel projects for the identified malicious packages and any transitive dependencies that may pull them in, removing them from codebases and build pipelines.
  2. Assume compromise & remediate: For systems that installed the packages, treat them as compromised; rotate all secrets (API keys, database credentials, .env variables) and review network logs for outbound connections to suspicious command-and-control domains.
  3. Improve supply chain controls: Enforce strict package vetting in CI/CD workflows, avoid unpinned dev-master dependencies in production, and integrate automated security scanning tools to catch malicious or obfuscated code before it reaches production.