Latest

Cybersecurity

cPGuard served a backdoor to thousands of hosting servers

cPGuard distributed a backdoor between November 2 and 3 from its own update CDN. Which versions are affected and which credentials to rotate.

cPGuard served a backdoor to thousands of hosting servers
cPGuard served a backdoor to thousands of hosting servers

Anyone administering hosting servers with the security panel installed received on November 2 an update signed by their provider and, with it, a backdoor. It was not a software flaw or a vulnerability that someone could have patched in time: someone got into the distribution channel of cPGuard, the product of the company OpsShield, and published malicious code as if it were a legitimate version.

The incident was uncovered by the provider itself on November 3, a day after the poisoned updates began going out, at 02:06 UTC on November 2. The affected versions are 5.88.12 and the six following up to 5.88.19, according to the incident review published by the newsletter Patchwork de heise on November 4. Version 5.88.25 removes the backdoor and the script that installs it.

The severity lies not in what the code did, which is the usual in these cases, but in where it ran. A hosting control panel runs with root privileges, sees every account on the server and stores the credentials of the databases it administers. Anything that panel installs on its own inherits the same level of trust, and in this case it inherited it for almost two days on thousands of machines.

What did the script do and why does it have no CVE?

The malicious script installed a backdoor and stole data from the server. The data a hosting panel has at hand is exactly what is needed to get back in without asking permission: account passwords, database credentials, cloud service secrets and SSH keys of the hosted users.

No CVE has been assigned and it is not an administrative oversight. A CVE describes a weakness in the code that can be fixed with a patch; here the code was correct, but the delivery mechanism was not. What failed was the chain that turns a commit into an update that thousands of servers accept without asking where it comes from, something no vulnerability database knows how to describe.

A code flaw can be audited before installing; an update that arrives through the official channel cannot. That asymmetry is what turns the provider into part of your attack surface.

That distinction matters for anyone who has to decide what to do now. A CVE is resolved by updating and checking the version; a compromised distribution channel forces you to assume the attacker was inside the server with maximum permissions and to treat it as a full intrusion, not as a flaw pending a patch.

The CDN was the weak point, not the code

The cause documented by the provider is the theft of the access credentials to the CDN that serves the updates. With those credentials in hand, the attacker does not need to find a flaw in the panel or convince anyone: they publish the package where the panel will look for it and wait for the servers to update themselves, which is exactly what they are asked to do.

This pattern has already appeared twice on the site in recent weeks. Version 1.107.0 of LiteLLM was distributed poisoned and stole keys on Python startup, with the same underlying mechanism: the package you install is not the one the project wrote. The difference is the level of privilege. A compromised Python library runs code with the permissions of the application that imports it; a compromised hosting panel runs code with the permissions of the entire machine.

There is an uncomfortable detail that explains why these attacks work so well. A good part of the infrastructure that runs the internet depends on projects with one-person teams, and those teams cannot afford a package-signing system with keys separate from the deployment server. When the CDN credential is worth as much as the signing key, the lock secures nothing.

The loot extracted from each server

The provider's notice is explicit about what must be rotated: passwords, database credentials, cloud secrets and SSH keys. The list is not a formality, it is a description of the loot. An attacker with access to the panel for two days could read everything the panel stores in plaintext in order to connect to its clients' services.

None of those credentials shows up in a vulnerability scan, because they are not a flaw: they are the inventory the panel needs to function and that an attacker can read in full in a single query.

The rotation order should follow the damage, not convenience. First the SSH keys of users with server access and the credentials of the main database, because with them you get in without depending on anything else. Then the secrets of cloud services, which usually give access to storage and billing. Last the passwords of the hosted accounts, which are many and whose forced rotation is harder to explain to the client.

Rotating is not enough if you do not review what was done with the credentials while they were valid. The panel's access logs, the scheduled tasks created on those dates and the users added to the system are the three places where the trace of an intrusion that has already ended usually appears. Anyone who only changes passwords and does not look at those three logs is left wondering whether the attacker is still inside.

How do you know if your server was exposed?

The check starts with the installed version of the panel. If it is between 5.88.12 and 5.88.19, the server ran third-party code and must be assumed compromised until proven otherwise. If it is on 5.88.25 or higher, the backdoor is removed, but rotating credentials is still necessary because removing the program does not invalidate what has already been copied.

It is also worth reviewing the panel's update history and cross-checking it with the dates of the incident. A server that was not updated on those two days may have been saved by sheer neglect, and it is worth knowing that before ordering a mass rotation for all clients.

The useful question is not whether the panel is up to date today, but when it was last updated and who could publish at its origin during those two days in November. The first is answered with a glance; the second, almost never.

The advisory also calls for checking whether the panel has automatic updates enabled, which in this case was the vector. Disabling them now would not have prevented anything if the administrator had updated manually the next day, so the sensible decision is not to turn off automatic updates but to require the provider to sign them in a way that it cannot itself forge.

The pattern that keeps repeating in the supply chain

Over the past fifteen days the site has covered three incidents with the same skeleton: LiteLLM, the php2shell flaw and now cPGuard. None of the three was born from a brilliant programming error; all three were born from a poorly protected distribution credential and from a community that installs whatever the repository serves it.

The practical lesson is that a server's software inventory can no longer be a list of packages. It has to include where those packages come from, who can publish at that origin and what it would take to forge an update. That information does not appear in any vulnerability management tool, and it is what distinguishes those who can respond in two hours from those who found out through the press.

For shared hosting customers the question is more uncomfortable, because they do not choose the panel: they can only demand that the provider publish its update signing policy and its rotation plan.

What a hosting panel should demonstrate from now on

Version 5.88.25 fixes this specific incident, but it does not fix the model. A panel that updates itself with credentials worth as much as the signing key becomes vulnerable again the next time someone steals those credentials, and the next advisory will again take a day to arrive.

It is reasonable to ask three things of any panel that runs as root: package signing with a key separate from the deployment server, a public record of which version was published and when, and the ability to pin a specific version without the automatic one overwriting it. All three have existed in the ecosystem for years and none is expensive to implement. Until they arrive, the answer is the same as for every incident of this kind. If your panel was among the affected versions, the new version removes the backdoor but does not undo the theft. The credentials that passed through that server over two days must be treated as compromised and all changed, starting with those that open the door without asking for anything else.

José Maldonado

Author

José Maldonado

Activist and blogger on technology, free software and blockchain.

The latest
From Huang to Botín, from Zara to Byron: corporate responsibility in global capitalism

Keep reading