MIT License • CVE-2026-109618 / 109619

Neutralize php2shell at the Ingestion Tier.

An open-source runtime defense gateway engineered in modern PHP 8. Front unpatched legacy PHP 5.x/7.x workloads with a patched engine, safely swallow untrusted multipart boundaries, and relay canonical HTTP requests over local keep-alive connection pools.

Zero Handshake Overhead
Native Stream Contexts
RFC 1867 Sanitized
gateway-ingestion.log
# Incoming public exploit stream
> POST /upload.php HTTP/1.1
> Content-Type: multipart/form-data; boundary=--x
> Cookie: PHPSESSID=O:8:"Exploit":1:...
# PHP 8 Ingestion Pipeline Intercepts:
[SHIELD] PHP 8.3-FPM worker accepted connection
[IDS] Serialized object blocked in session cookie
[IDS] Neutralized CVE-2026-109618 exploit chain
[RELAY] Forwarding clean payload -> 127.0.0.1:8081
< HTTP/1.1 200 OK (Backend PHP 5.3 immune)
Implementation

Quickstart Configuration

Deploy the Nginx keep-alive pool and configure the PHP 8 gateway proxy handler.

/etc/nginx/conf.d/gateway-upstream.conf Nginx 1.20+
# Local keep-alive pool to isolated PHP 5.3 backend
upstream legacy_backend_pool {
    server 10.0.1.50:80;
    keepalive 32;
}

server {
    listen 127.0.0.1:8081;
    server_name _;

    location / {
        proxy_pass http://legacy_backend_pool;
        proxy_http_version 1.1;
        proxy_set_header Connection "";
        proxy_set_header Host $http_host;
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_buffering off;
    }
}
gateway/public/php-proxy.php PHP 8.2+
// Run IDS inspection before proxying
$ids = new GatewayIDS();
$ids->inspectRequest($_SERVER, $_GET, $_POST, $_COOKIE);

// Native stream context over persistent pool
$context = stream_context_create([
    'http' => [
        'method'  => $_SERVER['REQUEST_METHOD'],
        'header'  => $sanitizedHeaders,
        'content' => file_get_contents('php://input'),
        'timeout' => 15,
        'ignore_errors' => true,
    ]
]);

$response = file_get_contents('http://127.0.0.1:8081' . $uri, false, $context);
echo $response;
Signatures

Core Threat Mitigation Matrix

Attacks filtered by the open-source gateway before traffic reaches the legacy application:

Vulnerability / Threat Vector Pattern / Signature Gateway Action
CVE-2026-109618 (php2shell) Cookie: PHPSESSID, $_POST O:\d+:", a:\d+:\{ 403 Forbidden
CVE-2026-109619 (Session OOM) Multipart boundaries PHP_SESSION_UPLOAD_PROGRESS Tokens Stripped
Host Header Injection Host: header Non-RFC 1123 characters (quotes, spaces) 403 Forbidden
Dangerous PHP Wrappers GET / POST parameters php://, phar://, data:// 403 Forbidden
Null Byte Poisoning File upload paths, URIs %00, \x00 403 Forbidden
Directory Traversal Query params, paths ../../../../, %2e%2e/ 403 Forbidden
Looking for PHP Shield Enterprise?

Need Managed Patching, Redis Clustering & Honeypot Traps?

While this core engine is open-source, PHP Shield Enterprise adds proprietary honeypot traps, multi-node Redis rate limiting, client-initiated health checks, and continuous managed PHP runtime security patching.