cPGuard update breach planted a Linux server backdoor
The cPGuard update breach allowed an unidentified attacker to distribute a malicious script, a set of automated commands, to customers' Linux servers through the security tool's own update system. OPSSHIELD, which makes cPGuard, said the script installed a backdoor, a hidden method of retaining access, and collected password hashes and other sensitive files. Some of the stolen data was subsequently taken by the attacker.
The attacker entered the update system at 02:06 UTC on November 2 using compromised credentials. Affected updates were released as cPGuard versions 5.88.12 through 5.88.19. OPSSHIELD said it detected the attack within 12 hours of those versions being distributed, cleared its infrastructure credentials and prevented the script from reaching additional servers. The company is still investigating how the attacker obtained the credentials, and the attacker has not been identified.
OPSSHIELD has not disclosed how many servers installed an affected release. Because servers check for updates at different intervals, some systems may never have downloaded or run the script. Administrators can search the cPGuard installation log with this command:
grep 'Successfully updated' /opt/cpguard/logs/install_log
A log entry showing any version from 5.88.12 through 5.88.19 confirms that the affected update was installed. It does not prove that the malicious script executed or that information left the server, but OPSSHIELD says the system should still be considered potentially compromised. That remains true even if it has since been upgraded to cPGuard 5.88.25 or later. No matching record is not definitive either, because the log could be absent or incomplete. Administrators who cannot establish what happened can contact OPSSHIELD Support.
According to OPSSHIELD's investigation, the script targeted /etc/shadow and /etc/passwd, root's configuration file named my.cnf for either of two related open-source database servers, root's shell history, and root's SSH authorization and known-hosts files. Root is the Linux account with complete control over a server. Shell history records commands previously entered by that account. SSH, or Secure Shell, is a system for securely signing in to and controlling another computer. OPSSHIELD cautioned that the script may not have collected every listed file from every affected server and is still determining exactly what left each system.
The /etc/shadow file contains one-way password hashes, which are calculated representations of passwords rather than the passwords themselves. An attacker can test guesses against those hashes without repeatedly connecting to the server. Weak, common or previously leaked passwords may therefore be recovered, while strong passwords must still be changed because the hashes were exposed. Secrets stored in the database configuration or shell history do not have this hashing protection and may have been copied in readable form.
The script sent its collection to an OPSSHIELD licensing server through a compromised account, allowing the attacker to retrieve it later. OPSSHIELD said it has secured that account. By late November 2 UTC, the company estimated that the attacker had taken 32 files, each associated with one customer server. That figure covers only files known to have been retrieved, may change, and does not establish the total number of potentially affected servers. Beyond the collection and the backdoor, OPSSHIELD had found no other malicious activity at that stage, but described the finding as provisional.
Administrators should run cpgcli update --start on every cPGuard server, then run cpgcli --version and verify that the result is 5.88.25 or later. These releases remove the backdoor and the files left by the script. If the update fails or reports an older version, OPSSHIELD advises contacting its support team. Updating alone is not enough because copied passwords, access tokens and cryptographic keys may continue to work after the malicious files are removed.
For every server where the script ran or may have run, OPSSHIELD recommends resetting the root password and the passwords of all other local Linux accounts from a trusted recovery environment, meaning a separate, known-clean system used to repair the server. Reused versions of those passwords should be changed on other services from a trusted device. Administrators should also rotate database passwords, S3 access keys, DigitalOcean tokens and any other secrets present in root's shell history.
SSH private keys under /root/.ssh must also be replaced. A private key is a secret file used to prove that a user is authorised to connect. Administrators must remove each corresponding old public key from every other system that trusted it. OPSSHIELD is not recommending a routine operating system rebuild or full reset at present, although that advice may change as the investigation develops. Servers showing other signs of compromise, or systems that cannot be confirmed clean, should receive a case-by-case review from OPSSHIELD Support, which may result in a rebuild.
As an additional precaution, OPSSHIELD is releasing another update to remove its support-access keys from servers where customers had previously enabled them. Support access lets OPSSHIELD staff troubleshoot a server by adding the company's SSH public key to root's authorized_keys file, the list of keys permitted to sign in. OPSSHIELD has not said whether the matching private key was exposed during the incident.
OPSSHIELD identified the malicious script as cpguard-v58812-i91511.sh. It created the backdoor shell /var/tmp/.cpg91511_sh, used /var/tmp/.cpg91511 to gather files and prepared the archive /var/tmp/.cpg91511/loot.tgz. Version 5.88.25 and later remove the backdoor shell and collection directory, so their absence after an update does not show that the script never ran. For organisations reassessing infrastructure security after an incident like this, AEU-I provides security-first IT, infrastructure and consulting. The essential response remains to update, investigate every potentially affected server and replace all credentials that the script could have reached.