Exploit databaseDownload repository ZIP
GH-61e861224ca37d791c28f53a069b7812
ethen1212/php2shell-cve-2026-109618
Sources for CVE-2026-109618
412 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files22
ethen1212/php2shell-cve-2026-109618Revision 6adf06c58724
- ↑..Parent directory
- autostart3.php
- check_apache.php
- clean_test.sh
- cookiestart.php
- decode_test.php
- driver.py
- driver_cb.py
- driver_chain.py
- driver_oom.py
- driver_preload.py
- exp.py
- fcgi.py
- modphp_oom.py
- modphp_sweep.py
- modphp_test.sh
- preload.php
- read_session.php
- runfixed.sh
- stale_state.py
- sweep_oom.py
- worker.php
- worker_cb.php
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
env/worker.php
PHP · 2,303 bytes<?php
/* Worker script for the php2shell (CVE-2026-109619) reproduction.
* The session record is already on disk when this script starts; the
* upload-progress handler decodes it during request startup, before this
* script is compiled. */
$record = getenv('TEST_SESSION_RECORD');
$file = getenv('TEST_SESSION_FILE');
spl_autoload_register(function ($class) { echo "autoload($class)\n"; });
enum Suit: string {
case Hearts = 'H';
}
class W {
public $a = 1;
function __wakeup() { echo "W::__wakeup\n"; }
function __sleep() { echo "W::__sleep\n"; return ['a']; }
}
class U {
public $a = 2;
function __unserialize(array $d) { echo "U::__unserialize\n"; $this->a = $d['a']; }
function __serialize(): array { echo "U::__serialize\n"; return ['a' => $this->a]; }
}
class Cust implements Serializable {
public $x = 'payload';
function serialize() { return $this->x; }
function unserialize($d) { $this->x = $d; }
}
/* --- state left behind by the pre-RINIT upload progress handler --- */
echo "SESSION_IN_GLOBALS=" . var_export(array_key_exists('_SESSION', $GLOBALS), true) . "\n";
echo "SESSION_STATUS_NONE=" . var_export(session_status() === PHP_SESSION_NONE, true) . "\n";
echo "--- record after the update:\n";
$after = file_get_contents($file);
echo "RECORD_PREFIX_INTACT=" . var_export(substr($after, 0, strlen($record)) === $record, true) . "\n";
echo "PROGRESS_KEY_AT_END=" . var_export(substr($after, strlen($record), strlen('upload_progress_key|')), true) . "\n";
echo "RECORD_LEN=" . strlen($after) . "\n";
echo "--- session_start():\n";
session_start();
echo "SID=" . session_id() . "\n";
echo "W=" . (isset($_SESSION['w']) ? (is_object($_SESSION['w']) ? get_class($_SESSION['w']) : gettype($_SESSION['w'])) : 'MISSING') . "\n";
echo "U=" . (isset($_SESSION['u']) ? (is_object($_SESSION['u']) ? get_class($_SESSION['u']) : gettype($_SESSION['u'])) : 'MISSING') . "\n";
echo "C=" . (isset($_SESSION['c']) ? (is_object($_SESSION['c']) ? get_class($_SESSION['c']) : gettype($_SESSION['c'])) : 'MISSING') . "\n";
echo "E=" . (isset($_SESSION['e']) ? 'set' : 'MISSING') . "\n";
echo "M=" . (isset($_SESSION['m']) ? 'set' : 'MISSING') . "\n";
echo "PROGRESS=" . (isset($_SESSION['upload_progress_key']) ? 'set' : 'MISSING') . "\n";
session_destroy();