Back Sploitus Exploit for Improperly Controlled Sequential Memory Allocation in Php
In the **PHP session mechanism**, there are two high-risk vulnerabilities published in 2026. | CVE | Root cause | What is provided? |
| [CVE-2026-109618](cve-2026-109618/) | OOM condition causes `longjmp` to skip initialization; requests are still processed after the state is partially initialized | **Pure HTTP ASLR bypass** (chunk base address + libphp base address) |
| [CVE-2026-109619](cve-2026-109619/) | Inconsistent serialization methods in `php` and `php_serialize` | **Code execution primitive** (deserialization → `__destruct`) |
Patched versions: **8.2.35 / 8.3.36 / 8.4.27 / 8.5.12**. Versions earlier than 8.1 have been retired. ---
## Why these two vulnerabilities deserve to be grouped together
They are **complementary** rather than duplicate vulnerabilities:
- **109618**: Leads to the disclosure of the chunk base address and libphp base address (bypasses ASLR).
- **109619**: Deserialization → `__destruct$ → arbitrary calls (execution occurs).**
109619 doesn’t require ASLR information alone (since `__destruct` uses `system()` directly). But **when no suitable gadget exists in the target**, the addresses disclosed by 109618 can be used to create a fake one. Conversely, 109618 can only disclose its own Stage3 (fakes `pDestructor`). This hasn’t worked in the builds tested in this repository. See the README section 6 for details. ---
## Common point: Both require HTTP, and webroot is empty throughout.
Neither vulnerability relies on any application code being written into webroot:
- **109619** uses `session.upload_progress` to control the name of the session variable. PHP writes that name directly into the session file, which then undergoes deserialization by `php_serialize`.
- **109618** exploits the OOM condition to make `PS(id)` become a dangling pointer, and then uses forged `len` to read beyond the bounds. Again, no files need to be written. This is probably the most notable aspect: **The attacker doesn’t need to “upload a webshell” anymore.**
sudo bash target/01_setup_lab.sh 8.4 8080 109619
python3 cve-2026-109619/exploit/02_revshell.py \
# Disclose the chunk base address and libphp base address (CVE-2026-109618)
sudo bash target/01_setup_lab.sh 8.4 8080 109618
python3 cve-2026-109618/exploit/run_all.py --target --port 8080
The third parameter (`109618` / `109619`) only has one purpose: setting `session.upload_progress.cleanup`. See the section “`cleanup` conflicts” below for details. ### Environments tested in this repository
| PHP | **Official distribution package** `php8.4 8.4.26-1~deb13u1` (lower than patched version 8.4.27) |
| SAPI | Apache `mod_php`, `mpm_prefork`, single worker |
**Use official packages instead of self-compiled versions**, because that’s how real targets work. Candidate versions from the Debian repository are usually already fixed, so you need to retrieve older versions from the official pool and keep them with `apt-mark hold` (otherwise, a single `apt-get -f install` will update them). Self-compiled PHP can also run, but the **symbol offsets are completely different** — see the README for each directory for reloading methods. ---
## `Cleanup` conflict: Both chains require opposite values
`session.upload_progress.cleanup` is the only setting that requires opposite values for both chains:
| `Off` | Progress entries (their **name** is the payload) survive until the session is saved | On the writing side of 109619 |
| `On` | The END event triggers `php_session_rfc1867_cleanup()` → `php_session_initialize()` → `php_session_reset_id()` before sending a dangling `PS(id)` with a `Set-Cookie` | On the Stage 1 side of 109618 |
I initially set both chains to `Off`. As a result, 109618 always returns “no Set-Cookie” — because it is running on the END’s `update` branch, and `session_initialize` is never called. The third parameter of the target script is used for this purpose.
### Three lines that cannot be deleted in the target configuration
output_buffering = Off ; Switch for 109618 Stage1
max_input_vars = 1000 ; Required warning for 109618
The role of `output_buffering` is not for performance optimization. It only writes warnings during the `php_request_startup()` phase. It does not set `SG(headers_sent)`. If this setting is left unchanged, 109618’s `php_session_send_cookie()` will never fail, but `PS(send_cookie)` will be cleared properly, eliminating the premise of the entire chain. The side effect is that 109619’s read side will report “Session cannot be started after headers have already been sent”. Therefore, in `apache.conf`, buffer should be turned on specifically for `/serialized/`:
│ ├── 01_setup_lab.sh # Target shared by both chains (idempotent)
│ ├── apache.conf # Template; @PORT@/@APP@/@WEBROOT@ will be replaced
│ ├── gadget.php # This is a framework-based class on the actual target
│ └── serialized_index.php # Read side of php_serialize
│ │ ├── run_all.py # One-click: Chunk base address + libphp base address
│ │ ├── 01_stage1_a_poison.py
│ │ └── 01_stage1_b_chunkleak.py
│ └── verify/read_psid.sh # White-box: Read alive worker’s ps_globals
│ │ ├── 02_revshell.py # Reverse shell
│ │ └── 01_session_serializer_mismatch.py # Only writes proof documents
### Things that waste time most during debugging
| Using “not effective”, unable to find proof documents | Apache usually has `PrivateTmp=yes`. Check `/proc//root/tmp/`. Not in `/tmp` of the host machine |
| Structures read from gdb are completely misaligned | `ps_globals.id - 0x10` will be converted to `-0x180` based on `sizeof(zend_string)=24`. It must be written as `(char*)ps_globals.id - 0x10` |
| Attached but reading all 0s | There is also `htcacheclean` under `www_data`, which also loads libphp. Filter with `grep -q libphp8.4.so /proc/$p/maps` |
| `__destruct` not executed | Wrong serialization length prefix (`s:9` vs. a 10-byte command) |
| Occurs again the day | The package was upgraded to a fixed version by `apt-get -f install`. `apt-mark hold` |
| Apache cannot start after only `mod_php` is downgraded | `opcache` / `readline` must also be at the same version |
| Boundary reading only reaches strings on the same page | Zend MM paginates by bin. Need to increase `len` to 64KB to cross it |
This is for authorized security testing and vulnerability research only. All scripts default to `127.0.0.1`.
The full story
This article is one source in a clustered incident — the cluster page carries the summary, timeline and every other outlet covering it.
