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

Invalid Read on exif_process_SOFn

An invalid read occurs in the exif_scan_thumbnail method when processing a thumbnail. An attacker may be able to read unintended data from memory.

chamal Follow

Originally disclosed on HackerOne

High 7.5 View original
  • Triaged in 2 months
  • Fixed in 19 months
  • Paid in 19 months
  • Disclosed after 19 months

This bug is present in exif_scan_thumbnail method of ext/exif/exif.c file.

Detailed description and steps to reproduce for this bug is present in bug report submitted to php.net. Bug Report : https://bugs.php.net/bug.php?id=77540 PHP version : 7.1.26 CVE-ID : 2019-9640

Impact

This bug may allow an attacker to read unintended data from memory.

The original report as published on HackerOne, by chamal. 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 a missing bounds check in the thumbnail scanning code, leading to an out-of-bounds read.

What the attacker needed

Crafted image file; PHP with EXIF extension

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 report describes a memory safety bug in PHP's EXIF extension, which reads metadata from images. When a specially crafted image is processed, the code reads from a memory location it should not, which could leak data. The report is very brief and points to an external bug tracker for details.

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 chamal

View all

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