Security Experts:

Researchers Used PHP Zero-Days to Hack PornHub

A team of researchers discovered a couple of serious vulnerabilities in PHP and managed to gain remote code execution access on one of the world’s most popular adult websites.

Dario Weißer, Ruslan Habalov and an expert who uses the online moniker “cutz” discovered in late May that they could hack PornHub by leveraging vulnerabilities in PHP.

The researchers said the flaws could have been exploited to dump the website’s entire database, track its users, leak source code, and escalate into the network or root the system. However, they only gathered some information about the system and submitted a report through PornHub’s recently launched bug bounty program.

The company fixed the issue within hours and two weeks later it informed the researchers that they had earned $20,000 for their work.

The zero-day vulnerabilities discovered in the process were disclosed to PHP developers in mid-June, and they were patched on June 23 with the release of PHP 7.0.8, 5.6.23 and 5.5.37.

The PHP issues, tracked as CVE-2016-5771 and CVE-2016-5773, have been described as critical use-after-free flaws caused by the way PHP’s garbage collection algorithm interacts with certain objects. After analyzing the security holes, researchers determined that they can be remotely exploited using PHP’s unserialize function.

It’s worth noting that since a fix from PHP was not available at the time, PornHub resolved the problem by removing calls to the unserialize function.

In addition to the reward from the adult website, the researchers received $1,000 for each of the PHP flaws from HackerOne’s Internet Bug Bounty program, which covers vulnerabilities in open source and core Internet infrastructure software.

“It is well-known that using user input on unserialize is a bad idea. In particular, about 10 years have passed since its first weaknesses have become apparent. Unfortunately, even today, many developers seem to believe that unserialize is only dangerous in old PHP versions or when combined with unsafe classes. We sincerely hope to have destroyed this misbelief,” Habalov said in a blog post.

Related Reading: Fiat Chrysler Launches Bug Bounty Program

Related Reading: Traditional Industries Increasingly Turn to Bug Bounty Programs

Related Reading: Uber Offers up to $10,000 in Bug Bounty Program

view counter
Eduard Kovacs (@EduardKovacs) is a contributing editor at SecurityWeek. He worked as a high school IT teacher for two years before starting a career in journalism as Softpedia’s security news reporter. Eduard holds a bachelor’s degree in industrial informatics and a master’s degree in computer techniques applied in electrical engineering.