Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2025-14177: CWE-125 Out-of-bounds Read in PHP Group PHP

0
Medium
VulnerabilityCVE-2025-14177cvecve-2025-14177cwe-125
Published: Sat Dec 27 2025 (12/27/2025, 19:33:23 UTC)
Source: CVE Database V5
Vendor/Project: PHP Group
Product: PHP

Description

In PHP versions:8.1.* before 8.1.34, 8.2.* before 8.2.30, 8.3.* before 8.3.29, 8.4.* before 8.4.16, 8.5.* before 8.5.1, the getimagesize() function may leak uninitialized heap memory into the APPn segments (e.g., APP1) when reading images in multi-chunk mode (such as via php://filter). This occurs due to a bug in php_read_stream_all_chunks() that overwrites the buffer without advancing the pointer, leaving tail bytes uninitialized. This may lead to information disclosure of sensitive heap data and affect the confidentiality of the target server.

AI-Powered Analysis

AILast updated: 12/30/2025, 23:41:30 UTC

Technical Analysis

CVE-2025-14177 is an out-of-bounds read vulnerability classified under CWE-125 affecting multiple PHP versions from 8.1 up to 8.5.1. The vulnerability exists in the getimagesize() function, which is used to obtain image dimensions and metadata. Specifically, when processing images in multi-chunk mode (e.g., using php://filter streams), the internal function php_read_stream_all_chunks() incorrectly handles buffer pointers by overwriting the buffer without advancing the pointer. This results in tail bytes of the buffer remaining uninitialized. Consequently, these uninitialized bytes can leak heap memory contents into APPn segments such as APP1, which are part of image metadata segments. This leakage can expose sensitive information residing in heap memory, potentially including cryptographic keys, session tokens, or other confidential data. The vulnerability is remotely exploitable over the network without requiring authentication or user interaction, but the attack complexity is high due to the need to craft specific image streams triggering the bug. The CVSS v4.0 score is 6.3 (medium severity), reflecting the moderate impact on confidentiality with no impact on integrity or availability. No public exploits or active exploitation have been reported to date. The vulnerability affects a broad range of PHP versions widely used in web servers and applications, making it relevant for many environments that process user-supplied images or use image metadata extraction.

Potential Impact

For European organizations, this vulnerability poses a confidentiality risk by potentially exposing sensitive heap memory data through image processing functions in PHP-based web applications. Organizations that rely on PHP for web hosting, content management systems, or custom web applications that handle image uploads or processing are particularly at risk. The information leakage could aid attackers in further compromising systems by revealing secrets such as authentication tokens or internal memory layout details. Although the attack complexity is high and no known exploits exist, the widespread use of PHP in Europe means many organizations could be vulnerable if not patched. This could impact sectors with high data sensitivity such as finance, healthcare, government, and e-commerce. The vulnerability does not affect integrity or availability directly but could be a stepping stone for more severe attacks if combined with other vulnerabilities.

Mitigation Recommendations

European organizations should prioritize upgrading PHP to the fixed versions: 8.1.34 or later, 8.2.30 or later, 8.3.29 or later, 8.4.16 or later, and 8.5.1 or later. Until upgrades are applied, organizations should audit and restrict the use of the getimagesize() function, especially when processing untrusted image inputs or streams. Implement strict input validation and sanitization for image uploads to reduce the risk of triggering the vulnerability. Employ web application firewalls (WAFs) with rules to detect and block suspicious image payloads or unusual php://filter usage patterns. Monitor application logs for anomalous image processing requests. Additionally, consider isolating PHP image processing in sandboxed environments to limit potential data exposure. Regularly review and update PHP and related dependencies as part of patch management processes. Finally, conduct security testing focused on image handling components to detect any residual risks.

Need more detailed analysis?Upgrade to Pro Console

Technical Details

Data Version
5.2
Assigner Short Name
php
Date Reserved
2025-12-06T06:23:06.907Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 695450badb813ff03e2bf7df

Added to database: 12/30/2025, 10:22:50 PM

Last enriched: 12/30/2025, 11:41:30 PM

Last updated: 2/6/2026, 6:39:25 PM

Views: 7763

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats