Security5 min readThe Hacker News

Trivy Hack Spreads Infostealer via Docker, Triggers Worm and Kubernetes Wiper

P
Redakcja Pixelift0 views
Share
Trivy Hack Spreads Infostealer via Docker, Triggers Worm and Kubernetes Wiper

Foto: The Hacker News

More than 100,000 users of a popular vulnerability scanning tool have fallen victim to a sophisticated supply chain attack that turned standard security procedures into a malware infection vector. Cybercriminals utilized fraudulent Docker images, impersonating official Trivy repositories, to distribute infostealers capable of stealing sensitive credentials. The attack was not limited to data theft alone—a worm-like mechanism was identified that allowed the threat to spread autonomously within networks, along with a Kubernetes Wiper module designed to completely destroy container clusters. For IT and DevOps professionals, the global implications are alarming: this incident exposes a critical vulnerability in the trust placed in open-source images, even those intended for system protection. Users must immediately verify the checksums of their tools and transition to a Zero Trust Network Access (ZTNA) model, which restricts lateral movement within infrastructure. Traditional VPN-based security is proving insufficient against threats capable of hijacking administrative privileges and replicating automatically in the cloud. Effective defense today requires not only code scanning but, primarily, rigorous network segmentation and connecting users directly to applications, thereby minimizing the attack surface in the event of a single container compromise.

The supply chain attack on the popular security scanner Trivy is a sobering moment for the DevOps industry. A tool trusted by millions of developers worldwide to detect vulnerabilities in container images has itself become an infection vector. Cybersecurity researchers have identified malicious artifacts distributed via Docker Hub that not only steal data but also exhibit self-replication capabilities within cloud infrastructure and the destruction of Kubernetes clusters.

The scale of the incident is particularly alarming because it strikes at the foundation of trust in the open-source ecosystem. The last safe version of Trivy available in the official repository is 0.69.3. Subsequent releases — 0.69.4, 0.69.5, and 0.69.6 — turned out to be a trap set for administrators who automate the update processes of their CI/CD tools. Although the infected images have already been removed from Docker Hub, their mechanism of action reveals a new era of aggressive malware targeting software engineers.

Anatomy of an infection at the heart of the CI/CD pipeline

The malicious versions of Trivy were designed to avoid suspicion at first glance. They functioned as a classic scanning tool, but in the background, they executed Infostealer scripts. Their primary goal was the exfiltration of sensitive data, such as API keys for public clouds (AWS, Azure, GCP), GitHub tokens, and credentials stored in container environment variables. This is a classic scenario where an attacker seizes the "keys to the kingdom," gaining access to the company's entire source code and infrastructure.

Cybersecurity
Supply chain attacks are becoming increasingly sophisticated, targeting the very tools responsible for security.

However, that is not all. The most destructive element of this attack is a Wiper component, aimed directly at Kubernetes clusters. After obtaining the necessary permissions, the malware attempts to delete critical cluster resources, leading to immediate service paralysis. This action suggests that the perpetrators' intent was not solely financial gain from stolen data, but also large-scale operational sabotage, fitting into the trend of state-sponsored attacks or hacktivist groups.

It is worth noting the Worm mechanism implemented in the malicious images. The malware can scan the local network for other vulnerable Docker instances or open Kubernetes API interfaces to automatically replicate the malicious code. As a result, a single infected developer's machine can become the starting point for infecting an entire fleet of servers within a corporate VPN, bypassing traditional firewalls.

Why traditional protection methods fail

The Trivy incident exposes the weakness of an approach based on uncritically trusting public image registries. Most organizations configure their GitHub Actions or GitLab CI pipelines to always pull the latest version (the :latest tag) of helper tools. In the event of a maintainer account or the registry itself being compromised, malicious code is automatically deployed into the most secure zones of the infrastructure without any human intervention.

  • Third-party dependencies: Even the most secure proprietary code is at risk if the tools used to test it are infected.
  • Lack of checksum verification: Rarely does a development team verify digital signatures or hashes of Docker images before running them.
  • Excessive permissions: Scanning containers often run with root privileges or have access to the docker.sock, allowing malware to take control of the host system.

Technical analysis shows that malicious versions 0.69.4-0.69.6 contained obfuscated Bash scripts that, upon execution, established a connection with a Command & Control (C2) server. Using Trivy as a cover was brilliant in its simplicity — a scanner by nature must analyze system files and connect to vulnerability databases, so its unusual network activity often does not trigger IDS/IPS system alarms.

The necessity of moving to a Zero Trust Image Policy

In the face of such aggressive attacks, the perimeter-based security model no longer exists. The industry must urgently adopt a Zero Trust strategy not only for user access to applications but, above all, in software artifact management. Replacing VPNs with ZTNA (Zero Trust Network Access) solutions is only half the battle; the other half is rigorous control over what we run in our clusters.

A key step for organizations should be moving to the use of private image registries (e.g., Harbor, Amazon ECR), which act as a buffer. Instead of downloading images directly from Docker Hub, they should first be scanned (ironically — by another, verified copy of a scanner) and signed internally. Only such an authorized image has the right to enter the production environment.

Engineers must also start using immutable tags based on the SHA-256 hash instead of text tags. The tag v0.69.3 can be replaced by an attacker, but the unique file content identifier remains unchanged. This is the only way to ensure that the code that passed a security audit a week ago is exactly the same code being run today.

"The attack on Trivy is not just a technical incident; it is a crisis of trust in the tools meant to protect us. If the guard becomes the burglar, we must redefine the entire oversight architecture."

The threat from Supply Chain Attacks will continue to grow. Attackers have realized that instead of directly attacking well-secured banking or government systems, it is better to strike developers who hold broad permissions and often use unsecured, open-source tools. The Trivy case shows that even a momentary lapse in repository management can lead to a global infection, turning a standard work tool into a destructive digital weapon.

It can be assumed that in the near future, we will see a wave of similar attacks on other popular Cloud Native tools. The requirement to provide an SBOM (Software Bill of Materials) for every container image will become standard, allowing for the rapid identification of whether a malicious version of a library or tool is running in our environment. Companies that ignore this trend and stick to the "download and forget" model risk not only data loss but the total annihilation of their cloud infrastructure by automated wipers.

Comments

Loading...