Exploit databaseDownload repository ZIP
GH-2f080b5a280b84930522260d702db8b0
sajjadh47/php2shell-php
Sources for CVE-2026-109618
412 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files3
sajjadh47/php2shell-phpRevision b0aa5aec1c9b
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
src/Detection/VersionCheck.php
PHP · 768 bytes<?php
declare(strict_types=1);
namespace Php2Shell\Detection;
final class VersionCheck
{
/** @var array<string,int> branch => first fixed patch */
private const FIXED_VERSIONS = [
'8.2' => 35,
'8.3' => 36,
'8.4' => 27,
'8.5' => 12,
];
public static function against(string $poweredBy): ?string
{
if (!preg_match('#PHP/(\d+)\.(\d+)\.(\d+)#', $poweredBy, $m)) {
return null;
}
[$major, $minor, $patch] = [(int) $m[1], (int) $m[2], (int) $m[3]];
if ($major < 8) {
return 'VULNERABLE';
}
if ($major === 8 && $minor < 2) {
return 'VULNERABLE';
}
$branch = "{$major}.{$minor}";
$fixed = self::FIXED_VERSIONS[$branch] ?? null;
if ($fixed === null) {
return null;
}
return $patch >= $fixed ? 'FIXED' : 'VULNERABLE';
}
}