PHP has patched two memory-safety vulnerabilities in its ext/standard image-handling code that can be triggered by specially crafted JPEG input. One issue, tracked as CVE-2025-14177, affects getimagesize and can disclose uninitialized heap memory when JPEG APP segments are read across multiple chunks, potentially exposing server-side data through returned metadata such as APP1. A second flaw in iptcembed can cause a heap buffer overflow and denial of service because the function sizes its output buffer from a single fstat() result and then continues copying data until EOF, creating risk when processing FIFOs, pipes, sockets, or files that grow after the initial size check.
The bugs were discovered by Positive Technologies researcher Nikita Sveshnikov, who published proof-of-concept demonstrations showing both filter-based and direct exploitation paths for getimagesize, as well as a FIFO-based overflow scenario for iptcembed. PHP addressed the flaws by correcting chunk-buffer pointer handling in php_read_stream_all_chunks and adding boundary checks and safer error handling for iptcembed; fixes were released in PHP 8.1.34, 8.2.30, 8.3.29, 8.4.16, and 8.5.1. The most exposed deployments include public upload endpoints, CMS thumbnailing workflows, webmail platforms, and image CDNs that inspect user-supplied images on the server side.

Mallory correlates global threat intelligence with your attack surface — know if you’re exposed before adversaries strike.
5 events from the most recent confirmed update back to the earliest known activity.
Public reporting disclosed the two PHP image-processing vulnerabilities and emphasized exposure for public upload endpoints, CMS thumbnailing systems, webmail services, and image CDNs that inspect user-supplied images. The disclosure noted that both issues had already been patched.
PHP patched both flaws by fixing buffer handling in getimagesize and adding boundary checks and safer error handling in iptcembed. The fixes were released in PHP 8.1.34, 8.2.30, 8.3.29, 8.4.16, and 8.5.1.
The research included practical proof-of-concept demonstrations for both vulnerabilities, including web-like exploitation scenarios for getimagesize and a FIFO-based setup for iptcembed. These demonstrations showed that attacker-controlled files and streams could realistically trigger the bugs.
The getimagesize issue was assigned CVE-2025-14177 after researchers and the vendor determined that multi-chunk reads of JPEG APP segments could leak uninitialized heap memory through returned metadata. The root cause was incorrect chunk concatenation in php_read_stream_all_chunks.
Positive Technologies researcher Nikita Sveshnikov discovered two flaws in PHP's ext/standard extension affecting getimagesize and iptcembed when processing crafted JPEG-related input. The issues enabled heap memory disclosure in one case and a heap buffer overflow/denial of service in the other.
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.