Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

github логотип

GHSA-658j-r8rw-q6mx

Опубликовано: 19 нояб. 2026
Источник: github
Github: Не прошло ревью
CVSS4: 9.2

Описание

Session serializer mismatch can lead to remote code execution

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.

Пакеты

Наименование

php

php
Затронутые версииВерсия исправления

>=5.4.0, <8.2.36

8.2.36

Наименование

php

php
Затронутые версииВерсия исправления

>=8.3.0, <8.3.37

8.3.37

Наименование

php

php
Затронутые версииВерсия исправления

>=8.4.0, <8.4.28

8.4.28

Наименование

php

php
Затронутые версииВерсия исправления

>=8.5.0, <8.5.13

8.5.13

EPSS

Процентиль: 100%
0.86584
Высокий

9.2 Critical

CVSS4

Дефекты

CWE-20
CWE-502

Связанные уязвимости

ubuntu
8 дней назад

Session serializer mismatch can lead to remote code execution. Session upload progress, when enabled, can store attacker-controlled data in a session key using the php_binary or php_serialize session serializer. If the same session is later read with the php serializer, because session.serialize_handler is changed at runtime or differs between applications sharing a session store, bytes inside the key can be passed to the unserializer. A remote attacker able to submit a multipart upload can inject objects, which may lead to code execution when the reading application contains a suitable gadget chain, or to session corruption or denial of service. This issue affects PHP versions before 8.2.36, 8.3.* before 8.3.37, 8.4.* before 8.4.28 and 8.5.* before 8.5.13. 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 relea...

CVSS3: 8.1
redhat
8 дней назад

Session serializer mismatch can lead to remote code execution. Session upload progress, when enabled, can store attacker-controlled data in a session key using the php_binary or php_serialize session serializer. If the same session is later read with the php serializer, because session.serialize_handler is changed at runtime or differs between applications sharing a session store, bytes inside the key can be passed to the unserializer. A remote attacker able to submit a multipart upload can inject objects, which may lead to code execution when the reading application contains a suitable gadget chain, or to session corruption or denial of service. This issue affects PHP versions before 8.2.36, 8.3.* before 8.3.37, 8.4.* before 8.4.28 and 8.5.* before 8.5.13.

nvd
8 дней назад

Session serializer mismatch can lead to remote code execution. Session upload progress, when enabled, can store attacker-controlled data in a session key using the php_binary or php_serialize session serializer. If the same session is later read with the php serializer, because session.serialize_handler is changed at runtime or differs between applications sharing a session store, bytes inside the key can be passed to the unserializer. A remote attacker able to submit a multipart upload can inject objects, which may lead to code execution when the reading application contains a suitable gadget chain, or to session corruption or denial of service. This issue affects PHP versions before 8.2.36, 8.3.* before 8.3.37, 8.4.* before 8.4.28 and 8.5.* before 8.5.13.

msrc
1 день назад

Session serializer mismatch can lead to remote code execution

debian
8 дней назад

Session serializer mismatch can lead to remote code execution. Sessio ...

EPSS

Процентиль: 100%
0.86584
Высокий

9.2 Critical

CVSS4

Дефекты

CWE-20
CWE-502