An unknown attacker inserted malicious code into the latest version of the Piwik open-source Web analytics software after compromising the project's website on Monday.
Piwik can be used to track and generate statistics about visitors, ad clicks, website referrers and aspects of a website's traffic. It's similar to Google Analytics but designed to be installed and hosted by website owners on their own servers.
According to its creators, Piwik has been downloaded 1.2 million times and is used on more than 460,000 websites.
However, users who upgraded to Piwik 1.9.2 on Monday between 15:43 and 23:59 UTC might have installed a version of the software with a back door.
"Piwik.org webserver got compromised by an attacker on 2012 Nov 26th," the Piwik administration team said Tuesday in a security advisory. "This attacker added a malicious code in the Piwik 1.9.2 Zip file for a few hours."
The rogue code was inserted at the end of the piwik/core/Loader.php file and used base64 encoding for obfuscation. Users who find the code in their installations should back up the piwik/config/config.ini.php file, delete the whole piwik directory, download a fresh copy from the official website and reinstall the software, the Piwik administrators said.
The hacker compromised the Piwik.org website by exploiting a vulnerability in a third-party plug-in for WordPress - the content management system used on the website - and not by exploiting a vulnerability in the Piwik software itself, the administration team said. "As far as we know, the Piwik software does not have any exploitable security issue."
The Piwik team is working on putting mechanisms in place to reduce the likelihood of a similar compromise happening in the future.
Piwik's developers already take security seriously. The project has a vulnerability bug bounty program in place through which it pays security researchers who responsibly report flaws they find in the software $200 or $500, depending on the bug's severity.
It's not the first time hackers have compromised a software distribution server and placed a back door in software delivered to users. Back in September, hackers inserted a malicious file in the phpMyAdmin package distributed from a compromised Korean SourceForge mirror server. SourceForge is a Web-based collaborative software development and repository platform that hosts more than 324,000 software development projects.
In June 2011, the WordPress development team announced that back doors had been inserted into some fairly popular WordPress plug-ins through the official plug-in repository.
Last week, the FreeBSD Project announced that two of its software building servers had been compromised back in September and said that it cannot guarantee the integrity of any third-party software packages distributed by the project between Sept. 19 and Nov. 11, when the security breach was detected.