On October 21, 2026, the PHP project released fixes for two critical vulnerabilities, CVE-2026-109618 and CVE-2026-109619, commonly referred to as php2shell. Both received a CVSS score of 9.2 out of 10. Details of the issues became public ahead of the planned disclosure, and exploit code for at least one of them began circulating before the patches were available.

A third related vulnerability, CVE-2026-115560, was disclosed shortly afterward on October 23.

What the Vulnerabilities Involve

Both primary issues relate to how PHP handles memory cleanup when a request fails or encounters an error.

VulnerabilityDescription
CVE-2026-109618A request forces PHP to its memory limit at a critical point. PHP stops midway, leaves certain data in an incomplete state, and later treats that data as fully constructed.
CVE-2026-109619An error interrupts a request, causing PHP to retain a reference to memory that has already been freed. A subsequent request handled by the same process may then access that leftover memory.
CVE-2026-115560Under an unusual combination of settings, session upload progress can be abused when an application switches the session serialize handler at runtime, potentially allowing remote code execution.

These flaws affect every PHP version prior to 8.5.12, 8.4.27, 8.3.36, and 8.2.35, reaching back at least to PHP 5.4. This includes the vast majority of PHP-based websites and applications, such as those built with WordPress, WooCommerce, Magento, and similar platforms.

Because the vulnerabilities exist in the PHP runtime itself, updating a content management system, themes, or plugins does not resolve them. Only a patched version of PHP provides a complete fix.

Recommended Mitigations and Actions

For environments where PHP is managed by a hosting provider or platform operator, the recommended approach is to ensure the platform has applied the official PHP updates (versions 8.5.12, 8.4.27, 8.3.36, or 8.2.35) and any accompanying protective measures.

For servers where PHP is self-managed (for example, on a virtual private server):

  1. Update PHP immediately to one of the patched versions listed above. This is the only complete remedy.
  2. If an immediate update is not possible, disable the session.upload_progress feature by setting session.upload_progress.enabled = Off in php.ini or the relevant PHP-FPM pool configuration, then restart all PHP workers. Note that setting this value via ini_set() in application code is ineffective. Disabling this option mitigates one of the primary vulnerabilities and also addresses CVE-2026-115560 until the corresponding PHP fix is applied.
  3. Reduce unnecessary risk by disabling file uploads that are not required and by keeping upload size limits reasonably constrained. These steps lower exposure but do not replace the need for a PHP update.

Additional protective measures commonly applied at the infrastructure level include firewall rules that detect and block known exploit patterns, as well as rejection of malformed upload requests that PHP might misinterpret.

Why Updating PHP Matters

Temporary defenses such as firewall rules or feature disables can block currently known attack patterns. However, attackers frequently adapt their requests to evade detection. The official PHP patches correct the underlying memory-handling defects, providing a durable solution. Combining the update with defensive controls offers the strongest protection.

Additional Considerations

PHP versions 8.1 and older no longer receive security updates from the PHP project. Sites remaining on these versions continue to face elevated risk from other known issues in addition to php2shell. PHP 8.2 is scheduled to reach end-of-security-support on December 31, 2026. Migrating to a currently supported release (preferably 8.3 or newer) is therefore advisable once compatibility with applications, themes, and plugins has been verified.

Continuing to monitor traffic and update defensive rules as new attack variations appear remains good practice while the ecosystem fully absorbs the patches.

By applying the official PHP updates and following the temporary mitigations outlined above where needed, administrators can effectively protect systems against the php2shell family of vulnerabilities.

Special Handling for VPS

On VPS environments, PHP is typically managed by the user. Therefore, platform-level protections (such as automatic firewall rules or provider-managed PHP updates) do not apply. Actions must be taken manually.

Here are the recommended steps:

1. Update PHP to a Patched Version (Primary Solution)

Update PHP immediately to one of the following versions:

  • 8.5.12
  • 8.4.27
  • 8.3.36
  • 8.2.35

This is the only complete fix for the php2shell vulnerabilities (CVE-2026-109618, CVE-2026-109619, and CVE-2026-115560).

After updating, restart all PHP worker processes (PHP-FPM, Apache with mod_php, or related services).

2. If You Cannot Update PHP Immediately

Disable the session.upload_progress feature as follows:

  • Open your php.ini file or the relevant PHP-FPM pool configuration file.
  • Add or change the following line:session.upload_progress.enabled = Off
  • Save the changes, then restart all PHP workers.

