BIT-php-2026-115560: Session serializer mismatch can lead to remote code execution
Session serializer mismatch can lead to remote code execution.
Session upload progress, when enabled, can store attacker-controlled data in a session key using the phpbinary or phpserialize session serializer. If the same session is later read with the php serializer, because session.serializehandler is changed at runtime or differs between applications sharing a session store, bytes inside the key can be passed to the unserializer. A remote attacker able to submit a multipart upload can inject objects, which may lead to code execution when the reading application contains a suitable gadget chain, or to session corruption or denial of service.
This issue affects PHP versions before 8.2.36, 8.3. before 8.3.37, 8.4. before 8.4.28 and 8.5. before 8.5.13.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
bitnami/libphpto a version that resolves this vulnerability.Fixed in 8.2.36 - Upgrade
Upgrade
bitnami/libphpto a version that resolves this vulnerability.Fixed in 8.3.37 - Upgrade
Upgrade
bitnami/libphpto a version that resolves this vulnerability.Fixed in 8.4.28 - Upgrade
Upgrade
bitnami/libphpto a version that resolves this vulnerability.Fixed in 8.5.13 - Upgrade
Upgrade
bitnami/phpto a version that resolves this vulnerability.Fixed in 8.2.36 - Upgrade
Upgrade
bitnami/phpto a version that resolves this vulnerability.Fixed in 8.3.37 - Upgrade
Upgrade
bitnami/phpto a version that resolves this vulnerability.Fixed in 8.4.28 - Upgrade
Upgrade
bitnami/phpto a version that resolves this vulnerability.Fixed in 8.5.13 - Upgrade
Upgrade
bitnami/php-minto a version that resolves this vulnerability.Fixed in 8.2.36 - Upgrade
Upgrade
bitnami/php-minto a version that resolves this vulnerability.Fixed in 8.3.37 - Upgrade
Upgrade
bitnami/php-minto a version that resolves this vulnerability.Fixed in 8.4.28 - Upgrade
Upgrade
bitnami/php-minto a version that resolves this vulnerability.Fixed in 8.5.13 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 8.2.36 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 8.3.37 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 8.4.28 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 8.5.13
Event History
Frequently Asked Questions
Which deployments are exposed to remote code execution?
Exposure requires session upload progress to be enabled and a serializer mismatch: attacker-controlled upload-progress data must be written using php_binary or php_serialize and later read using php. This can occur when session.serialize_handler changes at runtime or when applications sharing a session store use different handlers.
What does an attacker need to exploit this issue?
The attacker must be able to submit a multipart upload. Code execution additionally depends on the application read path processing the affected session data and on the reading application having a suitable gadget chain.
Are applications without a suitable gadget chain safe from impact?
They may not be exposed to code execution through this issue, but the serializer mismatch can still cause session corruption or denial of service. The described condition still requires enabled session upload progress and incompatible session serialization between writing and reading.
What PHP releases are affected?
Affected releases are PHP before 8.2.36, 8.3 versions before 8.3.37, 8.4 versions before 8.4.28, and 8.5 versions before 8.5.13.