PHP vulnerabilities
136 known CVE vulnerabilities in PHP, translated and rated.
- CVE-2026-13081Unknown
This CVE has been rejected. Reason: Red Hat is not the CNA for PHP. CVE was reserved in error; the appropriate CNA should assign CVE IDs for these vulnerabilities.
- CVE-2026-13047Unknown
This CVE has been rejected. Reason: Red Hat is not the CNA for PHP. CVE was reserved in error; the appropriate CNA should assign CVE IDs for these vulnerabilities.
- CVE-2026-129496Critical
Timezone cache use-after-free can lead to remote code execution. In non-thread-safe builds, a diagnostic written to a file-based error_log during module startup, for example for an invalid date.timezone value or a session configuration warning, causes the timezone cache to be allocated in startup memory that is freed while a reference to it is kept. A diagnostic raised early in the first request of a worker, such as the max_input_vars warning, then accesses the freed cache. On such a deployment an unauthenticated remote attacker can crash PHP-FPM, Apache mod_php or CGI workers with a crafted request. Arbitrary code execution may be possible and has been demonstrated with known memory addresses. This issue affects PHP versions before 8.2.36, 8.3.* before 8.3.37, 8.4.* before 8.4.28 and 8.5.* before 8.5.13.
- CVE-2026-129481Critical
The session extension records the executing script's filename when a session starts. If a fatal error occurs in an application callback while session variables are destroyed at shutdown (e.g. stream_close() of a user-defined stream wrapper), the pointer is retained after request memory is freed, and a later request handled by the same worker can free the stale string. An attacker who can trigger such a failing cleanup may crash the worker or corrupt memory; code execution has not been demonstrated. This requires the filename to be allocated in request memory, e.g. when the script is not cached by OPcache.
- CVE-2026-129474Critical
When collecting the arguments of a method call handled by __call() or __callStatic() for a backtrace, PHP can read stale values that may refer to freed memory. If a fatal error (e.g. exceeding memory_limit) occurs while entering such a call, with fatal_error_backtraces enabled (the default) and zend.exception_ignore_args disabled, a remote attacker controlling request data may cause memory corruption, crash the PHP worker or, with knowledge of memory addresses, execute arbitrary code. php.ini-production enables zend.exception_ignore_args, which prevents this.
- CVE-2026-129289Critical
PHP-FPM request smuggling through an unread HTTP request body. PHP does not discard the unread part of an HTTP request body at request shutdown when the application has opened php://input without reading it to the end. When the front end reuses backend connections, which is not the default in nginx or Apache (for example nginx with fastcgi_keep_conn on, or Apache mod_proxy_fcgi with enablereuse=on), PHP-FPM can parse the leftover bytes as a new FastCGI request. An unauthenticated remote attacker can use a single crafted multipart/form-data request to forge a backend request with chosen parameters such as SCRIPT_FILENAME, REMOTE_ADDR and PHP_ADMIN_VALUE, which can lead to execution of attacker-controlled PHP code. With LSAPI, subsequent requests on the connection can be disrupted. This issue affects PHP versions before 8.2.36, 8.3.* before 8.3.37, 8.4.* before 8.4.28 and 8.5.* before 8.5.13.
- CVE-2026-129182Critical
A fatal error raised while modified INI settings are restored during request shutdown can repopulate the stored fatal error backtrace after the executor has been cleaned up. Request memory is then freed, and a diagnostic emitted before executor initialization in a later request handled by the same PHP-FPM or mod_php worker can access the stale backtrace. The shutdown error requires per-path configuration of max_memory_limit, or of zlib.output_compression together with output_handler (which .user.ini can also set). The early diagnostic requires Apache per-directory configuration or, for PHP-FPM, a PHP_VALUE or PHP_ADMIN_VALUE parameter sent by the front end. This can cause memory corruption and worker crashes, and may allow remote code execution.
- CVE-2026-126714Critical
Partially overwritten session files can lead to remote code execution. The files session save handler, which is the default, writes updated session data into the existing session file without first clearing it. If a write is interrupted, the file can contain the beginning of the new session followed by the end of the old one, and bytes of an ordinary string can later be unserialized as objects. An attacker who can influence the session data, for example through session upload progress, and interrupt a write at a suitable point may inject objects, which can lead to code execution when the application contains a suitable gadget chain. Session data can also be corrupted. This issue affects PHP versions before 8.2.36, 8.3.* before 8.3.37, 8.4.* before 8.4.28 and 8.5.* before 8.5.13.
- CVE-2026-115560Critical
Session serializer mismatch can lead to remote code execution. Session upload progress, when enabled, can store attacker-controlled data in a session key using the php_binary or php_serialize session serializer. If the same session is later read with the php serializer, because session.serialize_handler is changed at runtime or differs between applications sharing a session store, bytes inside the key can be passed to the unserializer. A remote attacker able to submit a multipart upload can inject objects, which may lead to code execution when the reading application contains a suitable gadget chain, or to session corruption or denial of service. This issue affects PHP versions before 8.2.36, 8.3.* before 8.3.37, 8.4.* before 8.4.28 and 8.5.* before 8.5.13.
- CVE-2026-109619HighActively exploited
PHP has global state that temporarily points into request memory. In some scenarios, this state may not be correctly reset or may be repopulated after reset, referring to freed request memory. Subsequent requests may read or branch on this stale state before full initialization, potentially leading to remote code execution (RCE).
- CVE-2026-109618CriticalActively exploited
PHP uses longjmp() for out-of-memory (OOM) errors, which may leave request memory in an uninitialized state before allocation. Subsequent request cleanup may read or branch on this memory, and multiple OOM strategies can consistently trigger this condition, leading to remote code execution (RCE).
- CVE-2026-17544Critical
The bccomp() function in PHP (versions 8.4.x before 8.4.24 and 8.5.x before 8.5.9) improperly handles attacker-supplied input, which can lead to an out-of-bounds write and stack/heap corruption.
- CVE-2026-17543Critical
In PHP (versions 8.2.x before 8.2.33, 8.3.x before 8.3.33, 8.4.x before 8.4.24, and 8.5.x before 8.5.9), improper escaping of backslashes in attacker-supplied parameters allows trivial SQL injection.
- CVE-2026-6104Critical
In PHP versions 8.4.* before 8.4.21 and 8.5.* before 8.5.6, when an encoding name containing an embedded NUL byte is passed to mb_convert_encoding() or related mbstring functions, the code incorrectly assumes that when strncasecmp() returns 0 it means the strings have the same length. This can lead to out-of-bounds read of global memory, potentially causing a crash or information disclosure.
- CVE-2026-7261Critical
In PHP versions 8.2.* before 8.2.31, 8.3.* before 8.3.31, 8.4.* before 8.4.21, and 8.5.* before 8.5.6, when SoapServer is configured with SOAP_PERSISTENCE_SESSION, the handler object is persisted across requests via session storage. However, when SOAP requests result in an error, persistence is handled incorrectly, freeing the object while keeping a pointer to it, which may lead to use-after-free. This may lead to memory corruption, information disclosure, or process crashes, impacting confidentiality, integrity, and availability.
- CVE-2026-6722Critical
In PHP versions 8.2.* before 8.2.31, 8.3.* before 8.3.31, 8.4.* before 8.4.21, and 8.5.* before 8.5.6, the SOAP extension's object deduplication mechanism stores pointers to PHP objects in a global map without incrementing their reference counts. When an apache:Map node contains duplicate keys, processing the second entry overwrites the first in the temporary result map, freeing the original PHP object while its stale pointer remains in the map. A subsequent href reference to the freed node can copy the dangling pointer into the result. As PHP string allocations can reclaim the freed memory region, an attacker with control over the SOAP request body can exploit this use-after-free to achieve remote code execution.
- CVE-2025-14179Critical
In PHP versions 8.2.* before 8.2.31, 8.3.* before 8.3.31, 8.4.* before 8.4.21, and 8.5.* before 8.5.6, the PDO Firebird driver improperly handles NUL bytes when preparing SQL queries. During token-by-token query construction, a string token containing a NUL byte is copied via strncat(), which stops at the NUL byte, dropping the closing quote and causing subsequent SQL tokens to be interpreted as part of the string. This allows SQL injection when attacker-controlled values are quoted via PDO::quote() and embedded in SQL statements.
- CVE-2025-1861Critical
In PHP from 8.1.* before 8.1.32, from 8.2.* before 8.2.28, from 8.3.* before 8.3.19, from 8.4.* before 8.4.5, when parsing HTTP redirect in the response to an HTTP request, there is currently a limit on the location value size caused by limited size of the location buffer to 1024. However as per RFC9110, the limit is recommended to be 8000. This may lead to incorrect URL truncation and redirecting to a wrong location.
- CVE-2024-11236Critical
In PHP versions 8.1.x before 8.1.31, 8.2.x before 8.2.26, 8.3.x before 8.3.14, uncontrolled long string inputs to the ldap_escape() function on 32-bit systems can cause an integer overflow, resulting in an out-of-bounds write.
- CVE-2024-8932Critical
In PHP versions 8.1.* before 8.1.31, 8.2.* before 8.2.26, 8.3.* before 8.3.14, uncontrolled long string inputs to the ldap_escape() function on 32-bit systems can cause an integer overflow, resulting in an out-of-bounds write.
- CVE-2024-4577CriticalActively exploited
In PHP versions 8.1.* before 8.1.29, 8.2.* before 8.2.20, 8.3.* before 8.3.8, when using Apache and PHP-CGI on Windows, if the system is set up to use certain code pages, Windows may use "Best-Fit" behavior to replace characters in command line given to Win32 API functions. PHP CGI module may misinterpret those characters as PHP options, which may allow a malicious user to pass options to PHP binary being run, and thus reveal the source code of scripts, run arbitrary PHP code on the server, etc.
- CVE-2024-5458Medium
In PHP versions 8.1.* before 8.1.29, 8.2.* before 8.2.20, 8.3.* before 8.3.8, due to a code logic error, filtering functions such as filter_var when validating URLs (FILTER_VALIDATE_URL) for certain types of URLs will result in invalid user information (username + password part of URLs) being treated as valid user information. This may lead to downstream code accepting invalid URLs as valid and parsing them incorrectly.
- CVE-2024-2756Medium
Incomplete fix for CVE-2022-31629 in PHP. Network or same-site attackers can set a standard insecure cookie in the victim's browser which is treated as a __Host- or __Secure- cookie by PHP applications.
- CVE-2023-3824Critical
In PHP versions 8.0.* before 8.0.30, 8.1.* before 8.1.22, and 8.2.* before 8.2.8, when loading phar files, insufficient length checking may lead to a stack buffer overflow, potentially resulting in memory corruption or RCE.
- CVE-2019-11050Medium
In PHP, the EXIF extension parsing EXIF information from an image (e.g., via exif_read_data()) in versions 7.2.x below 7.2.26, 7.3.x below 7.3.13, and 7.4.0 can read past the allocated buffer, potentially leading to information disclosure or crash.
- CVE-2019-11049Medium
In PHP versions 7.3.x below 7.3.13 and 7.4.0 on Windows, when supplying custom headers to the mail() function, if the header is supplied in lowercase, it can result in double-freeing certain memory locations.
- CVE-2019-11046Low
In PHP versions 7.2.x below 7.2.26, 7.3.x below 7.3.13 and 7.4.0, the bcmath extension functions on some systems, including Windows, can be tricked into reading beyond the allocated space by supplying a string containing characters that are identified as numeric by the OS but aren't ASCII numbers. This can lead to disclosure of the content of some memory locations.
- CVE-2019-11045Low
In PHP versions 7.2.x below 7.2.26, 7.3.x below 7.3.13 and 7.4.0, the DirectoryIterator class accepts filenames with embedded \0 byte and treats them as terminating at that byte. This could lead to security vulnerabilities, e.g., in applications checking paths that the code is allowed to access.
- CVE-2019-11044Low
In PHP versions 7.2.x below 7.2.26, 7.3.x below 7.3.13 and 7.4.0 on Windows, the link() function accepts filenames with embedded \0 byte and treats them as terminating at that byte. This could lead to security vulnerabilities, e.g., in applications checking paths that the code is allowed to access.
- CVE-2019-11043HighActively exploited
In PHP versions 7.1.x below 7.1.33, 7.2.x below 7.2.24 and 7.3.x below 7.3.11 in certain configurations of FPM setup it is possible to cause FPM module to write past allocated buffers into the space reserved for FCGI protocol data, thus opening the possibility of remote code execution.
- CVE-2017-12933Critical
The finish_nested_data function in PHP before 5.6.31, 7.0.x before 7.0.21, and 7.1.x before 7.1.7 is prone to a buffer over-read while unserializing untrusted data. Exploitation of this issue can impact the integrity of PHP.
- CVE-2017-12932Critical
In PHP versions 7.0.x through 7.0.22 and 7.1.x through 7.1.8, there is a vulnerability related to heap use after free when unserializing untrusted data. This issue is related to improper use of the hash API for key deletion in a situation with an invalid array size.
- CVE-2017-11142High
In PHP versions before 5.6.31, 7.x before 7.0.17, and 7.1.x before 7.1.3, remote attackers could cause a denial of service attack by injecting long form variables, leading to excessive CPU consumption.
- CVE-2017-9119Critical
The i_zval_ptr_dtor function in Zend/zend_variables.h in PHP 7.1.5 allows attackers to cause a denial of service (memory consumption and application crash) by triggering crafted operations on array data structures.
- CVE-2017-8923Critical
The zend_string_extend function in PHP through version 7.1.5 does not prevent changes to string objects that can lead to negative length. This allows remote attackers to cause application crashes or potentially other unspecified impacts by leveraging the .= operator with a long string.
- CVE-2016-5399High
The bzread function in PHP before 5.5.38, 5.6.x before 5.6.24, and 7.x before 7.0.9 allows remote attackers to cause a denial of service (out-of-bounds write) or execute arbitrary code via a crafted bz2 archive.
- CVE-2016-10161High
The object_common1 function in PHP before 5.6.30, 7.0.x before 7.0.15, and 7.1.x before 7.1.1 allows remote attackers to cause a denial of service (buffer over-read and application crash) via crafted serialized data that is mishandled in a finish_nested_data call.
- CVE-2016-10160Critical
Off-by-one error in the phar_parse_pharfile function in PHP before 5.6.30 and 7.0.x before 7.0.15 allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PHAR archive with an alias mismatch.
- CVE-2016-10158High
The exif_convert_any_to_int function in PHP before 5.6.30, 7.0.x before 7.0.15, and 7.1.x before 7.1.1 allows remote attackers to cause a denial of service (application crash) via crafted EXIF data that triggers an attempt to divide the minimum representable negative integer by -1.
- CVE-2016-7479Critical
All versions of PHP 7 have a vulnerability that during the unserialization process may lead to use-after-free when resizing the 'properties' hash table of a serialized object. A remote attacker may exploit this bug to gain arbitrary code execution.
- CVE-2016-7480Critical
The SplObjectStorage unserialize implementation in PHP before 7.0.12 does not verify that a key is an object, allowing remote attackers to execute arbitrary code or cause a denial of service via crafted serialized data.
- CVE-2016-9934High
In PHP before 5.6.28 and 7.x before 7.0.13, a vulnerability allows remote attackers to cause a denial of service (NULL pointer dereference) via crafted serialized data in a wddxPacket XML document.
- CVE-2016-9138Critical
PHP through 5.6.27 and 7.x through 7.0.12 mishandles property modification during __wakeup processing, allowing remote attackers to cause a denial of service or possibly have unspecified other impact via crafted serialized data.
- CVE-2016-7417Critical
In PHP before 5.6.26 and 7.x before 7.0.11, there is a vulnerability in ext/spl/spl_array.c that allows SplArray unserialization without validating a return value and data type. This can lead to denial of service or possibly unspecified other impacts via crafted serialized data.
- CVE-2016-7414Critical
The ZIP signature-verification feature in PHP before 5.6.26 and 7.x before 7.0.11 does not ensure that the uncompressed_filesize field is large enough, allowing remote attackers to cause a denial of service (out-of-bounds memory access) or possibly have unspecified other impact via a crafted PHAR archive.
- CVE-2016-7411Critical
In PHP before version 5.6.26, there is an issue with handling object-deserialization failures, which can lead to denial of service due to memory corruption or other unspecified impacts.
- CVE-2016-7133High
In PHP 7.x before 7.0.10, when open_basedir is enabled, there is an issue with handling huge realloc operations, which can lead to integer overflow and potentially cause a denial of service.
- CVE-2016-7131High
In PHP before version 5.6.25 and 7.x before 7.0.10, a vulnerability allows remote attackers to cause a denial of service through a malformed wddxPacket XML document. This leads to a NULL pointer dereference and application crash.
- CVE-2016-7127Critical
The imagegammacorrect function in PHP before 5.6.25 and 7.x before 7.0.10 does not properly validate gamma values, which can lead to denial of service (out-of-bounds write) or other unspecified impacts.
- CVE-2016-7126Critical
The imagetruecolortopalette function in PHP before 5.6.25 and 7.x before 7.0.10 does not properly validate the number of colors, which may lead to denial of service or other unspecified impacts.
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

