PHP 8.2.17 is known vulnerabilities confirmed: 57 confirmed known vulnerabilities (8 critical, 13 high, 28 medium, 8 low, 7 RCE-related). Support status: Security fixes only. This is a version-based check, not a full application audit. Recommended upgrade: PHP 8.6.0.
Security status
Known vulnerabilities confirmed
At least one CVE has a structured PHP runtime range that contains this version, and trusted sources do not disagree. Red means confirmed issues in the data, not that every deployment can be exploited.
Risk: Confirmed issues in the checked data
57 confirmed findings (8 critical, 13 high, 28 medium, 8 low). A match does not prove every deployment can be exploited.
This is a version-based check of published PHP runtime records. It is not a full application audit. Extensions, configuration, application code, and the SAPI can change the real risk.
Confirmed by severity: 8 critical, 13 high, 28 medium, 8 low. 10 still need verification.
Sources: NIST NVD API 2.0, php.net supported versions, end-of-life list, and releases, PHP ChangeLog, GitHub Security Advisories for php/php-src. Data last updated 24 Nov 2026, 03:47 UTC.
Data last updated: 24 Nov 2026, 03:47 UTC
Current version
8.2.17
Official support
Security fixes only
PHP 8.2
Known vulnerabilities
57
10 need verification
Critical / high
8 / 13
Confirmed findings only
RCE-related CVEs
7
Confirmed, with a stated basis
Minimum security fix
8.2.36
Recommended upgrade
8.6.0
Last data update
24 Nov 2026, 03:47 UTC
Fresh cache
Upgrade recommendation
Minimum security fix on PHP 8.2
8.2.36 is the lowest release on PHP 8.2 that contains every verified fix for the confirmed issues in this result. Staying on 8.2 means you still need to plan for the end of support on 2026-12-31.
Recommended long-term release
8.6.0 is the latest patch on PHP 8.6, which php.net lists as active support. It is the long-term upgrade, chosen because the branch is still supported. This check does not claim that release is vulnerability-free.
No PHP release should be treated as vulnerability-free. New issues are published after this dataset was synced, and some bugs depend on how PHP is installed.
PHP 8.2 receives security fixes only until 2026-12-31. Bugfix releases have stopped.
Moving from 8.2 to 8.6 can change language behavior, removed extensions, and default settings. Review each migration guide before upgrading: https://www.php.net/manual/en/migration83.php, https://www.php.net/manual/en/migration84.php, https://www.php.net/manual/en/migration85.php, https://www.php.net/manual/en/migration86.php.
If this PHP build comes from a Linux distribution (Debian, Ubuntu, RHEL, Alpine, and others), the package may include backported security fixes that do not change the MAJOR.MINOR.PATCH string. This check cannot see those patches. A match is not proof the distro package is still vulnerable, and a clean result is not proof every fix was included. Check the distribution's own security tracker for the package you installed.
Upgrade commands
Examples use the versions already named in this report. They do not claim a CVE is fixed, and they are not run here.
Confirm the installed version
php -v
Read the MAJOR.MINOR.PATCH line. This site never runs that command for you.
Minimum verified fix on the current branch
# Report named 8.2.36 as a verified fix on this branch.
# Install that release from php.net or your platform, then run php -v.
A same-branch patch is not a long-term target when the branch is out of support. No package version was invented for your distro.
Homebrew (macOS or Linux)
brew install php@8.6
php -v
Installs the php@8.6 formula. Homebrew does not pin the patch 8.6.0. Confirm php -v after install.
Docker official PHP image
FROM php:8.6.0-fpm-bookworm
# Rebuild the image after you change the tag.
Example pin for the recommended patch 8.6.0. Confirm the tag exists in the official php image before you deploy. A floating tag such as php:8.6-fpm is not a patch pin. See the Docker tool for the library's current mapping.
ondrej/php is a community archive, not a php.net or Debian project. Review it before you use it. Distro packages can lag or carry backports this checker cannot see.
Composer platform (does not upgrade PHP)
composer config platform.php 8.6.0
This only tells Composer which PHP version to resolve dependencies for. It does not change the runtime and does not fix vulnerabilities.
Support timeline
Initial release
8 Dec 2022
Active support end
31 Dec 2024
Security support end
31 Dec 2026
Latest patch on branch
8.2.36
Remote Code Execution & Shell Execution Risk
This section lists matched records whose CWE or description indicates remote code execution, command injection, shell execution, CGI argument injection, code execution, or unsafe runtime behavior. The basis is shown for each one. A matching version does not prove the bug is exploitable: the SAPI, operating system, web server, and extensions decide whether the vulnerable code path exists.
CVE-2024-3566Confirmed vulnerableCRITICAL
A command inject vulnerability allows an attacker to perform command injection on Windows applications that indirectly depend on the CreateProcess function when the specific conditions are satisfied.
Affected versions: 8.2.0 (including) to 8.2.18 (excluding)
Fixed version: 8.2.18
CVSS: 9.8 (v3.1)
Documented prerequisites: NVD configuration also requires cpe:2.3:o:microsoft:windows:-:*:*:*:*:*:*:*
Classification basis: CWE-77 (Command Injection) is listed on the record; Description says command injection
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.
Affected versions: PHP 8.2 only, 8.2.0 (including) to 8.2.20 (excluding); 8.2.0 (including) to 8.2.20 (excluding)
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.
Affected versions: PHP 8.2 only, 8.2.0 (including) to 8.2.31 (excluding); 8.2.0 (including) to 8.2.31 (excluding)
PHP uses longjmp() for out-of-memory (OOM) errors to exit the current context and abort handling of the request. Some contexts may not properly account for this scenario and leave request memory in an uninitialized state before performing an allocation. The subsequent request cleanup procedure may read or branch on this memory. Multiple OOM strategies can consistently trigger this condition and lead to remote code execution (RCE).
Affected versions: PHP 8.2 only, 8.2.0 (including) to 8.2.35 (excluding); 7.3.0 (including) to 8.2.35 (excluding)
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).
Affected versions: PHP 8.2 only, 8.2.0 (including) to 8.2.35 (excluding); 5.4.0 (including) to 8.2.35 (excluding)
### Summary
PHP's session upload progress feature can write attacker-controlled data using one session serialization format and later read it using another. A mismatched decoder can interpret part of a session key as serialized object data. An application with a suitable object gadget chain can then execute code with the privileges of the PHP worker.
This is a configuration-dependent deserialization issue, separate from the stale global state vulnerability in CVE-2026-109619 (GHSA-6wmf-4rv5-p3rp). Session upload progress was introduced in PHP 5.4.0, so older unsupported releases may also be affected.
### Details
The affected setup has the following conditions:
- Session upload progress is enabled, and an attacker can submit a multipart upload to a context using `php_binary` or `php_serialize` as its session serializer.
- A later or concurrent operation can access the same stored session, using the same session ID and the `php` serializer.
- For code execution, the reading application has a suitable deserialization gadget chain available.
The mismatch can arise when an application changes `session.serialize_handler` to `php` before calling `session_start()`. It can also arise between separate applications, pools, virtual hosts, or command-line processes with different fixed INI settings. With the `files` handler, this requires the same session storage directory, the same session ID, and permissions allowing both sides to access that file. Separate FPM pools do not automatically provide separate session storage. A runtime configuration change is not required, but workers using the same serializer do not create this mismatch.
During multipart processing, PHP appends the submitted `PHP_SESSION_UPLOAD_PROGRESS` value to an upload-progress session key and persists it. The `php` format separates each key from its serialized value with `|`. The other formats represent keys differently. If their output is read as `php`, an attacker-supplied delimiter can cause bytes inside the key to be passed to PHP's unserialization machinery.
Objects may be created and their deserialization or destruction callbacks invoked before trailing data causes the session decoder to reject the record. The 127-byte key limit in `php_binary` does not prevent payloads that span multiple session records.
### Impact
Successful exploitation can cause remote code execution, file modification, session corruption, or denial of service. The report includes command execution using a Guzzle object gadget on PHP 8.2.35, 8.3.36, 8.4.27, and 8.5.12. Command execution was also reproduced with a Monolog 2.11.1 gadget using a `php_serialize` writer and a `php` reader. Exploitability depends on the shared session configuration, access to the writing and reading paths, and the classes available to the reader.
An application that never changes its serializer at runtime can still be affected if another application or process writes incompatible data into the same session store.
### Affected versions
Session upload progress has been affected since it was introduced in PHP 5.4.0. The variant that uses a `php_serialize` writer requires PHP 5.5.4 or later. This is based on code inspection.
### Mitigation
Upgrade to the fixed release for your PHP branch when it becomes available. The fix disables session upload progress by default and rejects runtime changes to session settings, including `session.serialize_handler`, while upload progress is enabled. Keeping the feature disabled removes the upload-progress attack path described in this advisory. Check for existing configuration that explicitly enables it, because an explicit setting overrides the new default.
**If session upload progress is explicitly enabled in any application or pool, all readers and writers of the session data it can access must use the same `session.serialize_handler`, even after the update.** The fix does not enforce matching serializers across separate configurations.
For installations that need the feature, check the effective settings in php.ini, FPM pools, virtual hosts, application overrides, and command-line jobs. Isolate session storage when applications require different formats. When changing an existing store's format, migrate or expire its old records instead of reading them with the new serializer.
Otherwise, keep `session.upload_progress.enabled=0` in every configuration that can write to the affected session store. Set this administratively before request input is processed. Calling `ini_set()` from the application is too late. Do not rely on upload-progress cleanup to prevent a concurrent read.
### Summary
PHP's file-based session handler can leave a session file containing parts of two different serialized sessions if a write is interrupted. An attacker who can influence the session contents and interrupt a replacement write may be able to make PHP deserialize attacker-controlled objects when the session is next opened. A suitable object gadget chain in the application can turn this into remote code execution.
This affects the `files` session save handler, which is PHP's default. The issue is not limited to session upload progress or PHP 8.6.
### Details
When updating a session, `ps_files_write()` writes the new serialized data into the existing file. The vulnerable implementation does not clear the existing contents before every write. If the operation stops after replacing only part of the file, the result can contain a prefix of the new session followed by a suffix of the old one. The file lock prevents competing session operations from accessing the file during the write, but does not make an interrupted write atomic.
PHP's session decoders use its unserialization machinery to restore session values. Carefully arranged old and new data can cause the combined file to be interpreted differently from either original session. Bytes that were previously part of an ordinary string can become serialized object data. A later `session_start()` or another session-reading operation can then create those objects and invoke their deserialization behavior.
Session upload progress provides one way for a remote client to influence stored session data through multipart uploads. The same underlying problem can arise when an application stores large user-controlled strings in a session. In threaded PHP builds, a hard memory-limit failure in another thread can terminate the process while the session write is in progress. This provides a way to influence where the write stops.
The fix truncates the session file to zero before writing the replacement data and aborts the write if truncation fails. An interrupted write can still lose session data, but it can no longer retain the old suffix that enables this attack.
### Impact
Successful exploitation can execute code with the privileges of the PHP worker. It requires attacker influence over the session data, an interruption at a useful point in the write, and an application with a suitable deserialization gadget chain. The issue can also corrupt session state. Authentication requirements depend on how the application exposes the affected session operations.
Other session storage implementations are not affected by this specific file-write defect, although their own handling of interrupted updates must be considered separately.
### Affected versions
The affected code has been present since PHP 4.1.0. This is based on code inspection.
### Mitigation
Upgrade to the fixed release for your PHP branch when it becomes available. As a temporary measure, disable `session.upload_progress.enabled` administratively if the feature is not needed, and limit the amount of untrusted data stored in sessions. Disabling upload progress removes that input path but does not fix applications that independently store attacker-controlled session data.
A session storage backend that replaces records atomically can avoid this file-write defect. The PHP update remains the recommended fix for applications using the built-in `files` handler.
### Summary
PHP can fail to discard unread bytes from an HTTP request body before reusing a persistent PHP-FPM or LSAPI connection. In PHP-FPM, an unauthenticated attacker can make those bytes form a separate FastCGI request, bypass front-end routing and execute attacker-controlled PHP code with the privileges of the worker.
### Details
FastCGI and LSAPI connections can carry more than one request. Before accepting another request on the same connection, PHP must either consume the previous request body or close the connection.
Opening `php://input` creates a request-body stream, but PHP reads its contents lazily. During request shutdown, PHP incorrectly treated the existence of this stream as evidence that the body had already been handled and skipped the normal cleanup that discards unread input.
An attacker can combine this behaviour with a malformed `multipart/form-data` body that makes PHP's multipart parser stop at a predictable position. If the application then opens `php://input` without reading it to the end, attacker-controlled body bytes remain in the current backend request. This can occur in request frameworks that create an input stream before routing or authentication, even when the selected endpoint does not use the body.
When `FCGI_KEEP_CONN` is enabled, PHP-FPM preserves the connection and starts parsing another FastCGI request. The vulnerable implementation discarded its knowledge that it was still inside an `FCGI_STDIN` record, so a FastCGI message placed at the appropriate body offset was accepted as a new request. The front end never created or authorised this request.
The forged request controls FastCGI parameters including `SCRIPT_FILENAME`, `REMOTE_ADDR` and `PHP_ADMIN_VALUE`. If the attacker knows the path of an existing PHP script, they can set `allow_url_include=1` and `auto_prepend_file=php://input`, causing the forged request's own input to be executed as PHP. The changed administrator settings can also remain active for later requests served by the same worker. The shared request-cleanup error also affects LSAPI's persistent request lifecycle, but LSAPI does not use this FastCGI parameter mechanism.
The issue was introduced with lazy `php://input` handling in PHP 5.6.0. The fix drains input according to whether the body was fully consumed, independently of whether a `php://input` stream exists. PHP-FPM additionally closes a connection instead of accepting another request when the previous FastCGI input record is incomplete.
### Impact
Exploitation requires a front end that enables persistent backend connections and an application path that opens `php://input` without reading it fully. Relevant configurations include nginx with `fastcgi_keep_conn on`, Apache `mod_proxy_fcgi` with `enablereuse=on`, HAProxy FastCGI applications that retain backend connections, and LSAPI. Standard nginx and Apache configurations that close the FastCGI connection after each request are not affected by the demonstrated PHP-FPM attack.
For PHP-FPM, successful exploitation can execute attacker-controlled PHP code as the worker without another user's interaction or a non-default PHP configuration. It can also dispatch an existing PHP script outside the routes exposed by the front end, supply a forged client address to application access controls, or change administrator-level PHP settings for subsequent requests. The attack crosses the HTTP-to-PHP backend trust boundary using a single request. It does not require memory corruption, knowledge of memory addresses or a race condition.
For LSAPI, the shared cleanup error can leave body bytes on a persistent backend connection, desynchronising the request stream and disrupting subsequent requests. The `PHP_ADMIN_VALUE` chain used for PHP-FPM is not an LSAPI parameter path, so this advisory does not establish arbitrary code execution through LSAPI.
### Affected versions
The affected code has been present since PHP 5.6.0. This is based on code inspection.
### Mitigation
Upgrade to the fixed release for your PHP branch when it becomes available. Until then, disable backend connection reuse on the affected front end: leave nginx `fastcgi_keep_conn` disabled, leave Apache `enablereuse` disabled, or configure another FastCGI front end to close its backend connection after every request.
Reading `php://input` to the end before completing every request prevents the demonstrated unread-body condition, but error paths, resource exhaustion and application shutdown can make this unreliable as the sole mitigation. Do not expose PHP-FPM or LSAPI listeners directly to untrusted networks.
### Summary
PHP can retain a reference to a freed timezone cache when a diagnostic is written to a PHP error log file during process startup. A later diagnostic during early request initialization can access the freed cache before it is reset. On affected configurations, a remote attacker can trigger memory corruption, cause a worker to crash, and potentially execute arbitrary code with the privileges of the PHP worker.
### Details
PHP formats file-based error log timestamps using the configured timezone. In a non-thread-safe build, a diagnostic emitted during module startup can cause PHP to allocate the timezone cache in temporary startup memory. That memory is released at the end of startup, but the internal reference to the cache remains until the date extension initializes the first request. An earlier diagnostic, such as the warning produced when request input exceeds `max_input_vars`, can therefore read or modify a freed hash table. The released memory may already contain attacker-controlled request data.
The startup diagnostic must occur late enough that subsequent initialization does not clear the cached reference. Confirmed examples include an invalid `date.timezone` value and a warning or deprecation caused by session configuration. The diagnostic must actually be written through PHP's file-based `error_log` path. FPM's own error log does not by itself meet this condition.
In FPM and Apache mod_php, workers can inherit the stale reference from the parent process. The vulnerable window lasts until a worker completes its first normal request. Newly created or recycled workers can encounter the same condition. A crafted HTTP request has been shown to crash an FPM worker using the default `max_input_vars` value and ordinary nginx header limits. The issue has also been reproduced with CGI.
A separate local FPM proof demonstrated native command execution with known runtime addresses. It uses early HTTP Basic credential decoding to replace the stale cache, then reuses request-data allocations and triggers their destruction while `$_REQUEST` is constructed. That particular chain requires additional configuration, including `auto_globals_jit=0` and cookies in `request_order`, a suitable heap layout, and an Authorization header larger than nginx's default per-header limit. These are conditions of the demonstrated exploit, not general requirements of the underlying memory-corruption flaw. Other exploitation paths may be possible.
Native command execution has also been demonstrated in Apache mod_php. Besides the same GET/COOKIE chain, Apache has a separate path when request startup fails before the cache is reset. Request cleanup can destroy the forged cache and invoke an attacker-controlled destructor. The demonstrated variant uses a POST that exceeds a configured 2 MB PHP memory limit and requires known runtime addresses, a suitable heap layout, and a larger allowed Authorization header. It does not require cookies or changes to `auto_globals_jit` or `request_order`. ASLR remained enabled during these proofs. A remote ASLR bypass is plausible, although a complete independent bypass has not been demonstrated.
### Impact
An unauthenticated remote attacker may be able to crash PHP workers or execute arbitrary code with their privileges on an affected deployment. The trigger requires a suitable startup diagnostic, PHP error logging to a file, and an early request diagnostic in a fresh worker. Code execution has been demonstrated locally in FPM and Apache mod_php with known addresses and additional configuration assumptions. Successful exploitation does not require application-level code execution or attacker control of `PHP_VALUE` or `PHP_ADMIN_VALUE`.
### Affected versions
The affected code has been present since PHP 5.3.18 and 5.4.8. An earlier form of it was present in PHP 5.2.10, 5.2.12 to 5.2.17 and 5.3.0 to 5.3.8. This is based on code inspection.
### Mitigation
Upgrade to PHP 8.2.36, 8.3.37, 8.4.28, or 8.5.13 when the corresponding release is available. The fix formats error log timestamps in UTC outside a fully initialized active request, avoiding use of request-local timezone state at unsafe points in the lifecycle.
Until an update can be deployed, correct configuration errors and deprecated settings that produce startup diagnostics, then restart the PHP master process and all workers. Sending PHP errors to a suitable logging destination that does not use this file-timestamp path, such as syslog, also avoids the demonstrated trigger. Changing `$_REQUEST` or cookie settings is not a complete mitigation. The demonstrated Apache cleanup path does not require those settings.
In PHP versions 8.1.* before 8.1.29, 8.2.* before 8.2.20, 8.3.* before 8.3.8, the fix for CVE-2024-1874 does not work if the command name includes trailing spaces. Original issue: when using proc_open() command with array syntax, due to insufficient escaping, if the arguments of the executed command are controlled by a malicious user, the user can supply arguments that would execute arbitrary commands in Windows shell.
Affected versions: PHP 8.2 only, 8.2.0 (including) to 8.2.20 (excluding); 8.2.0 (including) to 8.2.20 (excluding)
Fixed version: 8.2.20
CVSS: 8.8 (v3.1)
Documented prerequisites: Module: proc_open; Platform: Windows
Classification basis: CWE-78 (OS Command Injection) is listed on the record
In PHP versions 8.1.* before 8.1.30, 8.2.* before 8.2.24, 8.3.* before 8.3.12, when using a certain non-standard configurations of Windows codepages, the fixes for CVE-2024-4577 https://github.com/advisories/GHSA-vxpp-6299-mxw3 may still be bypassed and the same command injection related to Windows "Best Fit" codepage behavior can be achieved. This 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.
Affected versions: PHP 8.2 only, 8.2.0 (including) to 8.2.24 (excluding); 8.2.0 (including) to 8.2.24 (excluding)
Fixed version: 8.2.24
CVSS: 8.8 (v3.1)
Documented prerequisites: Platform: Windows
Classification basis: CWE-78 (OS Command Injection) is listed on the record; Description says command injection; Description says arbitrary code execution
### Summary
PHP's SOAP extension can read freed memory while processing XML containing a document type definition (DTD) and an entity reference in an attribute value. An unauthenticated attacker who can send a crafted request to an exposed SOAP endpoint can crash the PHP process handling it. Applications that load attacker-controlled WSDL or imported schema documents can also be affected.
### Details
While cleaning up a parsed XML document, PHP frees the DTD even though attribute values can still refer to content it owns. Processing those attributes can then access freed memory. Removing the DTD also bypasses the SOAP server's normal rejection of documents containing a DTD.
The fix keeps the DTD alive for as long as the XML document needs it and restores the existing SOAP DTD check. The issue predates the changes made for [CVE-2026-91765](https://github.com/php/php-src/security/advisories/GHSA-rgrp-mwpx-f6rm) and affects earlier releases in all supported PHP branches.
### Impact
Exploitation requires the SOAP extension and an application that processes attacker-controlled SOAP XML, WSDL or schema content. Authentication does not protect an endpoint if the application parses the SOAP request before authenticating it.
A crafted document can crash the PHP worker or process, and repeated requests can disrupt service. The original report also described corrupted type information after freed memory was reused. Disclosure of sensitive process memory and arbitrary code execution have not been confirmed.
### Affected versions
SOAP server requests have been affected since PHP 5.6.0. The same cleanup has applied to WSDL and schema documents since PHP 5.0.0, but loading an untrusted WSDL or schema is not considered a security issue. This is based on code inspection.
### Mitigation
Upgrade to the fixed release for your PHP branch when it becomes available. Until then, restrict access to affected SOAP endpoints or disable them where practical. Load WSDL and imported schemas only from trusted, controlled sources.
If untrusted SOAP requests must be accepted, reject documents containing a DTD before they reach the SOAP extension. Any such filter must correctly handle the XML encodings and request-body transformations accepted by the application. A simple text search is not a complete mitigation.
### Summary
PHP's SOAP extension can expose a small amount of uninitialized heap memory when processing an encoded array with an invalid `arraySize` value. An attacker can supply a crafted SOAP request or response that causes the decoded array to contain an unexpected integer key. The value reaches the attacker if the application returns or otherwise exposes that array.
### Details
An empty, whitespace-only or non-numeric `arraySize` can describe no dimensions. PHP nevertheless reads the first array position, which has not been initialized. With PHP's default memory allocator, the read falls within a small allocated block and can return four bytes of unrelated heap data. That value is then used as an array key. When the default allocator is disabled, AddressSanitizer reports an out-of-bounds heap read.
The fix treats a size containing no dimensions as a one-dimensional array. It also covers array dimensions read from WSDL definitions. The vulnerable behaviour is present in all supported PHP branches.
### Impact
An unauthenticated client can trigger the issue through a SOAP endpoint that accepts the crafted input. A malicious or compromised SOAP server can also supply an affected response to `SoapClient`.
The demonstrated impact is limited information disclosure when the application exposes the decoded array. Simply accepting the request does not guarantee that the value is returned to the attacker. The demonstrated case does not crash or corrupt memory with PHP's default allocator. Arbitrary code execution has not been demonstrated.
### Affected versions
The affected code has been present since PHP 5.0.0. This is based on code inspection.
### Mitigation
Upgrade to the fixed release for your PHP branch when it becomes available. Until then, restrict access to affected SOAP endpoints and use trusted SOAP services and WSDL definitions.
Where requests or responses can be validated before they reach the SOAP extension, reject encoded arrays whose `arraySize` contains no valid dimension. Avoid returning unvalidated decoded arrays to untrusted clients. These measures reduce exposure but do not replace the parser fix.
PHP 8.2 only, 8.2.0 (including) to 8.2.26 (excluding); 8.2.0 (including) to 8.2.26 (excluding)
8.2.26
CVE-2024-3566
Confirmed vulnerable
CRITICAL
9.8
8.2.0 (including) to 8.2.18 (excluding)
8.2.18
CVE-2024-4577
Confirmed vulnerable
CRITICAL
9.8
PHP 8.2 only, 8.2.0 (including) to 8.2.20 (excluding); 8.2.0 (including) to 8.2.20 (excluding)
8.2.20
CVE-2024-8932
Confirmed vulnerable
CRITICAL
9.8
PHP 8.2 only, 8.2.0 (including) to 8.2.26 (excluding); 8.2.0 (including) to 8.2.26 (excluding)
8.2.26
CVE-2026-6722
Confirmed vulnerable
CRITICAL
9.5
PHP 8.2 only, 8.2.0 (including) to 8.2.31 (excluding); 8.2.0 (including) to 8.2.31 (excluding)
8.2.31
CVE-2024-1874
Confirmed vulnerable
CRITICAL
9.4
PHP 8.2 only, 8.2.0 (including) to 8.2.18 (excluding); 8.2.0 (including) to 8.2.18 (excluding)
8.2.18
CVE-2026-109618
Confirmed vulnerable
CRITICAL
9.2
PHP 8.2 only, 8.2.0 (including) to 8.2.35 (excluding); 7.3.0 (including) to 8.2.35 (excluding)
8.2.35
CVE-2026-109619
Confirmed vulnerable
CRITICAL
9.2
PHP 8.2 only, 8.2.0 (including) to 8.2.35 (excluding); 5.4.0 (including) to 8.2.35 (excluding)
8.2.35
CVE-2026-115560
Potentially affected — verification required
CRITICAL
9.2
PHP 8.2 only, before 8.2.36
Not verified
CVE-2026-126714
Potentially affected — verification required
CRITICAL
9.2
PHP 8.2 only, before 8.2.36
Not verified
CVE-2026-129289
Potentially affected — verification required
CRITICAL
9.2
PHP 8.2 only, before 8.2.36
Not verified
CVE-2026-129496
Potentially affected — verification required
CRITICAL
9.2
PHP 8.2 only, before 8.2.36
Not verified
CVE-2024-5585
Confirmed vulnerable
HIGH
8.8
PHP 8.2 only, 8.2.0 (including) to 8.2.20 (excluding); 8.2.0 (including) to 8.2.20 (excluding)
8.2.20
CVE-2024-8926
Confirmed vulnerable
HIGH
8.8
PHP 8.2 only, 8.2.0 (including) to 8.2.24 (excluding); 8.2.0 (including) to 8.2.24 (excluding)
8.2.24
CVE-2026-129291
Confirmed vulnerable
HIGH
8.8
8.2.7 (including) to 8.2.36 (excluding)
8.2.36
CVE-2024-11233
Confirmed vulnerable
HIGH
8.2
PHP 8.2 only, 8.2.0 (including) to 8.2.26 (excluding); 8.2.0 (including) to 8.2.26 (excluding)
8.2.26
CVE-2025-14178
Confirmed vulnerable
HIGH
8.2
PHP 8.2 only, 8.2.0 (including) to 8.2.30 (excluding); 8.2.0 (including) to 8.2.30 (excluding)
8.2.30
CVE-2025-14180
Confirmed vulnerable
HIGH
8.2
PHP 8.2 only, 8.2.0 (including) to 8.2.30 (excluding); 8.2.0 (including) to 8.2.30 (excluding)
8.2.30
CVE-2026-128064
Potentially affected — verification required
HIGH
8.2
PHP 8.2 only, before 8.2.36
Not verified
CVE-2026-17543
Confirmed vulnerable
HIGH
8.1
PHP 8.2 only, 8.2.0 (including) to 8.2.33 (excluding); 8.2.0 (including) to 8.2.33 (excluding)
8.2.33
CVE-2026-128090
Potentially affected — verification required
HIGH
7.7
PHP 8.2 only, before 8.2.36
Not verified
CVE-2024-8927
Confirmed vulnerable
HIGH
7.5
PHP 8.2 only, 8.2.0 (including) to 8.2.24 (excluding); 8.2.0 (including) to 8.2.24 (excluding)
8.2.24
CVE-2025-1735
Confirmed vulnerable
HIGH
7.5
PHP 8.2 only, 8.2.0 (including) to 8.2.29 (excluding); 8.2.0 (including) to 8.2.29 (excluding)
8.2.29
CVE-2026-91765
Confirmed vulnerable
HIGH
7.5
PHP 8.2 only, 8.2.0 (including) to 8.2.34 (excluding); 8.2.0 (including) to 8.2.34 (excluding)
8.2.34
CVE-2025-14179
Confirmed vulnerable
HIGH
7.4
PHP 8.2 only, 8.2.0 (including) to 8.2.31 (excluding); 8.2.0 (including) to 8.2.31 (excluding)
8.2.31
CVE-2026-6735
Confirmed vulnerable
HIGH
7.3
PHP 8.2 only, 8.2.0 (including) to 8.2.31 (excluding); 8.2.0 (including) to 8.2.31 (excluding)
8.2.31
CVE-2024-11234
Confirmed vulnerable
HIGH
7.2
PHP 8.2 only, 8.2.0 (including) to 8.2.26 (excluding); 8.2.0 (including) to 8.2.26 (excluding)
8.2.26
CVE-2026-129538
Potentially affected — verification required
MEDIUM
6.9
PHP 8.2 only, before 8.2.36
Not verified
CVE-2026-17545
Confirmed vulnerable
MEDIUM
6.9
PHP 8.2 only, 8.2.0 (including) to 8.2.34 (excluding); 8.2.0 (including) to 8.2.34 (excluding)
8.2.34
CVE-2024-3096
Confirmed vulnerable
MEDIUM
6.5
PHP 8.2 only, 8.2.0 (including) to 8.2.18 (excluding); 8.2.0 (including) to 8.2.18 (excluding)
8.2.18
CVE-2025-14181
Confirmed vulnerable
MEDIUM
6.5
PHP 8.2 only, 8.2.0 (including) to 8.2.34 (excluding); 8.2.0 (including) to 8.2.34 (excluding)
8.2.34
CVE-2026-91767
Confirmed vulnerable
MEDIUM
6.5
PHP 8.2 only, 8.2.0 (including) to 8.2.34 (excluding); 8.2.0 (including) to 8.2.34 (excluding)
8.2.34
CVE-2026-91768
Confirmed vulnerable
MEDIUM
6.5
PHP 8.2 only, 8.2.0 (including) to 8.2.34 (excluding); 8.2.0 (including) to 8.2.34 (excluding)
8.2.34
CVE-2025-1217
Confirmed vulnerable
MEDIUM
6.3
PHP 8.2 only, 8.2.0 (including) to 8.2.28 (excluding); 8.2.0 (including) to 8.2.28 (excluding)
8.2.28
CVE-2025-1219
Confirmed vulnerable
MEDIUM
6.3
PHP 8.2 only, 8.2.0 (including) to 8.2.28 (excluding); 8.2.0 (including) to 8.2.28 (excluding)
8.2.28
CVE-2025-14177
Confirmed vulnerable
MEDIUM
6.3
PHP 8.2 only, 8.2.0 (including) to 8.2.30 (excluding); 8.2.0 (including) to 8.2.30 (excluding)
8.2.30
CVE-2025-1734
Confirmed vulnerable
MEDIUM
6.3
PHP 8.2 only, 8.2.0 (including) to 8.2.28 (excluding); 8.2.0 (including) to 8.2.28 (excluding)
8.2.28
CVE-2025-1736
Confirmed vulnerable
MEDIUM
6.3
PHP 8.2 only, 8.2.0 (including) to 8.2.28 (excluding); 8.2.0 (including) to 8.2.28 (excluding)
8.2.28
CVE-2025-1861
Confirmed vulnerable
MEDIUM
6.3
PHP 8.2 only, 8.2.0 (including) to 8.2.28 (excluding); 8.2.0 (including) to 8.2.26 (excluding)
8.2.28
CVE-2026-129506
Potentially affected — verification required
MEDIUM
6.3
PHP 8.2 only, before 8.2.36
Not verified
CVE-2026-15353
Potentially affected — verification required
MEDIUM
6.3
PHP 8.2 only, before 8.2.36
Not verified
CVE-2026-7258
Confirmed vulnerable
MEDIUM
6.3
PHP 8.2 only, 8.2.0 (including) to 8.2.31 (excluding); 8.2.0 (including) to 8.2.21 (excluding)
8.2.31
CVE-2026-7261
Confirmed vulnerable
MEDIUM
6.3
PHP 8.2 only, 8.2.0 (including) to 8.2.31 (excluding); 8.2.0 (including) to 8.2.31 (excluding)
8.2.31
CVE-2026-7568
Confirmed vulnerable
MEDIUM
6.3
PHP 8.2 only, 8.2.0 (including) to 8.2.31 (excluding); 8.2.0 (including) to 8.2.31 (excluding)
8.2.31
CVE-2024-2408
Confirmed vulnerable
MEDIUM
5.9
PHP 8.2 only, 8.2.0 (including) to 8.2.20 (excluding); 8.2.0 (including) to 8.2.20 (excluding)
8.2.20
CVE-2025-1218
Confirmed vulnerable
MEDIUM
5.9
PHP 8.2 only, 8.2.0 (including) to 8.2.34 (excluding); 8.2.0 (including) to 8.2.34 (excluding)
8.2.34
CVE-2025-6491
Confirmed vulnerable
MEDIUM
5.9
PHP 8.2 only, 8.2.0 (including) to 8.2.29 (excluding); 8.2.0 (including) to 8.2.29 (excluding)
8.2.29
CVE-2026-91766
Confirmed vulnerable
MEDIUM
5.9
PHP 8.2 only, 8.2.0 (including) to 8.2.34 (excluding); 8.2.0 (including) to 8.2.34 (excluding)
8.2.34
CVE-2026-92842
Confirmed vulnerable
MEDIUM
5.9
PHP 8.2 only, 8.2.0 (including) to 8.2.34 (excluding); 8.2.0 (including) to 8.2.34 (excluding)
8.2.34
CVE-2024-8929
Confirmed vulnerable
MEDIUM
5.8
PHP 8.2 only, 8.2.0 (including) to 8.2.24 (excluding); 8.2.0 (including) to 8.2.26 (excluding); PHP 8.2 only, 8.2.0 (including) to 8.2.26 (excluding)
8.2.26
CVE-2026-93682
Confirmed vulnerable
MEDIUM
5.8
PHP 8.2 only, 8.2.0 (including) to 8.2.34 (excluding); 8.2.0 (including) to 8.2.34 (excluding)
8.2.34
CVE-2026-7260
Confirmed vulnerable
MEDIUM
5.4
PHP 8.2 only, 8.2.0 (including) to 8.2.33 (excluding); 8.2.0 (including) to 8.2.33 (excluding)
8.2.33
CVE-2024-5458
Confirmed vulnerable
MEDIUM
5.3
PHP 8.2 only, 8.2.0 (including) to 8.2.20 (excluding); 8.2.0 (including) to 8.2.20 (excluding)
8.2.20
CVE-2024-8925
Confirmed vulnerable
MEDIUM
5.3
PHP 8.2 only, 8.2.0 (including) to 8.2.24 (excluding); 8.2.0 (including) to 8.2.24 (excluding)
8.2.24
CVE-2025-1220
Confirmed vulnerable
MEDIUM
5.3
PHP 8.2 only, 8.2.0 (including) to 8.2.29 (excluding); 8.2.0 (including) to 8.2.29 (excluding)
8.2.29
CVE-2026-129292
Potentially affected — verification required
MEDIUM
5.3
PHP 8.2 only, before 8.2.36
Not verified
CVE-2026-14355
Confirmed vulnerable
MEDIUM
5.3
8.2.0 (including) to 8.2.32 (excluding); PHP 8.2 only, 8.2.0 (including) to 8.2.32 (excluding)
8.2.32
CVE-2026-91769
Confirmed vulnerable
MEDIUM
4.3
PHP 8.2 only, 8.2.0 (including) to 8.2.34 (excluding); 8.2.0 (including) to 8.2.34 (excluding)
8.2.34
GHSA-ch8v-r6jh-4vvr
Confirmed vulnerable
LOW
3.7
PHP 8.2 only, 8.2.0 (including) to 8.2.34 (excluding)
8.2.34
CVE-2024-9026
Confirmed vulnerable
LOW
3.3
PHP 8.2 only, 8.2.0 (including) to 8.2.24 (excluding); 8.2.0 (including) to 8.2.24 (excluding)
8.2.24
CVE-2026-6103
Confirmed vulnerable
LOW
3.3
PHP 8.2 only, 8.2.0 (including) to 8.2.34 (excluding); 8.2.0 (including) to 8.2.34 (excluding)
8.2.34
CVE-2026-7262
Confirmed vulnerable
LOW
2.9
PHP 8.2 only, 8.2.0 (including) to 8.2.31 (excluding); 8.2.0 (including) to 8.2.31 (excluding)
8.2.31
CVE-2026-7259
Confirmed vulnerable
LOW
2.1
PHP 8.2 only, 8.2.0 (including) to 8.2.31 (excluding); 8.2.0 (including) to 8.2.31 (excluding)
8.2.31
CVE-2024-2756
Confirmed vulnerable
MEDIUM
Not provided
PHP 8.2 only, 8.2.0 (including) to 8.2.18 (excluding)
8.2.18
GHSA-4w77-75f9-2c8w
Confirmed vulnerable
LOW
Not provided
PHP 8.2 only, 8.2.0 (including) to 8.2.26 (excluding)
8.2.26
GHSA-wg4p-4hqh-c3g9
Confirmed vulnerable
LOW
Not provided
PHP 8.2 only, 8.2.0 (including) to 8.2.28 (excluding)
8.2.28
GHSA-www2-q4fc-65wf
Confirmed vulnerable
LOW
Not provided
PHP 8.2 only, 8.2.0 (including) to 8.2.30 (excluding)
8.2.30
CVE-2024-11236
CRITICAL
CVSS 9.8
PHP 8.2 only, 8.2.0 (including) to 8.2.26 (excluding); 8.2.0 (including) to 8.2.26 (excluding)
Fixed: 8.2.26
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 ldap_escape() function on 32-bit systems can cause an integer overflow, resulting in an out-of-bounds write.
8.2.26 is the fixed release named by the matching range and it is published on php.net.
Prerequisites: Module: pdo_firebird; Module: pdo_dblib; Platform: 32 bit
A command inject vulnerability allows an attacker to perform command injection on Windows applications that indirectly depend on the CreateProcess function when the specific conditions are satisfied.
8.2.18 is the fixed release named by the matching range and it is published on php.net.
Prerequisites: NVD configuration also requires cpe:2.3:o:microsoft:windows:-:*:*:*:*:*:*:*
RCE basis: CWE-77 (Command Injection) is listed on the record; Description says command injection
PHP 8.2 only, 8.2.0 (including) to 8.2.20 (excluding); 8.2.0 (including) to 8.2.20 (excluding)
Fixed: 8.2.20
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.
8.2.20 is the fixed release named by the matching range and it is published on php.net.
Prerequisites: Module: CGI; Platform: Windows; NVD configuration also requires cpe:2.3:o:microsoft:windows:-:*:*:*:*:*:*:*
RCE basis: CWE-78 (OS Command Injection) is listed on the record; Description says arbitrary code execution
PHP 8.2 only, 8.2.0 (including) to 8.2.26 (excluding); 8.2.0 (including) to 8.2.26 (excluding)
Fixed: 8.2.26
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 ldap_escape() function on 32-bit systems can cause an integer overflow, resulting in an out-of-bounds write.
8.2.26 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.31 (excluding); 8.2.0 (including) to 8.2.31 (excluding)
Fixed: 8.2.31
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.
8.2.31 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.18 (excluding); 8.2.0 (including) to 8.2.18 (excluding)
Fixed: 8.2.18
In PHP versions 8.1.* before 8.1.28, 8.2.* before 8.2.18, 8.3.* before 8.3.5, when using proc_open() command with array syntax, due to insufficient escaping, if the arguments of the executed command are controlled by a malicious user, the user can supply arguments that would execute arbitrary commands in Windows shell.
8.2.18 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.35 (excluding); 7.3.0 (including) to 8.2.35 (excluding)
Fixed: 8.2.35
PHP uses longjmp() for out-of-memory (OOM) errors to exit the current context and abort handling of the request. Some contexts may not properly account for this scenario and leave request memory in an uninitialized state before performing an allocation. The subsequent request cleanup procedure may read or branch on this memory. Multiple OOM strategies can consistently trigger this condition and lead to remote code execution (RCE).
8.2.35 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.35 (excluding); 5.4.0 (including) to 8.2.35 (excluding)
Fixed: 8.2.35
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).
8.2.35 is the fixed release named by the matching range and it is published on php.net.
### Summary
PHP's session upload progress feature can write attacker-controlled data using one session serialization format and later read it using another. A mismatched decoder can interpret part of a session key as serialized object data. An application with a suitable object gadget chain can then execute code with the privileges of the PHP worker.
This is a configuration-dependent deserialization issue, separate from the stale global state vulnerability in CVE-2026-109619 (GHSA-6wmf-4rv5-p3rp). Session upload progress was introduced in PHP 5.4.0, so older unsupported releases may also be affected.
### Details
The affected setup has the following conditions:
- Session upload progress is enabled, and an attacker can submit a multipart upload to a context using `php_binary` or `php_serialize` as its session serializer.
- A later or concurrent operation can access the same stored session, using the same session ID and the `php` serializer.
- For code execution, the reading application has a suitable deserialization gadget chain available.
The mismatch can arise when an application changes `session.serialize_handler` to `php` before calling `session_start()`. It can also arise between separate applications, pools, virtual hosts, or command-line processes with different fixed INI settings. With the `files` handler, this requires the same session storage directory, the same session ID, and permissions allowing both sides to access that file. Separate FPM pools do not automatically provide separate session storage. A runtime configuration change is not required, but workers using the same serializer do not create this mismatch.
During multipart processing, PHP appends the submitted `PHP_SESSION_UPLOAD_PROGRESS` value to an upload-progress session key and persists it. The `php` format separates each key from its serialized value with `|`. The other formats represent keys differently. If their output is read as `php`, an attacker-supplied delimiter can cause bytes inside the key to be passed to PHP's unserialization machinery.
Objects may be created and their deserialization or destruction callbacks invoked before trailing data causes the session decoder to reject the record. The 127-byte key limit in `php_binary` does not prevent payloads that span multiple session records.
### Impact
Successful exploitation can cause remote code execution, file modification, session corruption, or denial of service. The report includes command execution using a Guzzle object gadget on PHP 8.2.35, 8.3.36, 8.4.27, and 8.5.12. Command execution was also reproduced with a Monolog 2.11.1 gadget using a `php_serialize` writer and a `php` reader. Exploitability depends on the shared session configuration, access to the writing and reading paths, and the classes available to the reader.
An application that never changes its serializer at runtime can still be affected if another application or process writes incompatible data into the same session store.
### Affected versions
Session upload progress has been affected since it was introduced in PHP 5.4.0. The variant that uses a `php_serialize` writer requires PHP 5.5.4 or later. This is based on code inspection.
### Mitigation
Upgrade to the fixed release for your PHP branch when it becomes available. The fix disables session upload progress by default and rejects runtime changes to session settings, including `session.serialize_handler`, while upload progress is enabled. Keeping the feature disabled removes the upload-progress attack path described in this advisory. Check for existing configuration that explicitly enables it, because an explicit setting overrides the new default.
**If session upload progress is explicitly enabled in any application or pool, all readers and writers of the session data it can access must use the same `session.serialize_handler`, even after the update.** The fix does not enforce matching serializers across separate configurations.
For installations that need the feature, check the effective settings in php.ini, FPM pools, virtual hosts, application overrides, and command-line jobs. Isolate session storage when applications require different formats. When changing an existing store's format, migrate or expire its old records instead of reading them with the new serializer.
Otherwise, keep `session.upload_progress.enabled=0` in every configuration that can write to the affected session store. Set this administratively before request input is processed. Calling `ini_set()` from the application is too late. Do not rely on upload-progress cleanup to prevent a concurrent read.
Sources name 8.2.36, but that release was not found in the php.net release list used for this check. Fixed version: not verified.
### Summary
PHP's file-based session handler can leave a session file containing parts of two different serialized sessions if a write is interrupted. An attacker who can influence the session contents and interrupt a replacement write may be able to make PHP deserialize attacker-controlled objects when the session is next opened. A suitable object gadget chain in the application can turn this into remote code execution.
This affects the `files` session save handler, which is PHP's default. The issue is not limited to session upload progress or PHP 8.6.
### Details
When updating a session, `ps_files_write()` writes the new serialized data into the existing file. The vulnerable implementation does not clear the existing contents before every write. If the operation stops after replacing only part of the file, the result can contain a prefix of the new session followed by a suffix of the old one. The file lock prevents competing session operations from accessing the file during the write, but does not make an interrupted write atomic.
PHP's session decoders use its unserialization machinery to restore session values. Carefully arranged old and new data can cause the combined file to be interpreted differently from either original session. Bytes that were previously part of an ordinary string can become serialized object data. A later `session_start()` or another session-reading operation can then create those objects and invoke their deserialization behavior.
Session upload progress provides one way for a remote client to influence stored session data through multipart uploads. The same underlying problem can arise when an application stores large user-controlled strings in a session. In threaded PHP builds, a hard memory-limit failure in another thread can terminate the process while the session write is in progress. This provides a way to influence where the write stops.
The fix truncates the session file to zero before writing the replacement data and aborts the write if truncation fails. An interrupted write can still lose session data, but it can no longer retain the old suffix that enables this attack.
### Impact
Successful exploitation can execute code with the privileges of the PHP worker. It requires attacker influence over the session data, an interruption at a useful point in the write, and an application with a suitable deserialization gadget chain. The issue can also corrupt session state. Authentication requirements depend on how the application exposes the affected session operations.
Other session storage implementations are not affected by this specific file-write defect, although their own handling of interrupted updates must be considered separately.
### Affected versions
The affected code has been present since PHP 4.1.0. This is based on code inspection.
### Mitigation
Upgrade to the fixed release for your PHP branch when it becomes available. As a temporary measure, disable `session.upload_progress.enabled` administratively if the feature is not needed, and limit the amount of untrusted data stored in sessions. Disabling upload progress removes that input path but does not fix applications that independently store attacker-controlled session data.
A session storage backend that replaces records atomically can avoid this file-write defect. The PHP update remains the recommended fix for applications using the built-in `files` handler.
Sources name 8.2.36, but that release was not found in the php.net release list used for this check. Fixed version: not verified.
### Summary
PHP can fail to discard unread bytes from an HTTP request body before reusing a persistent PHP-FPM or LSAPI connection. In PHP-FPM, an unauthenticated attacker can make those bytes form a separate FastCGI request, bypass front-end routing and execute attacker-controlled PHP code with the privileges of the worker.
### Details
FastCGI and LSAPI connections can carry more than one request. Before accepting another request on the same connection, PHP must either consume the previous request body or close the connection.
Opening `php://input` creates a request-body stream, but PHP reads its contents lazily. During request shutdown, PHP incorrectly treated the existence of this stream as evidence that the body had already been handled and skipped the normal cleanup that discards unread input.
An attacker can combine this behaviour with a malformed `multipart/form-data` body that makes PHP's multipart parser stop at a predictable position. If the application then opens `php://input` without reading it to the end, attacker-controlled body bytes remain in the current backend request. This can occur in request frameworks that create an input stream before routing or authentication, even when the selected endpoint does not use the body.
When `FCGI_KEEP_CONN` is enabled, PHP-FPM preserves the connection and starts parsing another FastCGI request. The vulnerable implementation discarded its knowledge that it was still inside an `FCGI_STDIN` record, so a FastCGI message placed at the appropriate body offset was accepted as a new request. The front end never created or authorised this request.
The forged request controls FastCGI parameters including `SCRIPT_FILENAME`, `REMOTE_ADDR` and `PHP_ADMIN_VALUE`. If the attacker knows the path of an existing PHP script, they can set `allow_url_include=1` and `auto_prepend_file=php://input`, causing the forged request's own input to be executed as PHP. The changed administrator settings can also remain active for later requests served by the same worker. The shared request-cleanup error also affects LSAPI's persistent request lifecycle, but LSAPI does not use this FastCGI parameter mechanism.
The issue was introduced with lazy `php://input` handling in PHP 5.6.0. The fix drains input according to whether the body was fully consumed, independently of whether a `php://input` stream exists. PHP-FPM additionally closes a connection instead of accepting another request when the previous FastCGI input record is incomplete.
### Impact
Exploitation requires a front end that enables persistent backend connections and an application path that opens `php://input` without reading it fully. Relevant configurations include nginx with `fastcgi_keep_conn on`, Apache `mod_proxy_fcgi` with `enablereuse=on`, HAProxy FastCGI applications that retain backend connections, and LSAPI. Standard nginx and Apache configurations that close the FastCGI connection after each request are not affected by the demonstrated PHP-FPM attack.
For PHP-FPM, successful exploitation can execute attacker-controlled PHP code as the worker without another user's interaction or a non-default PHP configuration. It can also dispatch an existing PHP script outside the routes exposed by the front end, supply a forged client address to application access controls, or change administrator-level PHP settings for subsequent requests. The attack crosses the HTTP-to-PHP backend trust boundary using a single request. It does not require memory corruption, knowledge of memory addresses or a race condition.
For LSAPI, the shared cleanup error can leave body bytes on a persistent backend connection, desynchronising the request stream and disrupting subsequent requests. The `PHP_ADMIN_VALUE` chain used for PHP-FPM is not an LSAPI parameter path, so this advisory does not establish arbitrary code execution through LSAPI.
### Affected versions
The affected code has been present since PHP 5.6.0. This is based on code inspection.
### Mitigation
Upgrade to the fixed release for your PHP branch when it becomes available. Until then, disable backend connection reuse on the affected front end: leave nginx `fastcgi_keep_conn` disabled, leave Apache `enablereuse` disabled, or configure another FastCGI front end to close its backend connection after every request.
Reading `php://input` to the end before completing every request prevents the demonstrated unread-body condition, but error paths, resource exhaustion and application shutdown can make this unreliable as the sole mitigation. Do not expose PHP-FPM or LSAPI listeners directly to untrusted networks.
Sources name 8.2.36, but that release was not found in the php.net release list used for this check. Fixed version: not verified.
### Summary
PHP can retain a reference to a freed timezone cache when a diagnostic is written to a PHP error log file during process startup. A later diagnostic during early request initialization can access the freed cache before it is reset. On affected configurations, a remote attacker can trigger memory corruption, cause a worker to crash, and potentially execute arbitrary code with the privileges of the PHP worker.
### Details
PHP formats file-based error log timestamps using the configured timezone. In a non-thread-safe build, a diagnostic emitted during module startup can cause PHP to allocate the timezone cache in temporary startup memory. That memory is released at the end of startup, but the internal reference to the cache remains until the date extension initializes the first request. An earlier diagnostic, such as the warning produced when request input exceeds `max_input_vars`, can therefore read or modify a freed hash table. The released memory may already contain attacker-controlled request data.
The startup diagnostic must occur late enough that subsequent initialization does not clear the cached reference. Confirmed examples include an invalid `date.timezone` value and a warning or deprecation caused by session configuration. The diagnostic must actually be written through PHP's file-based `error_log` path. FPM's own error log does not by itself meet this condition.
In FPM and Apache mod_php, workers can inherit the stale reference from the parent process. The vulnerable window lasts until a worker completes its first normal request. Newly created or recycled workers can encounter the same condition. A crafted HTTP request has been shown to crash an FPM worker using the default `max_input_vars` value and ordinary nginx header limits. The issue has also been reproduced with CGI.
A separate local FPM proof demonstrated native command execution with known runtime addresses. It uses early HTTP Basic credential decoding to replace the stale cache, then reuses request-data allocations and triggers their destruction while `$_REQUEST` is constructed. That particular chain requires additional configuration, including `auto_globals_jit=0` and cookies in `request_order`, a suitable heap layout, and an Authorization header larger than nginx's default per-header limit. These are conditions of the demonstrated exploit, not general requirements of the underlying memory-corruption flaw. Other exploitation paths may be possible.
Native command execution has also been demonstrated in Apache mod_php. Besides the same GET/COOKIE chain, Apache has a separate path when request startup fails before the cache is reset. Request cleanup can destroy the forged cache and invoke an attacker-controlled destructor. The demonstrated variant uses a POST that exceeds a configured 2 MB PHP memory limit and requires known runtime addresses, a suitable heap layout, and a larger allowed Authorization header. It does not require cookies or changes to `auto_globals_jit` or `request_order`. ASLR remained enabled during these proofs. A remote ASLR bypass is plausible, although a complete independent bypass has not been demonstrated.
### Impact
An unauthenticated remote attacker may be able to crash PHP workers or execute arbitrary code with their privileges on an affected deployment. The trigger requires a suitable startup diagnostic, PHP error logging to a file, and an early request diagnostic in a fresh worker. Code execution has been demonstrated locally in FPM and Apache mod_php with known addresses and additional configuration assumptions. Successful exploitation does not require application-level code execution or attacker control of `PHP_VALUE` or `PHP_ADMIN_VALUE`.
### Affected versions
The affected code has been present since PHP 5.3.18 and 5.4.8. An earlier form of it was present in PHP 5.2.10, 5.2.12 to 5.2.17 and 5.3.0 to 5.3.8. This is based on code inspection.
### Mitigation
Upgrade to PHP 8.2.36, 8.3.37, 8.4.28, or 8.5.13 when the corresponding release is available. The fix formats error log timestamps in UTC outside a fully initialized active request, avoiding use of request-local timezone state at unsafe points in the lifecycle.
Until an update can be deployed, correct configuration errors and deprecated settings that produce startup diagnostics, then restart the PHP master process and all workers. Sending PHP errors to a suitable logging destination that does not use this file-timestamp path, such as syslog, also avoids the demonstrated trigger. Changing `$_REQUEST` or cookie settings is not a complete mitigation. The demonstrated Apache cleanup path does not require those settings.
Sources name 8.2.36, but that release was not found in the php.net release list used for this check. Fixed version: not verified.
PHP 8.2 only, 8.2.0 (including) to 8.2.20 (excluding); 8.2.0 (including) to 8.2.20 (excluding)
Fixed: 8.2.20
In PHP versions 8.1.* before 8.1.29, 8.2.* before 8.2.20, 8.3.* before 8.3.8, the fix for CVE-2024-1874 does not work if the command name includes trailing spaces. Original issue: when using proc_open() command with array syntax, due to insufficient escaping, if the arguments of the executed command are controlled by a malicious user, the user can supply arguments that would execute arbitrary commands in Windows shell.
8.2.20 is the fixed release named by the matching range and it is published on php.net.
Prerequisites: Module: proc_open; Platform: Windows
RCE basis: CWE-78 (OS Command Injection) is listed on the record
PHP 8.2 only, 8.2.0 (including) to 8.2.24 (excluding); 8.2.0 (including) to 8.2.24 (excluding)
Fixed: 8.2.24
In PHP versions 8.1.* before 8.1.30, 8.2.* before 8.2.24, 8.3.* before 8.3.12, when using a certain non-standard configurations of Windows codepages, the fixes for CVE-2024-4577 https://github.com/advisories/GHSA-vxpp-6299-mxw3 may still be bypassed and the same command injection related to Windows "Best Fit" codepage behavior can be achieved. This 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.
8.2.24 is the fixed release named by the matching range and it is published on php.net.
Prerequisites: Platform: Windows
RCE basis: CWE-78 (OS Command Injection) is listed on the record; Description says command injection; Description says arbitrary code execution
### Summary
PHP-FPM can dispatch an epoll event that refers to a freed worker record when worker output capture is enabled. An attacker who can execute PHP code in an unprivileged FPM worker can exploit this use-after-free to execute commands with the privileges of the FPM master, which commonly runs as root.
### Details
When `catch_workers_output` is enabled, the FPM master monitors pipes connected to worker stdout and stderr. The epoll registrations store pointers to event structures embedded in the corresponding worker record.
When a worker exits, `fpm_child_close()` attempts to drain its output pipes. If a helper process still holds a pipe's write end open, the read can return `EAGAIN` instead of reaching EOF. In this case, the master closes the pipe's read descriptor without first removing its event or invalidating the descriptor number stored in the worker record. Cleanup of that record is deferred for one second.
An attacker can stop a newly forked sibling after it drops to the pool user but before it closes inherited descriptors. The stopped sibling retains the original pipe readers and epoll descriptor, keeping the original watch alive after the master closes its own descriptors. The delayed cleanup can then use a descriptor number that has already been reused, removing the wrong watch or failing to remove the original one before freeing the worker record. A subsequent write to the old pipe makes epoll return a pointer into the freed record.
The master passes that pointer to `fpm_event_fire()`, which reads and calls the event callback. The demonstrated exploit uses the stale output callback to write through a freed logging buffer, corrupt the allocator's free list, and replace the callback with a function that executes a command. Root command execution was reproduced from a `www-data` worker against unmodified PHP 8.5.12 Docker images on Linux arm64 and x86-64. The exploit is dependent on memory layout and process timing. Curl and OPcache were used to obtain memory addresses for the demonstrated chain; they are not required to trigger the underlying epoll use-after-free.
The affected delayed-cleanup path was introduced in PHP 8.1.20 and 8.2.7. The fix unregisters each stdio event while its original descriptor is still valid, closes the descriptor, and sets the stored descriptor to `-1` so that delayed cleanup cannot act on it again.
### Impact
Exploitation requires local code execution in an FPM worker, an affected pool with `catch_workers_output` enabled, the epoll event backend, and the ability to manipulate worker lifetimes and retain inherited pipe descriptors. A root FPM master permits escalation from the pool user to root. If the master runs as an unprivileged user, successful exploitation is limited to that user's privileges. In a container, this grants the master's container privileges and does not by itself establish a container escape.
The underlying descriptor-lifetime error can also close another worker's reused descriptor, disrupt logging or request handling, cause repeated worker respawns, or crash the master. Common affected configurations include the official PHP-FPM Docker images, which enable worker output capture. The default PHP-FPM setting outside such configurations is `catch_workers_output = no`.
### Affected versions
The affected delayed-cleanup path was introduced by the fix for GH-10461, first released in PHP 8.1.20 and 8.2.7.
### Mitigation
Upgrade to the fixed release for your PHP branch when it becomes available. As a temporary workaround, disable `catch_workers_output` in affected pools. Running the FPM master without root limits the privileges obtainable through this vulnerability, but does not correct the use-after-free. Disabling Curl or OPcache only removes parts of the demonstrated exploit chain and should not be treated as a complete mitigation.
8.2.36 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.26 (excluding); 8.2.0 (including) to 8.2.26 (excluding)
Fixed: 8.2.26
In PHP versions 8.1.* before 8.1.31, 8.2.* before 8.2.26, 8.3.* before 8.3.14, due to an error in convert.quoted-printable-decode filter certain data can lead to buffer overread by one byte, which can in certain circumstances lead to crashes or disclose content of other memory areas.
8.2.26 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.30 (excluding); 8.2.0 (including) to 8.2.30 (excluding)
Fixed: 8.2.30
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, a heap buffer overflow occurs in array_merge() when the total element count of packed arrays exceeds 32-bit limits or HT_MAX_SIZE, due to an integer overflow in the precomputation of element counts using zend_hash_num_elements(). This may lead to memory corruption or crashes and affect the integrity and availability of the target server.
8.2.30 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.30 (excluding); 8.2.0 (including) to 8.2.30 (excluding)
Fixed: 8.2.30
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 when using the PDO PostgreSQL driver with PDO::ATTR_EMULATE_PREPARES enabled, an invalid character sequence (such as \x99) in a prepared statement parameter may cause the quoting function PQescapeStringConn to return NULL, leading to a null pointer dereference in pdo_parse_params() function. This may lead to crashes (segmentation fault) and affect the availability of the target server.
8.2.30 is the fixed release named by the matching range and it is published on php.net.
### Summary
PHP's HTTP and FTP stream wrappers can send data without encryption when an HTTPS or FTPS URL has an uppercase `S` in its scheme, for example `HTTPS://`, `httpS://` or `FTPS://`. Applications using `file_get_contents()`, `fopen()` or other stream functions may therefore expose passwords, authentication tokens, request bodies or transferred files to an attacker able to observe the network traffic.
### Details
The stream wrappers recognise URL schemes without regard to case, but the decision to enable TLS checks for a lowercase `s` at a fixed position. A URL that passes an application's case-insensitive HTTPS or FTPS validation can consequently use the unencrypted HTTP or FTP transport.
The HTTP issue also applies to redirect targets. For example, a `307` redirect from a valid HTTPS connection to an uppercase `HTTPS://` URL can cause the preserved POST body and any retained authentication headers to be sent in cleartext. A request can disclose data even if the destination rejects the unexpected plaintext connection.
The fix determines whether TLS is required by comparing the complete scheme case-insensitively. It covers both the HTTP and FTP stream wrappers.
### Impact
An attacker who can observe an affected connection can read the data that the application expected TLS to protect. This can include Basic authentication credentials, bearer tokens, cookies, sensitive POST data, FTP login credentials and file contents. Exploitation requires an affected URL to reach a stream wrapper, either directly or through a redirect, and access to the resulting network traffic. The impact depends on the data being transferred. disclosure of credentials or other highly sensitive data can have a serious confidentiality impact.
### Affected versions
Mixed-case URLs passed by an application have been affected since PHP 5.2.0, and redirects to a mixed-case URL since PHP 4.3.0. This is based on code inspection.
### Mitigation
Upgrade to the fixed release for your PHP branch when it becomes available. As a temporary workaround, ensure that HTTPS and FTPS URL schemes are written in lowercase before passing them to a stream function. If HTTP redirects are allowed, disable automatic redirects and validate and normalise every redirect target before following it. Normalising only the initial URL does not protect requests that follow redirects automatically.
Sources name 8.2.36, but that release was not found in the php.net release list used for this check. Fixed version: not verified.
PHP 8.2 only, 8.2.0 (including) to 8.2.33 (excluding); 8.2.0 (including) to 8.2.33 (excluding)
Fixed: 8.2.33
Improper escaping of backslashes in attacker-provided parameters would allow for trivial SQL injection in PHP versions from 8.2.* before 8.2.33, from 8.3.* before 8.3.33, from 8.4.* before 8.4.24, and from 8.5.* before 8.5.9.
8.2.33 is the fixed release named by the matching range and it is published on php.net.
### Summary
An attacker who can modify an OpenSSL-signed Phar archive without changing its trusted public key can make PHP accept arbitrary archive contents. The attacker changes the archive's signature type to a keyless hash such as SHA-256 and replaces the OpenSSL signature with a matching digest. Applications that execute the archive may then run attacker-controlled PHP code.
### Details
PHP stores an OpenSSL signature in the Phar archive, but obtains the verification key from a separate `<archive>.pubkey` file. For the native phar format, the archive controls the signature type through the four bytes before the `GBMB` magic. Tar- and zip-based phars control it through the first four bytes of `.phar/signature.bin`.
The verifier treats this type as authoritative when selecting the verification method. Only the OpenSSL signature types read and use `<archive>.pubkey`. MD5, SHA-1, SHA-256 and SHA-512 compare a digest that anyone can recompute. An attacker can therefore replace the archive contents and OpenSSL signature, select SHA-256 and satisfy `phar.require_hash=1` without possession of the private key. The trusted public key is not consulted.
Native, tar- and zip-based executable phars are affected. Explicitly signed tar- and zip-based `PharData` archives use the same verification path. This behaviour has been present since OpenSSL Phar signatures were introduced in PHP 5.3.0. The fix rejects a non-OpenSSL signature when an adjacent `.pubkey` file indicates that OpenSSL verification is expected. Archives without such a sidecar retain their existing signature behaviour.
### Impact
Exploitation requires the application to rely on an OpenSSL-signed Phar with a public key installed through a trusted channel, an attacker able to alter or replace the archive but not that public key, and the application subsequently loading the archive. Executing the modified archive can run attacker-controlled PHP code with the privileges of the affected process, compromising its data and availability.
The `.pubkey` file is PHP's external trust anchor and is not embedded or pinned in the Phar. If an attacker can also remove or replace it, they can already provide an archive signed with their own OpenSSL key. the fix does not protect that deployment. `phar.require_hash` alone provides corruption detection and does not authenticate keyless signatures.
### Affected versions
The affected code has been present since PHP 5.3.0. This is based on code inspection.
### Mitigation
Upgrade to the fixed release for your PHP branch when it becomes available. Obtain the publisher's public key through an authenticated channel and install it as `<archive>.pubkey` with permissions that prevent the archive update or download path from removing or replacing it. If the key cannot be protected independently, verify the archive using another mechanism that pins a trusted key before PHP loads it.
Sources name 8.2.36, but that release was not found in the php.net release list used for this check. Fixed version: not verified.
PHP 8.2 only, 8.2.0 (including) to 8.2.24 (excluding); 8.2.0 (including) to 8.2.24 (excluding)
Fixed: 8.2.24
In PHP versions 8.1.* before 8.1.30, 8.2.* before 8.2.24, 8.3.* before 8.3.12, HTTP_REDIRECT_STATUS variable is used to check whether or not CGI binary is being run by the HTTP server. However, in certain scenarios, the content of this variable can be controlled by the request submitter via HTTP headers, which can lead to cgi.force_redirect option not being correctly applied. In certain configurations this may lead to arbitrary file inclusion in PHP.
8.2.24 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.29 (excluding); 8.2.0 (including) to 8.2.29 (excluding)
Fixed: 8.2.29
In PHP versions:8.1.* before 8.1.33, 8.2.* before 8.2.29, 8.3.* before 8.3.23, 8.4.* pgsql and pdo_pgsql escaping functions do not check if the underlying quoting functions returned errors. This could cause crashes if Postgres server rejects the string as invalid.
8.2.29 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.34 (excluding); 8.2.0 (including) to 8.2.34 (excluding)
Fixed: 8.2.34
cleanup_xml_node() in the SOAP XML parser recurses once per XML nesting level with no depth limit. An unauthenticated attacker can post a SOAP request containing tens of thousands of nested elements to any SoapServer endpoint, exhaust the stack and crash the process. The same unbounded recursion exists in the SOAP value decoder and in the WSDL node search helper.
8.2.34 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.31 (excluding); 8.2.0 (including) to 8.2.31 (excluding)
Fixed: 8.2.31
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.
8.2.31 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.31 (excluding); 8.2.0 (including) to 8.2.31 (excluding)
Fixed: 8.2.31
In PHP versions 8.2.* before 8.2.31, 8.3.* before 8.3.31, 8.4.* before 8.4.21, 8.5.* before 8.5.6, due to improper sanitation of user data, it allows an attacker to compose an URL, which will cause the target to execute arbitrary JavaScript code (XSS) on the target's machine when the target is viewing the PHP-FPM status page.
8.2.31 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.26 (excluding); 8.2.0 (including) to 8.2.26 (excluding)
Fixed: 8.2.26
In PHP versions 8.1.* before 8.1.31, 8.2.* before 8.2.26, 8.3.* before 8.3.14, when using streams with configured proxy and "request_fulluri" option, the URI is not properly sanitized which can lead to HTTP request smuggling and allow the attacker to use the proxy to perform arbitrary HTTP requests originating from the server, thus potentially gaining access to resources not normally available to the external user.
8.2.26 is the fixed release named by the matching range and it is published on php.net.
### Summary
The PHP CGI binary (`php-cgi`) can access memory outside the supplied path information when a web server passes inconsistent script and path values. Depending on the request and configuration, an unauthenticated attacker may be able to crash the PHP process, expose process memory, or corrupt memory.
This affects `php-cgi` in both CGI and FastCGI mode when `cgi.fix_pathinfo=1`, the default. PHP-FPM and PHP running as an Apache module are not affected.
### Details
The problem occurs when PHP removes a trailing path from `SCRIPT_FILENAME`, or from `PATH_TRANSLATED` in a redirected CGI request, but the supplied `PATH_INFO` is shorter than the path being removed. A present but empty `PATH_INFO` can also trigger the problem. This requires particular web server mappings; using CGI, FastCGI, or URL rewriting alone is not enough.
In `init_request_info()`, PHP calculates the replacement `PATH_INFO` by subtracting the length of the removed suffix from the end of the supplied value. If the suffix is longer, the resulting pointer lies before the `PATH_INFO` buffer. Subsequent path correction can read, write and copy memory through this invalid pointer. The fix checks the lengths before deriving the pointer and skips the rewrite when no valid replacement exists.
#### Apache CGI example
A legitimate configuration that can produce these values is a legacy Apache CGI installation using `Action`, combined with a rewrite to an absolute filesystem path. For example, this virtual-host configuration routes a short public URL to a longer route handled by an existing `/srv/site/index.php`:
```apache
DocumentRoot "/srv/site"
ScriptAlias /cgi-bin/php "/usr/local/bin/php-cgi"
AddHandler php-script .php
Action php-script /cgi-bin/php
<Directory "/srv/site">
AcceptPathInfo On
</Directory>
RewriteEngine On
RewriteRule "^/news/(.*)$" "/srv/site/index.php/content/articles/$1" [L]
```
This fragment assumes an otherwise working Apache CGI installation with the required modules and access permissions. The `Action` arrangement is described in the [PHP CGI installation documentation](https://www.php.net/manual/en/security.cgi-bin.force-redirect.php).
A request for `/news/x` can then reach PHP with:
```text
PATH_INFO = /news/x
PATH_TRANSLATED = /srv/site/index.php/content/articles/x
REDIRECT_URL = /news/x
```
PHP finds the existing `index.php`, but the remaining `/content/articles/x` is longer than the original `/news/x`. Attempting to reconcile these values triggers the invalid memory access. This was reproduced through an actual HTTP request with Apache 2.4.58 and an unmodified PHP CGI binary. An `Alias` that maps `/news` to `/srv/site/index.php/content/articles` produced the same result.
The ordinary `Action` setup, a conventional rewrite to `index.php`, and a rewrite to the URL `/index.php/content/articles/x` did not trigger the issue in these tests. The vulnerable example is a valid routing configuration, but it does not imply that typical Apache PHP installations are affected.
#### Other FastCGI front ends
A front end can also expose the issue if it builds `SCRIPT_FILENAME` from an unsplit request path while supplying a shorter or empty `PATH_INFO`. Review custom FastCGI parameter mappings and configurations that forward requests without checking that the selected script exists. For nginx, this includes checking how [`fastcgi_split_path_info`](https://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_split_path_info), `SCRIPT_FILENAME`, `PATH_INFO`, and any `try_files` check work together. A correctly split and validated script path avoids this form of the issue.
An exposed `php-cgi` FastCGI listener also allows an untrusted client to supply these parameters directly. PHP-FPM remains unaffected.
### Impact
- **Denial of service:** a single unauthenticated request can crash the `php-cgi` process handling it. Crashes were reproduced on default, non-debug builds of PHP 8.2.35, 8.3.36, 8.4.27, and 8.5.12.
- **Information disclosure:** unrelated memory can appear in `$_SERVER['PATH_INFO']` or `PATH_TRANSLATED`. This may include other request parameters or values added by the front end. Disclosure to the attacker depends on the application returning these values or making them available through logs or other output.
- **Memory corruption:** PHP can overwrite memory during path correction. Code execution has been claimed, but has not been confirmed.
### Affected versions
The out-of-bounds read has been present since PHP 4.3.0 and the out-of-bounds write since PHP 5.2.4. This is based on code inspection.
### Mitigation
Upgrade to the fixed release for your PHP branch when it becomes available. As a workaround, set `cgi.fix_pathinfo=0` in the configuration used by `php-cgi`, and check that the application's routing still works.
Alternatively, correct the web server mapping so that the path PHP uses identifies the existing script and any additional path information is consistent. For the Apache example above, rewriting to the URL instead of the absolute filesystem path avoided the issue:
```apache
RewriteRule "^/news/(.*)$" "/index.php/content/articles/$1" [PT,L]
```
See Apache's documentation for the [`PT` rewrite flag](https://httpd.apache.org/docs/2.4/rewrite/flags.html#flag_pt). Other rewrites and aliases can affect the result, so verify the complete configuration. Direct access to a FastCGI listener should also be restricted to trusted front ends.
Sources name 8.2.36, but that release was not found in the php.net release list used for this check. Fixed version: not verified.
PHP 8.2 only, 8.2.0 (including) to 8.2.34 (excluding); 8.2.0 (including) to 8.2.34 (excluding)
Fixed: 8.2.34
On Windows, PHP's filesystem and stream APIs do not reject reserved device names such as CON, PRN, AUX, NUL, COM1 to COM9, LPT1 to LPT9, CONIN$ and CONOUT$ when they appear as a component of a path. An attacker-controlled filename therefore reaches CreateFileW() and opens a device instead of the regular file the application expected, which can block or hang the request and exhaust worker processes.
8.2.34 is the fixed release named by the matching range and it is published on php.net.
Prerequisites: NVD configuration also requires cpe:2.3:o:microsoft:windows:-:*:*:*:*:*:*:*
PHP 8.2 only, 8.2.0 (including) to 8.2.18 (excluding); 8.2.0 (including) to 8.2.18 (excluding)
Fixed: 8.2.18
In PHP version 8.1.* before 8.1.28, 8.2.* before 8.2.18, 8.3.* before 8.3.5, if a password stored with password_hash() starts with a null byte (\x00), testing a blank string as the password via password_verify() will incorrectly return true.
8.2.18 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.34 (excluding); 8.2.0 (including) to 8.2.34 (excluding)
Fixed: 8.2.34
The SOAP HTTP client guards its response buffer growth with a check that relies on signed integer overflow, which is undefined behaviour and is not guaranteed to trigger. When the check is optimised away, a malicious SOAP server can make the client allocate a buffer far smaller than the data it then writes into it, producing a heap buffer overflow.
8.2.34 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.34 (excluding); 8.2.0 (including) to 8.2.34 (excluding)
Fixed: 8.2.34
php_openssl_matches_wildcard_name() in ext/openssl/xp_ssl.c underflows the length argument passed to memchr() when a TLS server certificate presents a wildcard name whose literal characters are together longer than the hostname being verified. A malicious server presenting such a certificate makes the PHP client read up to SIZE_MAX bytes past the end of a heap allocation. The path is reachable from any default client stream, because verify_peer_name is enabled by default.
8.2.34 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.34 (excluding); 8.2.0 (including) to 8.2.34 (excluding)
Fixed: 8.2.34
The IPv6 branch of the FastCGI client access check compares only the first 12 bytes of a 16-byte IPv6 address, so listen.allowed_clients matches on a /96 prefix instead of the exact address. An attacker who can source an address sharing the first 96 bits with an allowed one passes the check and reaches the FastCGI endpoint.
8.2.34 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.28 (excluding); 8.2.0 (including) to 8.2.28 (excluding)
Fixed: 8.2.28
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 http request module parses HTTP response obtained from a server, folded headers are parsed incorrectly, which may lead to misinterpreting the response and using incorrect headers, MIME types, etc.
8.2.28 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.28 (excluding); 8.2.0 (including) to 8.2.28 (excluding)
Fixed: 8.2.28
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 requesting a HTTP resource using the DOM or SimpleXML extensions, the wrong content-type header is used to determine the charset when the requested resource performs a redirect. This may cause the resulting document to be parsed incorrectly or bypass validations.
8.2.28 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.30 (excluding); 8.2.0 (including) to 8.2.30 (excluding)
Fixed: 8.2.30
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.
8.2.30 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.28 (excluding); 8.2.0 (including) to 8.2.28 (excluding)
Fixed: 8.2.28
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 receiving headers from HTTP server, the headers missing a colon (:) are treated as valid headers even though they are not. This may confuse applications into accepting invalid headers.
8.2.28 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.28 (excluding); 8.2.0 (including) to 8.2.28 (excluding)
Fixed: 8.2.28
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 user-supplied headers are sent, the insufficient validation of the end-of-line characters may prevent certain headers from being sent or lead to certain headers be misinterpreted.
8.2.28 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.28 (excluding); 8.2.0 (including) to 8.2.26 (excluding)
Fixed: 8.2.28
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 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.
Sources name 8.2.26, 8.2.28. 8.2.28 is the later bound, so it covers every stated fix, and it is published on php.net.
### Summary
PHP's SOAP extension can read freed memory while processing XML containing a document type definition (DTD) and an entity reference in an attribute value. An unauthenticated attacker who can send a crafted request to an exposed SOAP endpoint can crash the PHP process handling it. Applications that load attacker-controlled WSDL or imported schema documents can also be affected.
### Details
While cleaning up a parsed XML document, PHP frees the DTD even though attribute values can still refer to content it owns. Processing those attributes can then access freed memory. Removing the DTD also bypasses the SOAP server's normal rejection of documents containing a DTD.
The fix keeps the DTD alive for as long as the XML document needs it and restores the existing SOAP DTD check. The issue predates the changes made for [CVE-2026-91765](https://github.com/php/php-src/security/advisories/GHSA-rgrp-mwpx-f6rm) and affects earlier releases in all supported PHP branches.
### Impact
Exploitation requires the SOAP extension and an application that processes attacker-controlled SOAP XML, WSDL or schema content. Authentication does not protect an endpoint if the application parses the SOAP request before authenticating it.
A crafted document can crash the PHP worker or process, and repeated requests can disrupt service. The original report also described corrupted type information after freed memory was reused. Disclosure of sensitive process memory and arbitrary code execution have not been confirmed.
### Affected versions
SOAP server requests have been affected since PHP 5.6.0. The same cleanup has applied to WSDL and schema documents since PHP 5.0.0, but loading an untrusted WSDL or schema is not considered a security issue. This is based on code inspection.
### Mitigation
Upgrade to the fixed release for your PHP branch when it becomes available. Until then, restrict access to affected SOAP endpoints or disable them where practical. Load WSDL and imported schemas only from trusted, controlled sources.
If untrusted SOAP requests must be accepted, reject documents containing a DTD before they reach the SOAP extension. Any such filter must correctly handle the XML encodings and request-body transformations accepted by the application. A simple text search is not a complete mitigation.
Sources name 8.2.36, but that release was not found in the php.net release list used for this check. Fixed version: not verified.
### Summary
PHP's SOAP extension can expose a small amount of uninitialized heap memory when processing an encoded array with an invalid `arraySize` value. An attacker can supply a crafted SOAP request or response that causes the decoded array to contain an unexpected integer key. The value reaches the attacker if the application returns or otherwise exposes that array.
### Details
An empty, whitespace-only or non-numeric `arraySize` can describe no dimensions. PHP nevertheless reads the first array position, which has not been initialized. With PHP's default memory allocator, the read falls within a small allocated block and can return four bytes of unrelated heap data. That value is then used as an array key. When the default allocator is disabled, AddressSanitizer reports an out-of-bounds heap read.
The fix treats a size containing no dimensions as a one-dimensional array. It also covers array dimensions read from WSDL definitions. The vulnerable behaviour is present in all supported PHP branches.
### Impact
An unauthenticated client can trigger the issue through a SOAP endpoint that accepts the crafted input. A malicious or compromised SOAP server can also supply an affected response to `SoapClient`.
The demonstrated impact is limited information disclosure when the application exposes the decoded array. Simply accepting the request does not guarantee that the value is returned to the attacker. The demonstrated case does not crash or corrupt memory with PHP's default allocator. Arbitrary code execution has not been demonstrated.
### Affected versions
The affected code has been present since PHP 5.0.0. This is based on code inspection.
### Mitigation
Upgrade to the fixed release for your PHP branch when it becomes available. Until then, restrict access to affected SOAP endpoints and use trusted SOAP services and WSDL definitions.
Where requests or responses can be validated before they reach the SOAP extension, reject encoded arrays whose `arraySize` contains no valid dimension. Avoid returning unvalidated decoded arrays to untrusted clients. These measures reduce exposure but do not replace the parser fix.
Sources name 8.2.36, but that release was not found in the php.net release list used for this check. Fixed version: not verified.
PHP 8.2 only, 8.2.0 (including) to 8.2.31 (excluding); 8.2.0 (including) to 8.2.21 (excluding)
Fixed: 8.2.31
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, some functions, including urldecode(), pass signed char to ctype functions (like isxdigit()). On the systems with default signed char and optimized table-lookup ctype functions - such as NetBSD - this can lead to accessing array with negative offset, which can trigger a denial of service.
Sources name 8.2.21, 8.2.31. 8.2.31 is the later bound, so it covers every stated fix, and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.31 (excluding); 8.2.0 (including) to 8.2.31 (excluding)
Fixed: 8.2.31
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, in the case SOAP requests results in an error, the persistance is handled incorrectly, resulting in 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, with confidentiality, integrity, and availability impact on the vulnerable system.
8.2.31 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.31 (excluding); 8.2.0 (including) to 8.2.31 (excluding)
Fixed: 8.2.31
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 metaphone() function in ext/standard/metaphone.c uses a signed int variable to track the current position within the input string. If a string longer than 2,147,483,647 bytes is passed, a signed integer overflow occurs, resulting in undefined behavior. This can lead to an out-of-bounds read, causing a segmentation fault or access to unrelated memory, and may affect the availability of the PHP process.
8.2.31 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.20 (excluding); 8.2.0 (including) to 8.2.20 (excluding)
Fixed: 8.2.20
The openssl_private_decrypt function in PHP, when using PKCS1 padding (OPENSSL_PKCS1_PADDING, which is the default), is vulnerable to the Marvin Attack unless it is used with an OpenSSL version that includes the changes from this pull request: https://github.com/openssl/openssl/pull/13817 (rsa_pkcs1_implicit_rejection). These changes are part of OpenSSL 3.2 and have also been backported to stable versions of various Linux distributions, as well as to the PHP builds provided for Windows since the previous release. All distributors and builders should ensure that this version is used to prevent PHP from being vulnerable.
PHP Windows builds for the versions 8.1.29, 8.2.20 and 8.3.8 and above include OpenSSL patches that fix the vulnerability.
8.2.20 is the fixed release named by the matching range and it is published on php.net.
Prerequisites: Module: openssl
Sources: php.net via NVD affected data, NVD CPE configuration
PHP 8.2 only, 8.2.0 (including) to 8.2.34 (excluding); 8.2.0 (including) to 8.2.34 (excluding)
Fixed: 8.2.34
The mysqlnd wire protocol parser reads fields out of server packets before checking that the packet still holds enough bytes for them. A malicious or compromised MySQL server can send a truncated packet and make the client read past the end of the packet buffer, which is undefined behaviour and can crash the process.
8.2.34 is the fixed release named by the matching range and it is published on php.net.
Prerequisites: NVD configuration also requires cpe:2.3:o:microsoft:windows:-:*:*:*:*:*:*:*
PHP 8.2 only, 8.2.0 (including) to 8.2.29 (excluding); 8.2.0 (including) to 8.2.29 (excluding)
Fixed: 8.2.29
In PHP versions:8.1.* before 8.1.33, 8.2.* before 8.2.29, 8.3.* before 8.3.23, 8.4.* before 8.4.10 when parsing XML data in SOAP extensions, overly large (>2Gb) XML namespace prefix may lead to null pointer dereference. This may lead to crashes and affect the availability of the target server.
8.2.29 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.34 (excluding); 8.2.0 (including) to 8.2.34 (excluding)
Fixed: 8.2.34
When the http:// stream wrapper follows a redirect it forwards the user-supplied Authorization, Cookie and Proxy-Authorization headers unchanged, even when the redirect target is a different host, a different port, or a downgrade from HTTPS to HTTP. A server that can steer a redirect therefore receives credentials that were only meant for the original origin. This is the same class of issue that libcurl fixed in 7.58.0 ( CVE-2018-1000007 https://github.com/advisories/GHSA-g7x2-hrfp-pv5f ).
8.2.34 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.34 (excluding); 8.2.0 (including) to 8.2.34 (excluding)
Fixed: 8.2.34
The convert.base64-encode, convert.quoted-printable-encode and convert.quoted-printable-decode stream filters accept a line-break-chars option whose length is tracked separately from the string itself. The filter constructors duplicate the value with pestrdup(), which stops at the first NUL byte, while keeping the original length. When the filter later emits a line break it copies the recorded length out of the truncated allocation, reading past its end and placing adjacent heap bytes into the filter output.
8.2.34 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.24 (excluding); 8.2.0 (including) to 8.2.26 (excluding); PHP 8.2 only, 8.2.0 (including) to 8.2.26 (excluding)
Fixed: 8.2.26
In PHP versions 8.1.* before 8.1.31, 8.2.* before 8.2.26, 8.3.* before 8.3.14, a hostile MySQL server can cause the client to disclose the content of its heap containing data from other SQL requests and possible other data belonging to different users of the same server.
Sources name 8.2.24, 8.2.26. 8.2.26 is the later bound, so it covers every stated fix, and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.34 (excluding); 8.2.0 (including) to 8.2.34 (excluding)
Fixed: 8.2.34
When the HTTP stream wrapper follows a redirect and the response carries a Location header with an empty value, the redirect code reads one byte past the end of the heap buffer holding the location. The value of that out-of-bounds byte decides which redirect target is built, so a malicious server controls whether the client is sent to the host root or to the current directory.
8.2.34 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.33 (excluding); 8.2.0 (including) to 8.2.33 (excluding)
Fixed: 8.2.33
Circular symbolic links in phar archives could lead to unbounded recursion, exhausting the C stack and crashing the PHP process, in PHP versions from 8.2.* before 8.2.33, from 8.3.* before 8.3.33, from 8.4.* before 8.4.24, and from 8.5.* before 8.5.9.
8.2.33 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.20 (excluding); 8.2.0 (including) to 8.2.20 (excluding)
Fixed: 8.2.20
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 the function will result in invalid user information (username + password part of URLs) being treated as valid user information. This may lead to the downstream code accepting invalid URLs as valid and parsing them incorrectly.
8.2.20 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.24 (excluding); 8.2.0 (including) to 8.2.24 (excluding)
Fixed: 8.2.24
In PHP versions 8.1.* before 8.1.30, 8.2.* before 8.2.24, 8.3.* before 8.3.12, erroneous parsing of multipart form data contained in an HTTP POST request could lead to legitimate data not being processed. This could lead to malicious attacker able to control part of the submitted data being able to exclude portion of other data, potentially leading to erroneous application behavior.
8.2.24 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.29 (excluding); 8.2.0 (including) to 8.2.29 (excluding)
Fixed: 8.2.29
In PHP versions:8.1.* before 8.1.33, 8.2.* before 8.2.29, 8.3.* before 8.3.23, 8.4.* before 8.4.10 some functions like fsockopen() lack validation that the hostname supplied does not contain null characters. This may lead to other functions like parse_url() treat the hostname in different way, thus opening way to security problems if the user code implements access checks before access using such functions.
8.2.29 is the fixed release named by the matching range and it is published on php.net.
### Summary
PHP-FPM can include attacker-controlled request metadata without escaping it in the full status response. An unauthenticated attacker can place HTML or JavaScript in a worker's scoreboard entry and execute it in the browser of an operator who later views the full HTML status page. The attacker does not need access to the status endpoint.
### Details
The earlier fix for [CVE-2026-6735](https://github.com/php/php-src/security/advisories/GHSA-7qg2-v9fj-4mwv) escaped the request URI and query string, but left the request method, authentication user and script filename unescaped in the per-process status output. These values are stored in the PHP-FPM scoreboard and later inserted into HTML, XML and JSON responses without the encoding required by each format.
The most direct attack uses the username from an HTTP Basic authentication header. When the front end forwards this header to PHP-FPM, PHP can decode and store the supplied username even if the application does not use Basic authentication. The scoreboard retains up to 31 bytes of the username, which is enough for an HTML element with a JavaScript event handler. A request to an ordinary PHP script in the pool can therefore plant a payload that runs when another user opens the status endpoint with `full&html`. The value remains in that worker's scoreboard entry until it is replaced by a later request.
The script filename provides another injection path when an attacker can influence the filename recorded by FPM, including configurations using `cgi.fix_pathinfo=0`. Ordinary web servers restrict the characters accepted in request methods, so the request-method field does not by itself establish the same HTTP attack path. Unescaped quotes or markup in these fields can also corrupt JSON or XML status responses and interfere with monitoring consumers.
The fix applies a common, format-appropriate escaping helper to the request method, request URI, query string, authentication user and script filename before rendering the full status response. A separate client-side injection issue in the bundled `status.html` dashboard is tracked in [GHSA-q8fm-p8fx-h6r6](https://github.com/php/php-src/security/advisories/GHSA-q8fm-p8fx-h6r6).
### Impact
Exploitation requires an enabled PHP-FPM status endpoint, a request path through which attacker-controlled metadata reaches the affected pool, and a user or tool that renders the full status data as HTML. For the authentication-user attack, the front end must forward the Basic authentication header to FPM. Restricting access to the status endpoint does not prevent an attacker from planting the payload through a separate application request.
Successful exploitation runs JavaScript in the status page's origin. It can expose request URIs, query strings and other information shown on the status page. If the page shares an origin with the application, the script can also act with the viewing user's session and read data available to that origin, including cookies that are not protected by `HttpOnly`. Malformed XML or JSON can additionally disrupt status parsing and monitoring.
### Affected versions
The affected status output has been present since PHP 5.3.9. This is based on code inspection.
### Mitigation
Upgrade to the fixed release for your PHP branch when it becomes available. As a temporary workaround, disable the PHP-FPM status endpoint or prevent use of its full HTML output. If full status data is required, use a consumer that validates the response and treats all field values as untrusted text. Restricting status access to trusted operators remains useful, but is not a complete mitigation because those operators can receive payloads planted by other clients.
Sources name 8.2.36, but that release was not found in the php.net release list used for this check. Fixed version: not verified.
8.2.0 (including) to 8.2.32 (excluding); PHP 8.2 only, 8.2.0 (including) to 8.2.32 (excluding)
Fixed: 8.2.32
In PHP versions 8.2.* before 8.2.32, 8.3.* before 8.3.32, 8.4.* before 8.4.23, 8.5.* before 8.5.8, the AES-WRAP-PAD algorithm implementation in OpenSSL extension contains a buffer allocation flaw. The output buffer for the AES key-wrap-with-padding operation is sized from the plaintext length without accounting for RFC 5649 expansion. This may cause OpenSSL to write beyond allocated memory, corrupting heap metadata and triggering application abort.
8.2.32 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.34 (excluding); 8.2.0 (including) to 8.2.34 (excluding)
Fixed: 8.2.34
PHP's OpenSSL stream peer verification checks the certificate's subjectAltName entries first and, whenever no entry matches, falls back to the Common Name. RFC 6125 requires the CN to be ignored once the certificate presents any service identity, so a certificate carrying a non-matching DNS SAN was still accepted when its CN matched the requested peer_name. A certificate trusted by the client for one name can therefore be used to impersonate another.
8.2.34 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.34 (excluding)
Fixed: 8.2.34
### Summary
`php_filter_encode_url()` builds a 256-entry lookup table that decides which bytes `FILTER_SANITIZE_ENCODED` percent-encodes, but initialises only the first 255 entries. Entry 255 is read uninitialised, so whether the byte `0xFF` is encoded or passed through depends on whatever happened to be on the stack.
### Details
The table is filled with `memset(tmp, 1, sizeof(tmp) - 1)`, which leaves `tmp[255]` untouched:
https://github.com/php/php-src/blob/php-8.5.9/ext/filter/sanitizing_filters.c#L73
The filter then consults `tmp[*s]` for every input byte, so for `0xFF` the decision comes from uninitialised stack memory. Every other byte is handled deterministically.
The fix changes the `memset()` length to `sizeof(tmp)` so the whole table is initialised.
### PoC
```php
<?php
$out = filter_var("\xff\xfeabc", FILTER_SANITIZE_ENCODED);
echo "in : ", bin2hex("\xff\xfeabc"), "\n";
echo "out: ", bin2hex($out), "\n";
```
```
in : fffe616263
out: ff254645616263
```
`0xFE` is percent-encoded as `%FE` while `0xFF` is passed through raw, showing that `tmp[255]` was read uninitialised.
### Impact
The impact is low. There is no crash and no memory corruption; the only effect is that the `0xFF` byte is sanitised inconsistently, depending on uninitialised stack contents. A downstream consumer that relies on `FILTER_SANITIZE_ENCODED` producing fully percent-encoded output could in principle be affected as part of a longer chain, but the filter provides no such guarantee on its own.
This issue was fixed publicly in 8.4.25 and 8.5.10 before it was recognised as security relevant, and is backported here to the branches that receive security fixes only.
8.2.34 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.24 (excluding); 8.2.0 (including) to 8.2.24 (excluding)
Fixed: 8.2.24
In PHP versions 8.1.* before 8.1.30, 8.2.* before 8.2.24, 8.3.* before 8.3.12, when using PHP-FPM SAPI and it is configured to catch workers output through catch_workers_output = yes, it may be possible to pollute the final log or remove up to 4 characters from the log messages by manipulating log message content. Additionally, if PHP-FPM is configured to use syslog output, it may be possible to further remove log data using the same vulnerability.
8.2.24 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.34 (excluding); 8.2.0 (including) to 8.2.34 (excluding)
Fixed: 8.2.34
phar_tar_number() parses the octal size field of a TAR header into a uint32_t with no overflow check. The field is 11 octal digits wide and holds values up to 0x1FFFFFFFF, so a size above 0xFFFFFFFF silently wraps. The parser then skips the wrong number of data blocks and interprets attacker-controlled file content as the next TAR header, which lets a crafted archive inject entries that PharData reports and extracts as if they were genuine.
8.2.34 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.31 (excluding); 8.2.0 (including) to 8.2.31 (excluding)
Fixed: 8.2.31
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 a SOAP server has a typemap configured, the decoding process contains a mistake which checks the wrong variable in case of missing value element. This leads to dereferences a NULL pointer, causing a segmentation fault. This allows a remote unauthenticated attacker to crash the PHP SOAP server process, resulting in denial of service.
8.2.31 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.31 (excluding); 8.2.0 (including) to 8.2.31 (excluding)
Fixed: 8.2.31
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, a mismatch between encoding lists in Oniguruma and mbfl leads to a NULL pointer dereference, resulting in a segmentation fault and denial of service. The vulnerability is exploitable when user-controlled input can influence the encoding passed to mb_regex_encoding().
8.2.31 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.18 (excluding)
Fixed: 8.2.18
### Summary
Due to an incomplete fix to CVE-2022-31629, network and 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.
### Details
The vulnerability is identical to one previously described in https://bugs.php.net/bug.php?id=81727. Unfortunatly, since CVE-2022-31629 got only partially fixed in PHP >8.1.11, cookies starting with `_[Host-` are parsed by PHP applications as `__Host-`. Notice that I reported this vulnerability multiple times via email after the fix for CVE-2022-31629 landed (I am the original reporter of that CVE), but I guess that the message got lost.
### PoC
```sh
$ echo '<?php echo(json_encode($_COOKIE)); ?>' > x
$ docker run -p 8080:8080 --rm -v $(pwd):$(pwd) php:latest php -S 0.0.0.0:8080 $(pwd)/x
$ curl -b '_[Host-x=y' localhost:8080/x
{"__Host-x":"y"}
```
8.2.18 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.26 (excluding)
Fixed: 8.2.26
### Summary
A heap-use-after-free vulnerability in the sapi_read_post_data function within PHP’s CLI server allows an attacker to potentially exploit memory safety issues during POST request processing.
### Details
The vulnerability resides in the `php_cli_server_client_populate_request_info` function in PHP's CLI SAPI. This results in the handling of a dangling `content_type` pointer at line 175 of SAPI.c. The CLI improperly manages memory during the processing of content_type, leading to a use-after-free condition that could result in memory corruption. The issue is triggered by specific crafted POST data, as shown by the following AddressSanitizer output:
```
==82343==ERROR: AddressSanitizer: heap-use-after-free on address 0x50600001ecf8 at pc 0x55555581b44f bp 0x7fffffffdcf0 sp 0x7fffffffd4b8
READ of size 34 at 0x50600001ecf8 thread T0
#1 0x5555563bfadb in sapi_read_post_data /php-8.3.13/main/SAPI.c:175:43
#2 0x5555563bfadb in sapi_activate /php-8.3.13/main/SAPI.c:469:4
```
### PoC
1. `exploit.py`
```py
import requests
url = 'http://localhost:8080/exploit.php'
php_crash_data = "AAAAAAA"
print("Sending payload 1...")
hex_response = requests.post(url, data={'input': php_crash_data})
print("\nSending payload 2...")
raw_response = requests.post(url, data=php_crash_data)
```
2. `exploit.php`
```php
<?php
$binary_data = file_get_contents('php://input');
echo $binary_data ? "Received Data:\n$binary_data" : "No input provided or data was empty.";
?>
```
3. Start the PHP server compiled with ASAN: In the directory containing exploit.php, run: `./sapi/cli/php -S localhost:8080 &`
2. Run the exploit: Execute the PoC script by running: `python3 exploit.py`
Resulted in this output:
```c
root@32fbd16f3ed1:/php-8.3.13# ./sapi/cli/php -S localhost:8080 &
[1] 82343
root@32fbd16f3ed1:/php-8.3.13# [Sat Nov 9 07:08:06 2024] PHP 8.3.13 Development Server (http://localhost:8080) started
root@32fbd16f3ed1:/php-8.3.13# python3 exploit.py
Sending payload 1...
[Sat Nov 9 07:08:14 2024] [::1]:54356 Accepted
[Sat Nov 9 07:08:14 2024] [::1]:54356 [200]: POST /exploit.php
[Sat Nov 9 07:08:14 2024] [::1]:54356 Closing
Sending payload 2...
[Sat Nov 9 07:08:14 2024] [::1]:54360 Accepted
=================================================================
==82343==ERROR: AddressSanitizer: heap-use-after-free on address 0x50600001ecf8 at pc 0x55555581b44f bp 0x7fffffffdcf0 sp 0x7fffffffd4b8
READ of size 34 at 0x50600001ecf8 thread T0
#0 0x55555581b44e in strlen (/php-8.3.13/sapi/cli/php+0x41b44e) (BuildId: 712b3d4fbdcb978a011679cd1c90ada321af14cf)
#1 0x5555563bfadb in sapi_read_post_data /php-8.3.13/main/SAPI.c:175:43
#2 0x5555563bfadb in sapi_activate /php-8.3.13/main/SAPI.c:469:4
#3 0x555556394fce in php_request_startup /php-8.3.13/main/main.c:1795:3
#4 0x555556c42e7b in php_cli_server_request_startup /php-8.3.13/sapi/cli/php_cli_server.c:2236:17
#5 0x555556c42e7b in php_cli_server_dispatch /php-8.3.13/sapi/cli/php_cli_server.c:2316:18
#6 0x555556c42e7b in php_cli_server_recv_event_read_request /php-8.3.13/sapi/cli/php_cli_server.c:2660:11
#7 0x555556c46447 in php_cli_server_do_event_for_each_fd_callback /php-8.3.13/sapi/cli/php_cli_server.c:2745:5
#8 0x555556c3c8e7 in php_cli_server_poller_iter_on_active /php-8.3.13/sapi/cli/php_cli_server.c:932:20
#9 0x555556c3c8e7 in php_cli_server_do_event_for_each_fd /php-8.3.13/sapi/cli/php_cli_server.c:2765:17
#10 0x555556c3c8e7 in php_cli_server_do_event_loop /php-8.3.13/sapi/cli/php_cli_server.c:2777:4
#11 0x555556c3c8e7 in do_cli_server /php-8.3.13/sapi/cli/php_cli_server.c:2909:17
#12 0x555556c272bd in main /php-8.3.13/sapi/cli/php_cli.c:1344:18
#13 0x7ffff75301c9 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#14 0x7ffff753028a in __libc_start_main csu/../csu/libc-start.c:360:3
#15 0x555555803bc4 in _start (/php-8.3.13/sapi/cli/php+0x403bc4) (BuildId: 712b3d4fbdcb978a011679cd1c90ada321af14cf)
0x50600001ecf8 is located 24 bytes inside of 64-byte region [0x50600001ece0,0x50600001ed20)
freed by thread T0 here:
#0 0x55555589e77a in free (/php-8.3.13/sapi/cli/php+0x49e77a) (BuildId: 712b3d4fbdcb978a011679cd1c90ada321af14cf)
#1 0x55555667fff8 in zend_hash_destroy /php-8.3.13/Zend/zend_hash.c:1775:7
previously allocated by thread T0 here:
#0 0x55555589ea13 in malloc (/php-8.3.13/sapi/cli/php+0x49ea13) (BuildId: 712b3d4fbdcb978a011679cd1c90ada321af14cf)
#1 0x5555564deb49 in __zend_malloc /php-8.3.13/Zend/zend_alloc.c:3128:14
SUMMARY: AddressSanitizer: heap-use-after-free (/php-8.3.13/sapi/cli/php+0x41b44e) (BuildId: 712b3d4fbdcb978a011679cd1c90ada321af14cf) in strlen
Shadow bytes around the buggy address:
0x50600001ea00: 00 00 00 fa fa fa fa fa 00 00 00 00 00 00 00 00
0x50600001ea80: fa fa fa fa 00 00 00 00 00 00 00 00 fa fa fa fa
0x50600001eb00: 00 00 00 00 00 00 00 00 fa fa fa fa 00 00 00 00
0x50600001eb80: 00 00 00 00 fa fa fa fa 00 00 00 00 00 00 00 00
0x50600001ec00: fa fa fa fa fd fd fd fd fd fd fd fd fa fa fa fa
=>0x50600001ec80: 00 00 00 00 00 00 00 fa fa fa fa fa fd fd fd[fd]
0x50600001ed00: fd fd fd fd fa fa fa fa 00 00 00 00 00 00 05 fa
0x50600001ed80: fa fa fa fa 00 00 00 00 00 00 00 04 fa fa fa fa
0x50600001ee00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x50600001ee80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x50600001ef00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==82343==ABORTING
```
### Impact
CLI server should not be used in production but there is still risk for developers running the CLI server. It may be possible to exploit it if the server only listens on localhost. E.g. a web page may trick your browser into sending a request to localhost. So developers running the CLI server could be attacked by tricking them into visiting a malicious web page. There might be other impact but it's not exactly clear about the likeliness of this attack.
8.2.26 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.28 (excluding)
Fixed: 8.2.28
This is a reocurrence of bug #72714 .
### Impact
Out of bounds read can leak heap contents.
```php
<?php
$sample = "<?xml version=\"1.0\"?><test><child/></test>";
$parser = xml_parser_create();
xml_parser_set_option($parser, XML_OPTION_SKIP_TAGSTART, 100);
$res = xml_parse_into_struct($parser,$sample,$vals,$index);
var_dump($vals);
```
If we set `XML_OPTION_SKIP_TAGSTART` to a high value, we can read out of bounds.
It doesn't even have to be a crazy high value, as long as an attacker can supply XML with shorter tag names than expected they can trigger an OOB read.
I coincidentally came across this by reviewing `xml.c`, I noticed this is a reocurrence of https://bugs.php.net/bug.php?id=72714
This was originally fixed in https://github.com/php/php-src/commit/9164dc11e2323b8b80c389bb13d70789799b44fc, but it seems the fix was either incomplete or not merged properly.
Granted, this option is rarely used.
### Workarounds
Don't use `XML_OPTION_SKIP_TAGSTART`.
8.2.28 is the fixed release named by the matching range and it is published on php.net.
PHP 8.2 only, 8.2.0 (including) to 8.2.30 (excluding)
Fixed: 8.2.30
### Summary
As GHSA-3cr5-j632-f35r, same null termination is occuring
### Details
dns_get_record() and other DNS functions don't have any null contain check, leads potential SSRF or unexpected behavior.
### PoC
```php
<?php
var_dump(dns_get_record("php.net\0aa"));
```
Result: DNS records of `php.net`
Expect: Fails to call
### Security impact
(Even though it's too low but,) Probability of SSRF
8.2.30 is the fixed release named by the matching range and it is published on php.net.
10 records matched only loosely, or trusted sources disagree. Those are marked potentially affected and need verification.
Records that name the PHP runtime but publish no usable version range were excluded instead of guessed.
GREEN means no matching CVE was confirmed in the data that could be checked, and the branch is still supported. It does not mean the installation is secure.