Skip to content
Memory corruption Disclosed report Advanced

Use After Free in GC with Certain Destructors

A use-after-free vulnerability in PHP's garbage collector when certain destructors are invoked could allow an attacker to leak arbitrary memory or execute arbitrary code remotely via PHP's object deserialisation functions such as unserialize, phar, or session handling.

ryat Follow

Originally disclosed on HackerOne

  • Triaged in 32 hours
  • Fixed in 14 months
  • Paid in 14 months
  • Disclosed after 15 months

The bug submitted at: https://bugs.php.net/bug.php?id=72530 The fix committed at: http://git.php.net/?p=php-src.git;a=commit;h=60a7e60b61b8e4a3d455974c83f76a26546ce117

Impact

The bug can be abused for leaking arbitrary memory blocks or execute arbitrary code remotely via PHP’s object deserializing. ex: unserialize/phar/session

The original report as published on HackerOne, by ryat. 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

What the attacker needed

PHP application uses unserialize, phar, or session; attacker can supply serialised data

The fix

The bug was fixed in a commit.

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.

This is a memory safety bug in PHP's garbage collector. When certain objects are destroyed, the program may still use memory that has already been freed, which can let an attacker read sensitive data or run their own code. Attackers can trigger this by sending malicious serialised data to PHP applications that use functions like unserialize.

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 ryat

View all

43 more disclosed reports, 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.