PHP disclosed an information disclosure vulnerability in getimagesize(..., $info) affecting JPEG APPn metadata parsing in php-src/ext/standard/image.c. The flaw occurs during multi-chunk reads: php_read_stream_all_chunks() can overwrite the start of the destination buffer without advancing the write pointer, leaving the tail populated with uninitialized or previously freed heap memory. When getimagesize() returns metadata such as $info['APP1'], the application may receive corrupted data containing leaked process memory.
A public proof of concept showed the bug with a crafted JPEG containing a large APP1 segment read through php://filter, using repeated filters to force chunked reads and a heap spray marker to demonstrate memory reuse inside the returned APP1 buffer. The issue was reproduced on a PHP 8.6.0-dev build with AddressSanitizer and debug flags, and the advisory said initial doubts about security impact were revised after maintainers concluded exploitation may also be possible with normal image files if an attacker can predict stream chunk sizes.

Mallory correlates global threat intelligence with your attack surface — know if you’re exposed before adversaries strike.
3 events from the most recent confirmed update back to the earliest known activity.
GitHub published a security advisory for php/php-src describing the zero-day information leak and noting that exploitation might be possible on normal images if an attacker can predict stream chunk sizes. The advisory also documented the root cause in php_read_stream_all_chunks() behavior during chunked reads.
A researcher reported an information disclosure flaw in PHP's getimagesize(..., $info) JPEG APPn metadata parsing in ext/standard/image.c. The issue involved multi-chunk reads corrupting the returned APPn buffer and potentially exposing uninitialized heap memory.
A public php/php-src issue disclosed a proof of concept showing getimagesize() returning corrupted APP1 JPEG metadata and reusing heap contents, including a sprayed marker string found in the returned buffer. The report showed reproduction on a PHP 8.6.0-dev build with AddressSanitizer and debug flags using php://filter to force chunked reads.
Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.
2 references tracked. Mallory keeps watching after this page renders.
Map indicators from this story to your assets and identify affected systems in minutes.
Every observed campaign, victim, and pivot linked to actors named in this story.
Malware, exploits, and IOCs connected to the activity described here.
YARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Get matching new stories delivered to your team as they break — not the next morning.
Ask questions about this story and take action on the answers.