PHP has various global state that temporarily points into request memory. In some scenarios, global state may not be correctly reset, or may be repopulated after being reset. The global state may then refer to request memory even after it has been freed. Subsequent requests may read or branch on this stale state before it is fully initialized. Multiple strategies can trigger this condition and produce remote code execution (RCE).
Branches: PHP 8.5, PHP 8.4, PHP 8.3, PHP 8.2, PHP 8.1, PHP 8.0, PHP 7.4, PHP 7.3 +6 more · Check: 8.5.11, 8.4.26, 8.3.35
In PHP versions prior to 7.4.33, 8.0.25 and 8.1.12, when using imageloadfont() function in gd extension, it is possible to supply a specially crafted font file, such as if the loaded font is used with imagechar() function, the read outside allocated buffer will be used. This can lead to crashes or disclosure of confidential information.
Branches: PHP 8.1, PHP 8.0, PHP 7.4 · Check: 8.1.11, 8.0.24, 7.4.32
In PHP versions 7.4.x below 7.4.30, 8.0.x below 8.0.20, and 8.1.x below 8.1.7, when pdo_mysql extension with mysqlnd driver, if the third party is allowed to supply host to connect to and the password for the connection, password of excessive length can trigger a buffer overflow in PHP, which can lead to a remote code execution vulnerability.
Branches: PHP 8.1, PHP 8.0, PHP 7.4 · Check: 8.1.6, 8.0.19, 7.4.29
In PHP versions 7.4.x below 7.4.30, 8.0.x below 8.0.20, and 8.1.x below 8.1.7, when using Postgres database extension, supplying invalid parameters to the parametrized query may lead to PHP attempting to free memory using uninitialized data as pointers. This could lead to RCE vulnerability or denial of service.
Branches: PHP 8.1, PHP 8.0, PHP 7.4 · Check: 8.1.6, 8.0.19, 7.4.29
In PHP versions 7.3.x up to and including 7.3.31, 7.4.x below 7.4.25 and 8.0.x below 8.0.12, when running PHP FPM SAPI with main FPM daemon process running as root and child worker processes running as lower-privileged users, it is possible for the child processes to access memory shared with the main process and write to it, modifying it in a way that would cause the root process to conduct invalid memory reads and writes, which can be used to escalate privileges from local unprivileged user to the root user.
Branches: PHP 8.0, PHP 7.4, PHP 7.3 · Check: 8.0.11, 7.4.24, 7.3.31
In PHP versions 7.3.x below 7.3.27, 7.4.x below 7.4.15 and 8.0.x below 8.0.2, when using SOAP extension to connect to a SOAP server, a malicious SOAP server could return malformed XML data as a response that would cause PHP to access a null pointer and thus cause a crash.
Branches: PHP 8.0, PHP 7.4, PHP 7.3 · Check: 8.0.1, 7.4.14, 7.3.26
In PHP versions 7.2.x below 7.2.30, 7.3.x below 7.3.17 and 7.4.x below 7.4.5, if PHP is compiled with EBCDIC support (uncommon), urldecode() function can be made to access locations past the allocated memory, due to erroneously using signed numbers as array indexes.
Branches: PHP 7.4, PHP 7.3, PHP 7.2 · Check: 7.4.4, 7.3.16, 7.2.29
In PHP versions 7.3.x below 7.3.16 and 7.4.x below 7.4.4, while using mb_strtolower() function with UTF-32LE encoding, certain invalid strings could cause PHP to overwrite stack-allocated buffer. This could lead to memory corruption, crashes and potentially code execution.
Branches: PHP 7.4, PHP 7.3 · Check: 7.4.3, 7.3.15
In PHP versions 7.2.x below 7.2.28, 7.3.x below 7.3.15 and 7.4.x below 7.4.3, when using file upload functionality, if upload progress tracking is enabled, but session.upload_progress.cleanup is set to 0 (disabled), and the file upload fails, the upload procedure would try to clean up data that does not exist and encounter null pointer dereference, which would likely lead to a crash.
Branches: PHP 7.4, PHP 7.3, PHP 7.2 · Check: 7.4.2, 7.3.14, 7.2.27
In PHP versions 7.2.x below 7.2.26, 7.3.x below 7.3.13 and 7.4.0 on Windows, PHP 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.
Branches: PHP 7.4, PHP 7.3, PHP 7.2 · Check: 7.4.0, 7.3.13, 7.2.26
PHP 7.1.5 has an Out of bounds access in php_pcre_replace_impl via a crafted preg_replace call.
Branches: PHP 8.1, PHP 8.0, PHP 7.4, PHP 7.1 · Check: 8.1.0, 8.0.13, 7.4.26