The maintainers of the PHP programming language confirmed that threat actors may have compromised a user database containing their passwords.
The maintainers of the PHP programming language have provided an update regarding the security breach that took place on March 28.
Unknown attackers hacked the official Git server of the PHP programming language and pushed unauthorized updates to insert a backdoor into the source code. On March 28, the attackers pushed two commits to the “php-src” repository hosted on the git.php.net server, they used the accounts of Rasmus Lerdorf, the PHP’s author, and Jetbrains developer Nikita Popov.
Below a summary provided by Nikita Popov on what has emerged during the investigation:
- We no longer believe the git.php.net server has been compromised. However, it is possible that the master.php.net user database leaked.
- master.php.net has been migrated to a new system main.php.net.
- All php.net passwords have been reset. Go to https://main.php.net/forgot.php to set a new password.
- git.php.net and svn.php.net are both read-only now, but will remain available for the time being.
Popov explained that further investigation into the incident revealed that the commits were also pushed via HTTPS and password-based authentication.
“Something I was not aware of at the time is that git.php.net (intentionally) supported pushing changes not only via SSH (using the gitolite infrastructure and public key cryptography), but also via HTTPS. The latter did not use gitolite, and instead used git-http-backend behind Apache2 Digest authentication against the master.php.net user database.” continues Popov. “I’m not sure why password-based authentication was supported in the first place, as it is much less secure than pubkey authentication. Based on access logs, we can determine that the commits were indeed pushed using HTTPS and password-based authentication. An excerpt of relevant log entries is shown below”
Popov pointed out that the attackers only made only a few attempts to guess usernames, and one attempt was successful. At the time of this writing, it is not clear if the credentials of this specific user in the database of master.php.net has been leaked because apparently, the attackers had no reason to guess usernames once compromised the database.
The PHP maintainers also noticed that master.php.net system, which is used for authentication and various management tasks, was running very old code and was based on a very old operating system / PHP version.
Below a list of improvements implemented to secure this system:
- master.php.net was migrated to a new system (running PHP 8) and renamed to main.php.net at the same time. Among other things, the new system supports TLS 1.2, which means you should no longer see TLS version warnings when accessing this site.
- The implementation has been moved towards using parameterized queries, to be more confident that SQL injections cannot occur.
- Passwords are now stored using bcrypt.
- Existing passwords were reset (use main.php.net/forgot.php to generate a new one).
The maintainers have already migrated master.php.net to a new main.php.net system which provides support for TLS 1.2, they have also forced password reset and replaced the MD5 hashing function with the bcrypt a password-hashing function.
If you want to receive the weekly Security Affairs Newsletter for free subscribe here.
Follow me on Twitter: @securityaffairs and Facebook
(SecurityAffairs – hacking, data breach)
You may be interested in...
The post User database was also hacked in the recent hack of PHP ‘s Git Server appeared first on Security Affairs.
If you like the site, please consider joining the telegram channel or supporting us on Patreon using the button below.