Skip to content
Memory corruption Disclosed report Advanced CVE-2017-16642CVE-2017-11145

Out-Of-Bounds Read in timelib_meridian()

An invalid dateTime value passed to wddx_deserialize() caused a heap out-of-bounds read in timelib_meridian(), potentially allowing remote peeking of process memory. The issue affected PHP 5 before 5.6.32 and PHP 7 before 7.1.11.

xixabangm4 Follow

Originally disclosed on HackerOne

Bounty$500 Medium 5.3 View original
  • Disclosed after 24 months

Description While deserializing an invalid dateTime value, wddx_deserialize() would result in a heap out-of-bounds read in timelib_meridian(). As wddx_deserialize() is exposed to network data, and sometimes echo the results back to client, this issue could potentially allow remote peeking of the process memory. It should also affect other PHP APIs that make use of timelib_meridian(). This issue is similar to but is a separate issue of CVE-2017-11145, it is related to the "back of" and "front of" directives in the timelib format.

Details can be found at: https://bugs.php.net/bug.php?id=75055

Impact Affects both PHP 5 before 5.6.32 (ChangeLog http://www.php.net/ChangeLog-5.php#5.6.32) and PHP 7 before 7.1.11 (ChangeLog http://www.php.net/ChangeLog-7.php#7.1.11). Resolved PHP bug report, will update the pending CVE.

The original report as published on HackerOne, by xixabangm4. 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 date parsing code did not properly validate the input length before reading, leading to an out-of-bounds read when handling malformed 'back of' or 'front of' directives.

Impact

This could potentially allow remote peeking of the process memory, though the text does not confirm successful exploitation.

What the attacker needed

Network access to wddx_deserialize()

The fix

The issue affected PHP 5 before 5.6.32 and PHP 7 before 7.1.11.

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.

A function that parses dates could read past the end of a memory buffer when given a malformed date. Because the input can come from the network, an attacker might be able to see small pieces of the server's memory in the response.

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 xixabangm4

View all

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