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.
- 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
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.