Important note:

  • Setting this value via ini_set() in application code will not work.
  • This step closes one of the main attack paths and also protects against CVE-2026-115560 while waiting for the official PHP update.

3. Additional Risk Reduction Steps

  • Disable file upload features that are not required.
  • Keep upload size limits reasonable.
  • Ensure that only directories that truly need write access have write permissions.

These steps reduce the chance of exploitation but do not replace the PHP update.

Priority Summary for VPS

  1. Highest priority: Update PHP to a patched version.
  2. Temporary measure: Disable session.upload_progress.enabled.
  3. Supporting measures: Restrict uploads and monitor server logs.

By following the steps above, VPS systems can be effectively protected against the php2shell vulnerabilities.


The above article is re-written in Indonesian below /
Artikel di atas ditulis ulang dalam Bahasa Indonesia di bawah ini:

Melindungi dari Kerentanan PHP “php2shell”

Pada 21 Oktober 2026, proyek PHP merilis perbaikan untuk dua kerentanan kritis, CVE-2026-109618 dan CVE-2026-109619, yang umum disebut sebagai php2shell. Keduanya mendapat skor CVSS 9,2 dari 10. Detail masalah tersebut menjadi publik sebelum pengungkapan yang direncanakan, dan kode eksploitasi untuk setidaknya satu di antaranya mulai beredar sebelum patch tersedia.

Kerentanan terkait ketiga, CVE-2026-115560, diungkapkan tidak lama kemudian pada 23 Oktober.

Apa yang Terlibat dalam Kerentanan Ini

Kedua masalah utama berkaitan dengan cara PHP menangani pembersihan memori ketika sebuah permintaan gagal atau mengalami kesalahan.

KerentananDeskripsi
CVE-2026-109618Sebuah permintaan memaksa PHP mencapai batas memorinya pada titik kritis. PHP berhenti di tengah jalan, meninggalkan data tertentu dalam keadaan tidak lengkap, dan kemudian memperlakukan data tersebut seolah-olah sudah sepenuhnya dibangun.
CVE-2026-109619Sebuah kesalahan menginterupsi permintaan, menyebabkan PHP menahan referensi ke memori yang sudah dibebaskan. Permintaan berikutnya yang ditangani oleh proses yang sama kemudian dapat mengakses memori sisa tersebut.
CVE-2026-115560Dalam kombinasi pengaturan yang tidak biasa, proses pengunggahan sesi dapat disalahgunakan ketika aplikasi mengganti penangan serialisasi sesi saat runtime, yang berpotensi memungkinkan eksekusi kode jarak jauh.

Kerentanan ini memengaruhi setiap versi PHP sebelum 8.5.12, 8.4.27, 8.3.36, dan 8.2.35, yang menjangkau setidaknya hingga PHP 5.4. Ini mencakup sebagian besar situs web dan aplikasi berbasis PHP, seperti yang dibangun dengan WordPress, WooCommerce, Magento, dan platform serupa.

Karena kerentanan berada di dalam runtime PHP itu sendiri, memperbarui sistem manajemen konten, tema, atau plugin tidak akan menyelesaikannya. Hanya versi PHP yang sudah dipatch yang memberikan perbaikan lengkap.

Mitigasi dan Tindakan yang Direkomendasikan

Untuk lingkungan di mana PHP dikelola oleh penyedia hosting atau operator platform, pendekatan yang direkomendasikan adalah memastikan platform telah menerapkan pembaruan PHP resmi (versi 8.5.12, 8.4.27, 8.3.36, atau 8.2.35) beserta langkah-langkah perlindungan terkait.

Untuk server di mana PHP dikelola sendiri (misalnya pada virtual private server):

  1. Perbarui PHP segera ke salah satu versi yang sudah dipatch di atas. Ini adalah satu-satunya perbaikan yang lengkap.
  2. Jika pembaruan segera tidak memungkinkan, nonaktifkan fitur session.upload_progress dengan mengatur session.upload_progress.enabled = Off di php.ini atau konfigurasi pool PHP-FPM yang relevan, lalu restart semua worker PHP. Perhatikan bahwa mengatur nilai ini melalui ini_set() di kode aplikasi tidak efektif. Menonaktifkan opsi ini mengurangi salah satu kerentanan utama dan juga menangani CVE-2026-115560 hingga perbaikan PHP yang sesuai diterapkan.
  3. Kurangi risiko yang tidak perlu dengan menonaktifkan unggahan file yang tidak diperlukan dan menjaga batas ukuran unggahan tetap wajar. Langkah-langkah ini menurunkan paparan, tetapi tidak menggantikan kebutuhan akan pembaruan PHP.

