CVE-2025-14177: Uninitialized heap memory disclosure in PHP getimagesize()
- Vendor
- PHP Group
CVE-2025-14177 is an information-disclosure vulnerability in PHP getimagesize() affecting PHP 8.1 before 8.1.34, 8.2 before 8.2.30, 8.3 before 8.3.29, 8.4 before 8.4.16, and 8.5 before 8.5.1. When a JPEG APP segment is read across multiple chunks, php_read_stream_all_chunks() fails to advance the destination buffer pointer between reads. Subsequent chunks overwrite the beginning of the buffer, leaving trailing bytes uninitialized. These bytes can be returned to PHP code through the optional image-information array's APPn entries, potentially exposing sensitive process heap contents. Both filter-based and filterless stream-processing scenarios can trigger the flaw.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation can disclose residual data from the PHP process heap through returned JPEG APP metadata. Server confidentiality is affected if the application exposes that metadata to an attacker. The disclosed information depends on heap contents and application behavior. This vulnerability does not establish code execution, data modification, or denial of service.
Mitigation
If you can’t patch tonight, do this now.
Until patched, reduce exposure by preventing untrusted JPEGs from reaching the affected getimagesize() processing path and by avoiding disclosure of returned APPn metadata to untrusted clients. Disabling filter-based input alone is insufficient because ordinary streams can also trigger multi-chunk reads. These measures reduce exposure but do not correct the memory-handling defect.
Remediation
Patch, then assume compromise.
Upgrade to PHP 8.1.34, 8.2.30, 8.3.29, 8.4.16, or 8.5.1 or later in the corresponding branch, or install a vendor package containing the backported fix. The fix advances the destination buffer pointer after each read so that chunks are appended correctly. Distribution-specific fixed packages include Debian php8.2 8.2.30-1~deb12u1 and php8.4 8.4.16-1~deb13u1.
Exploits
2 exploits validated by Mallory's analysis.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Frequently asked questions
- Is CVE-2025-14177 exploited in the wild?
- As of Oct 25, 2026, Mallory has no reports of CVE-2025-14177 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2025-14177?
- Yes. Mallory tracks 2 public exploits or proofs of concept for CVE-2025-14177, the earliest disclosed Apr 29, 2026.
- Is there a patch for CVE-2025-14177?
- Upgrade to PHP 8.1.34, 8.2.30, 8.3.29, 8.4.16, or 8.5.1 or later in the corresponding branch, or install a vendor package containing the backported fix. The fix advances the destination buffer pointer after each read so that chunks are appended correctly.
- What products are affected by CVE-2025-14177?
- PHP Group Php.
- How severe is CVE-2025-14177?
- CVE-2025-14177 has a CVSS v4 score of 6.3 (Medium) and an EPSS score of 0.50% (44th percentile) as of Oct 25, 2026.
Recent activity
25 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.