Skip to content
Memory corruption Disclosed report Advanced

wddx_deserialize use-after-free

A use-after-free vulnerability in PHP's wddx_deserialize function occurs when parsing a WDDX packet with a recordset element that lacks a closing field tag. An attacker could potentially exploit this to cause memory corruption, though the text does not specify the exact impact.

fms Follow

Originally disclosed on HackerOne

Bounty$500 View original
  • Fixed in 2 days
  • Paid in 2 days
  • Disclosed after 3.1 years

Upstream Bug

https://bugs.php.net/bug.php?id=72860

Summary

wddx_deserialize allows to unserialize a WDDX packet that usually comes from external input.

While WDDX tries to deserialize "recordset" element, use-after-free happens if the close tag for the field is not found.

Patch

http://git.php.net/?p=php-src.git;a=commit;h=780daee62b55995a10f8e849159eff0a25bacb9d

Fixed for PHP 5.6.26 and 7.0.11

http://php.net/ChangeLog-5.php http://php.net/ChangeLog-7.php

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

Root cause

Likely, the WDDX deserializer fails to properly handle a missing closing tag for a field within a recordset, leading to premature freeing of memory that is later accessed.

Impact

An attacker could potentially trigger a use-after-free, though the text does not specify the exact impact.

What the attacker needed

Ability to supply a WDDX packet to wddx_deserialize

The fix

The vulnerability was fixed in PHP 5.6.26 and 7.0.11 via a patch.

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.

WDDX is a data format, and PHP can deserialize it. A use-after-free is a bug where memory is used after being freed. This report shows a malformed WDDX packet can trigger that 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 fms

View all

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