- by x32x01 ||
In 2016, three security researchers discovered two critical PHP vulnerabilities that allowed them to achieve Remote Code Execution (RCE) on Pornhub's servers. Their discovery earned them $22,000 in bug bounty rewards and helped expose serious risks in PHP's object deserialization process.
The
The two vulnerabilities worked as follows:
These flaws could allow attackers to execute arbitrary code or crash the application through carefully crafted serialized data.
The potential impact included:
Pornhub's payment was its first reported bug bounty payout after launching its program in 2016.
Security lesson: Never blindly pass untrusted, user-controlled data to PHP's
For applications that need to exchange structured data, JSON is generally a safer choice when PHP object serialization is not required.
🔍 What Happened?
In July 2016, Pornhub announced a $20,000 bug bounty payment to three researchers:- Dario Weißer (
@haxonaut) - Ruslan Habalov (
@evonide) - Cutz
CVE-2016-5771CVE-2016-5773
unserialize() function.⚙️ How Did the PHP Vulnerabilities Work?
Both vulnerabilities exploited memory-management problems involving PHP's garbage collector.The
unserialize() function converts serialized data back into PHP values and objects. When an application processes untrusted serialized data, specially crafted input can trigger unexpected behavior.The two vulnerabilities worked as follows:
| Vulnerability | Description |
|---|---|
| CVE-2016-5771 | Use-After-Free in PHP's SPL extension involving SplArray. |
| CVE-2016-5773 | Use-After-Free in the ZIP extension involving the ZipArchive class. |
💀 What Could Attackers Do?
By successfully exploiting the vulnerabilities, the researchers demonstrated Remote Code Execution on Pornhub's servers.The potential impact included:
- Accessing sensitive server files.
- Reading website database information.
- Exposing source code from co-hosted websites.
- Monitoring user activity.
- Moving deeper into the internal network.
- Potentially escalating privileges to root.
💰 How Did They Earn $22,000?
The researchers received rewards from two sources:| Reward Source | Amount |
|---|---|
| Pornhub Bug Bounty | $20,000 |
| Internet Bug Bounty (HackerOne) | $2,000 |
| Total | $22,000 |
🛡️ How Were the Vulnerabilities Fixed?
PHP developers released security fixes in these versions:- PHP 7.0.8
- PHP 5.6.23
- PHP 5.5.37
Security lesson: Never blindly pass untrusted, user-controlled data to PHP's
unserialize() function.For applications that need to exchange structured data, JSON is generally a safer choice when PHP object serialization is not required.