πŸ“ˆ GH Trending Explorer 🎲 Surprise me

← all repos

Anton-Barinov / php2shell-patches

git clone https://github.com/Anton-Barinov/php2shell-patches.git v1.4-enhanced Β· 1d ago

php2shell (CVE-2026-109618/CVE-2026-109619) emergency patches for old PHP 5.6/7.x/8.0/8.1 β€” official + community backports, enhanced universal patch keeping file uploads & progress bars. For OpenCart, WordPress, HestiaCP/VestaCP legacy servers. EOL PHP RCE fix.

β€”
stars, 24h
+79
stars, 7 days Β· #2,687
+79
stars, 30 days Β· #8,919
79
β˜… total Β· +79% this week
8
forks Β· 3 open issues

Star history starts 2026-10-23; the chart appears after the second daily snapshot.

LanguageShell
Licenseβ€”
Created2026-10-21 (2d ago)
Last push1d ago
Watchers1
OwnerUser

GitHub topics

Links

README excerpt
# php2shell patches β€” CVE-2026-109618 / CVE-2026-109619 for old PHP (5.6–8.1) & OpenCart / HestiaCP
Emergency backports and hardening for **CVE-2026-109618** and **CVE-2026-109619**
("php2shell") β€” two critical unauthenticated RCE vulnerabilities in PHP,
CVSS v4.0 **9.2**. Fixed upstream 21 Oct 2026 (PHP 8.5.12 / 8.4.27 / 8.3.36 /
8.2.35). **PHP 5.6, 7.x, 8.0, 8.1 are EOL and get no official fix** β€” this
repo packages EOL backports (official + community) plus emergency hardening
for legacy stacks: **OpenCart, WordPress, Drupal, Joomla, Magento**, any
HestiaCP / VestaCP / cPanel host still running old PHP.
> **There is no complete mitigation. Updating to a fixed release (or applying
> a real patch below) is the only safe choice.** Hardening alone only blocks
> known attack paths and buys time.
---
## Two patch flavors β€” pick your trade-off
| | **minimal** (official PHP-group) | **enhanced-universal** (community) |
|---|---|---|
| Fixes CVE-2026-109618 (OOM β†’ RCE) | βœ… | βœ… |
| Fixes CVE-2026-109619 (upload_progress UAF) | βœ… by **disabling** upload_progress | βœ… by **fixing the root cause** (counters as `zend_long`, no dangling `zval*`) |
| `multipart/form-data` file uploads | βœ… work | βœ… work |
| Session upload **progress bar** | ❌ disabled | βœ… **still works** |
| Blocks session-fixation via POST body | ❌ | βœ… (PR #22113) |
| Sanitizes filename in session file (LFI / handler-mismatch) | ❌ | βœ… |
| Resets `PS(serializer)` between FPM requests | ❌ | βœ… |
| Officially blessed by PHP Group | βœ… (7.4/8.0/8.1 branches) | ❌ (community, but combines official OOM fix + root-cause UAF fix) |
**Rule of thumb:**
- Want the safest, most conservative fix and don't care about upload
 progress bars β†’ **minimal**.
- Need working forms / progress bars (e.g. OpenCart admin product forms,
 large file uploads) and want the extra fixation/filename/serializer
 fixes β†’ **enhanced-universal**.
Both keep normal `multipart/form-data` POST parsing intact β€” product forms,
image uploads, category edits, etc. all continue to work. The only functional
difference is whether the optional session-based upload-progress tracker
stays enabled.
---
## Which fix do you need?
| Your PHP | Official fix? | What to do |
|---|---|---|
| 8.5.x The enhanced patch does **not** close the `var_destroy`
> unserialize UAF (Chain B in ikow's research) β€” it is only reachable if
> the application exposes `unserialize()` to attacker data. Update to a
> fixed PHP release to close that path completely.
---
## How to apply
### A. Supported branch (8.2–8.5) β€” just update
 [code] 
### B. PHP 7.0 / 7.1 / 7.2 / 7.3 / 7.4 / 8.0 / 8.1 β€” build patched
 [code] 
Then switch HestiaCP FPM pools / templates to the new binary, or install
alongside system PHP and migrate domains one at a time.
**Run `make test` before production.**
### B2. In-place swap over the distro PHP (drop-in replacement)
Replacing the distro binaries themselves (`/usr/bin/phpX.Y`,
`/usr/sbin/php-fpmX.Y`, `/usr/bin/php-cgiX.Y` while keeping the packaged