Use After Free Vulnerability in PHP's GC algorithm and unserialize
A use-after-free flaw in PHP's garbage collection algorithm can be triggered via unserialize() when the application serialises and prints the result, and could be remotely exploited.
Originally disclosed on HackerOne
- Fixed in 5 days
- Paid in 5 days
- Disclosed after 37 days
https://bugs.php.net/bug.php?id=72433 This vulnerability was discovered during the auditing of a vendor on Hackerone and could be successfully remotely exploited. The required conditions are a normal PHP setup with a PHP version >= 5.3 and < 7. Further, it is enough if the remote side uses code like the following: $unserialized = unserialize($user_input); print(serialize($unserialized));
Unfortunately, this code pattern is sometimes still used in software making this vulnerability critical.
Please feel free to ask for more technical details if necessary. Thank you for your consideration.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Impact
An attacker could remotely exploit the vulnerability, though the text does not detail the exact impact.
What the attacker needed
PHP version >= 5.3 and < 7; application uses unserialize() on user input; application serialises and prints the result
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
PHP is a programming language used to build websites. A use-after-free bug happens when a program frees memory but then keeps using it. Here, sending crafted input to unserialize() could trigger this bug.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.