Skip to content
Memory corruption Disclosed report Advanced

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.

Ruslan Habalov Follow

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.

The original report as published on HackerOne, by evonide. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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.

More by Ruslan Habalov

View all

1 more disclosed report, best first.

More from Internet Bug Bounty

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.