Skip to content
Memory corruption Disclosed report Advanced CVE-2019-11042

Out of Bounds Memory Read in exif_process_user_comment

The PHP EXIF extension read past the end of an allocated buffer while parsing user comment data from an image. An attacker could supply a crafted image to cause an out-of-bounds read, which may lead to information disclosure or a crash.

sediruoksitsero Follow

Originally disclosed on HackerOne

Bounty$1,500 High 8.8 View original
  • Triaged in 2 days
  • Fixed in 14 months
  • Paid in 14 months
  • Disclosed after 15 months

I have found and reported an out of bounds memory read in PHP [exif_process_user_comment] When PHP EXIF extension is parsing EXIF information from an image, e.g. via exif_read_data() function, in PHP versions 7.1.x below 7.1.31, 7.2.x below 7.2.21 and 7.3.x below 7.3.8 it is possible to supply it with data what will cause it to read past the allocated buffer. This has been fixed and assigned CVE-2019-11042 The bug report is here: https://bugs.php.net/bug.php?id=78256 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-11042 https://nvd.nist.gov/vuln/detail/CVE-2019-11042

Impact

This may lead to information disclosure or crash.

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

This may lead to information disclosure or crash.

What the attacker needed

Ability to supply an image to PHP EXIF parsing

The fix

It has been fixed; affected versions were below 7.1.31, 7.2.21 and 7.3.8.

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.

When PHP reads metadata from a photo, it copies parts of the file into a small block of memory. A mistake meant it could read slightly beyond that block, picking up whatever data happened to sit next to it. That can leak memory contents or make the program crash.

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 sediruoksitsero

View all

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