Langkah perlindungan tambahan yang umum diterapkan di tingkat infrastruktur meliputi aturan firewall yang mendeteksi dan memblokir pola eksploitasi yang diketahui, serta penolakan terhadap permintaan unggahan yang salah format yang mungkin disalahartikan oleh PHP.

Mengapa Memperbarui PHP Itu Penting

Pertahanan sementara seperti aturan firewall atau penonaktifan fitur dapat memblokir pola serangan yang saat ini diketahui. Namun, penyerang sering menyesuaikan permintaan mereka untuk menghindari deteksi. Patch resmi PHP memperbaiki cacat penanganan memori yang mendasarinya, sehingga memberikan solusi yang tahan lama. Menggabungkan pembaruan dengan kontrol defensif menawarkan perlindungan terkuat.

Pertimbangan Tambahan

Versi PHP 8.1 dan yang lebih lama tidak lagi menerima pembaruan keamanan dari proyek PHP. Situs yang tetap menggunakan versi ini terus menghadapi risiko yang lebih tinggi dari masalah lain yang sudah diketahui selain php2shell. PHP 8.2 dijadwalkan mencapai akhir dukungan keamanan pada 31 Desember 2026. Oleh karena itu, migrasi ke rilis yang saat ini didukung (sebaiknya 8.3 atau lebih baru) disarankan setelah kompatibilitas dengan aplikasi, tema, dan plugin diverifikasi.

Terus memantau lalu lintas dan memperbarui aturan defensif seiring munculnya variasi serangan baru tetap menjadi praktik yang baik sementara ekosistem sepenuhnya menyerap patch tersebut.

Dengan menerapkan pembaruan PHP resmi dan mengikuti mitigasi sementara yang diuraikan di atas jika diperlukan, administrator dapat secara efektif melindungi sistem dari keluarga kerentanan php2shell.

Khusus VPS

Penanganan Khusus untuk VPS

Pada lingkungan VPS, PHP biasanya dikelola sendiri oleh pengguna. Oleh karena itu, perlindungan tingkat platform (seperti firewall otomatis atau pembaruan PHP yang dilakukan penyedia) tidak berlaku. Tindakan harus dilakukan secara manual.

Berikut langkah-langkah yang direkomendasikan:

1. Perbarui PHP ke Versi yang Sudah Diperbaiki (Solusi Utama)

Perbarui PHP segera ke salah satu versi berikut:

  • 8.5.12
  • 8.4.27
  • 8.3.36
  • 8.2.35

Ini adalah satu-satunya perbaikan lengkap untuk kerentanan php2shell (CVE-2026-109618, CVE-2026-109619, dan CVE-2026-115560).

Setelah memperbarui, restart semua proses PHP worker (PHP-FPM, Apache dengan mod_php, atau layanan terkait).

2. Jika Belum Bisa Memperbarui PHP Segera

Nonaktifkan fitur session.upload_progress dengan cara berikut:

  • Buka file php.ini atau file konfigurasi pool PHP-FPM Anda.
  • Tambahkan atau ubah baris berikut:session.upload_progress.enabled = Off
  • Simpan perubahan, lalu restart semua PHP worker.

Catatan penting:

  • Pengaturan melalui ini_set() di dalam kode aplikasi tidak akan berfungsi.
  • Langkah ini menutup salah satu jalur serangan utama dan juga melindungi dari CVE-2026-115560 sementara menunggu pembaruan resmi PHP.

3. Langkah Pengurangan Risiko Tambahan

  • Nonaktifkan fitur unggah file (upload) yang tidak diperlukan.
  • Batasi ukuran file unggah agar tetap wajar.
  • Pastikan hanya direktori yang benar-benar membutuhkan izin tulis yang memiliki permission write.

Langkah-langkah di atas mengurangi peluang eksploitasi, tetapi tidak menggantikan pembaruan PHP.

Ringkasan Prioritas untuk VPS

  1. Prioritas tertinggi: Perbarui PHP ke versi yang sudah dipatch.
  2. Tindakan sementara: Nonaktifkan session.upload_progress.enabled.
  3. Pendukung: Batasi upload dan pantau log server.

Dengan mengikuti langkah-langkah di atas, sistem VPS dapat dilindungi secara efektif dari kerentanan php2shell.


Leave a Reply

Your email address will not be published. Required fields are marked *