Released

Howdah 1.7.1 is released — Layer 1 (request-shape limits), Layer 2 (input inspection, log-only), Layer 3 (sink hardening, log-only) and Layer 4 (after-breach behaviour, log-first). Howdah starts in detect mode: the critical limits block, everything else only logs. Read the coverage table for exactly what has been tested on your PHP version before you switch rules to block.

Open source · defensive · in-process · PHP 5.4 to 8.6

Hardening that loads inside PHP — even on the end-of-life versions most tools dropped.

Howdah is a Rust extension that runs in the PHP worker, so it sees a request as PHP parses it, before any of your code runs. That is the only place you can refuse an upload-part flood — the shape of the PHP2Shell attack — before it exhausts memory. It installs with one extension= line and runs on PHP 5.4 through 8.6, including the EOL branches that will never get the official fix.

No agent, no sidecar, no telemetry, no cloud. Four layers, log-first by default: it recognizes and refuses abusive requests on the versions tested in the coverage table — and nothing else.

Why Howdah is different

  • Inside PHP, not in front of it

    Howdah runs in the PHP worker and counts upload parts and input variables as PHP reads them, so it can refuse a flood early. A network WAF or a PHP-level prepend only sees the request after PHP has already parsed it — too late for the PHP2Shell shape.

  • Still runs on end-of-life PHP

    One of the very few maintained in-process hardening extensions that still loads on PHP 5.x and every 7.x. In August 2026, W3Techs counted PHP 5 and 7 on over a third of the PHP sites it measured (8.0% and 29.4%). Most hardening tools require 7.0 or newer.

  • No agent, no telemetry, no cloud

    One extension= line in php.ini. Nothing phones home, nothing to host, no SaaS account, no API key. Dual-licensed MIT or Apache-2.0.

  • Log-first and honest

    Four layers that detect and log by default; you turn on blocking when you are ready. Every “blocked” claim is backed by the public coverage table, and releases are signed (and, from 1.5.0, SLSA-attested).

What is Howdah, and why the name?

Howdah is a native extension for PHP. When a web request arrives, PHP starts parsing it before any of your code runs. Howdah watches that parsing step and refuses requests that are built to exhaust memory, while PHP is still working through them.

Its protection grew one layer at a time: request-shape limits in 1.0, input inspection in 1.1, sink hardening in 1.2 and 1.3, after-breach monitoring in 1.4, and scoped per-rule exceptions, structured logging and signed, SLSA-attested Docker builds in 1.5. Version 1.6 closes PHP2Shell itself: request-parsing limits that stop the amplifying shapes before PHP runs out of memory, and an out-of-memory backstop that exits the worker cleanly if it ever does. Run against a vulnerable PHP build with Howdah active, the exploit does not land. Version 1.7 adds a wave of new detections across every layer: a php-cgi argument-injection signature, an include/open wrapper-scheme firewall, XXE flag-awareness, Layer 4 delete and upload-write guards, and two opt-in additions, SSRF hardening and a worker recycle after a poisoning-class fatal. Most protection still logs first, so you can watch what it would do before you let it act. The exceptions that block by default are the critical Layer-1 limits and a few high-confidence checks: the php-cgi signature, the wrapper firewall, XXE, and the Layer 4 delete and upload-write guards. The four layers are below.

It is not a replacement for patching. Upgrade PHP when you can. Use Howdah when you cannot, or until you can.

How it works: four layers

Howdah's protection is organised in four layers. Version 1.0 delivered Layer 1; version 1.1 added Layer 2; version 1.2 added Layer 3, extended in 1.3; version 1.4 added Layer 4. Layer 2 detects and logs SQL injection, path traversal and command/code injection in request values; Layer 3 guards dangerous sinks (command execution, unserialize, include, eval, and in 1.3 phar:// and SSRF); Layer 4 watches what PHP does after a breach (PHP run from upload directories, unexpected binaries and outbound hosts, .php writes). None of the three blocks by default.

Where Howdah runs A request passes a network WAF, then enters the PHP worker, where PHP parses it and runs your script. Howdah's four layers run inside the worker; a network WAF or a PHP-level prepend only see the request after PHP has parsed it. Request Network WAF raw bytes, before PHP PHP worker process Howdah runs in here PHP parses the request your PHP script runs Layer 1 Layer 2 Layer 3 Layer 4 auto_prepend_file starts here — after parsing
A network WAF or a PHP-level prepend only sees a request after PHP has parsed it. Howdah runs inside the worker, so Layer 1 counts upload parts as PHP reads them and refuses a flood before it exhausts memory — then Layers 2–4 watch the request and the code as they run.
  1. Layer 1: Request parsing Active in 1.0

    Upload/multipart floods (the PHP2Shell shape), input-variable floods and deeply nested arrays — refused while PHP parses the request. Too many or oversized headers are logged, and refused in block mode.

  2. Layer 2: Request inspection Active in 1.1 · log-only

    Content inspection of decoded GET/POST/cookie/path values for SQL injection, path traversal and command/code injection. These detect and log by default; the php-cgi argument-injection check blocks by default.

  3. Layer 3: Runtime checks Active in 1.2 · log-only

    Sink hardening: guards command execution, unserialize, include and eval with a flat allowlist policy, plus phar:// and an SSRF egress guard (both off by default, new in 1.3). Most sinks detect and log by default; XXE and the include/open wrapper firewall block by default.

  4. Layer 4: After a breach Active in 1.4 · log-only

    Watches PHP run from upload directories, unexpected binaries, unexpected outbound hosts and .php writes. Its list-driven facets detect and log and need their lists set; the delete and upload-write file guards block by default.

A request enters at Layer 1. Because Howdah runs inside PHP's own request handling, Layer 1 can count upload parts and input variables as PHP reads them and stop the request early — something a PHP-level script or a network box cannot do (see the PHP2Shell story below).

Layer 1 — what Howdah enforces

These are the Layer-1 default limits. A request that crosses a limit has the offending data dropped and is logged; in block mode (or for a Critical rule in any mode) it is also refused with HTTP 403/413 and a request ID that matches the log line. Every limit is configurable in a TOML file; the config editor builds and validates one in the browser. Numbers below are the shipped defaults.

Multipart upload limits

Multipart upload default limits
LimitDefaultStops
max_parts 2000Floods of form-field parts
max_files 200File-part floods (the PHP2Shell shape)
max_filename_bytes 512Oversized filenames
max_field_name_bytes 1024Oversized field names
max_parse_memory_bytes 256 MiBTotal body Howdah will process

Enforced while PHP parses the body, before per-part memory is allocated — the 403/413 lands before your script runs. Since 1.6 a raw-body scanner enforces max_part_headers and max_part_header_bytes on every part header (earlier only the Content-Disposition header reached the extension).

Input-shape & request-header limits

Input-shape and request-header default limits
LimitDefaultStops
max_input_vars 2000Variable / hash-collision floods
max_input_nesting_depth 64Deeply nested arrays
max_input_key_bytes 1024Oversized variable names / keys
max_request_headers 200Request-header floods
max_request_header_bytes 16 KiBOversized header lines

Honest caveat: the input-shape limits drop the offending variable (bounding the symbol table), log it, and refuse the request before your script runs. The request-header limits drop nothing: they log, and when the script builds $_SERVER itself and Layer 2 is not armed, the 403 is set at request shutdown, after the script; there the log line is the signal. See enforcement timing.

Modes & severity. Critical rules (the unambiguous resource-exhaustion shapes) block even in detect mode; Standard rules log in detect and block only in block mode. This is why a “start in detect” rollout still refuses the critical resource-exhaustion shapes while you watch everything else. (Run against a vulnerable PHP build with Howdah active, the PHP2Shell exploit does not land — see the PHP2Shell explainer and the coverage page.) Full directive and rule reference: Configuration.

Layer 2 — what Howdah inspects 1.1 · log-only

Layer 1 limits the shape of a request. Layer 2 looks at the content of decoded request values: GET query parameters, POST fields, cookies and the URL path, through the same request hook Layer 1 uses. The content classes detect and log by default; the php-cgi argument-injection check blocks by default.

Three classes of pattern

Layer 2 detection classes with illustrative shapes
ClassRule nameExample shape
SQL injection sql_injection' OR 1=1 --
Path traversal path_traversal../../etc/passwd
Command / code injection command_injection; cat /etc/passwd

The examples illustrate each shape; they are not a complete list of what is matched. Cross-site scripting (XSS) is not covered.

How detection works

A small, high-confidence signature scan that runs in linear time, so there is no catastrophic backtracking. Work is bounded per value and per request, so the scan itself cannot be turned into a denial of service; values past a budget are not scanned.

Log-first, on purpose

Layer 2 has its own inspect.mode, which defaults to detect (log only). It is independent of the global howdah.mode: setting howdah.mode = block does not arm it. To block, an operator sets inspect.mode, or one class, to block explicitly.

What a detection looks like

One JSON log line carrying the rule class, the source (get, post, cookie or path) and the variable name. The matched value is never logged.

{"action":"log","client_ip":"203.0.113.7","layer":2,"method":"GET","reason":"sql_injection pattern in get variable 'q'","request_id":"1a2d239820e2f06bc","rule":"sql_injection","schema":2,"ts":"1792864974146","uri":"/index.php","version":"1.7.0"}

From a lab run (PHP 7.4, php-fpm, request /index.php?q=' OR 1=1 --). The query string is stripped from the logged uri; for a path detection the path itself is the logged URI. Every field: event log reference.

Honest caveat. Signature inspection is best-effort and can be bypassed, which is exactly why Layer 2 logs rather than blocks. Use the log to see what is happening, and fix the application (parameterized queries, path normalization, no shell calls on user input). To configure or enable it, see the [inspect] section of the configuration reference.

Layer 3 — the sinks Howdah guards since 1.2 · log-only

Layer 2 looks at request values. Layer 3 looks at what the application does with them: it guards dangerous PHP functions, called sinks, with a flat allowlist policy in the style of Snuffleupagus. Howdah guards six core sinks (three of them off by default), the include/open wrapper firewall, and seven legacy sinks added in 1.5. Most detect and log by default; XXE and the wrapper firewall block by default. This is sink hardening, not XSS or output inspection.

The six core sinks

Layer 3 core sinks
SinkFunctionsDefault
Command execution system, exec, shell_exec, passthru, popen, proc_openLogs when not allowlisted
Unserialize unserializeOff; opt in to log
Include include, requireInert until allow_paths is set
Eval evalLogs when reached
Phar phar:// via stream functions and includeOff; opt in per sink
SSRF file_get_contents, fopen, get_headers, fsockopen, stream_socket_client, curlOff; opt in per sink

Known limitation: proc_open with an array command (PHP 7.4+) is not inspected.

Seven legacy sinks (new in 1.5), log-first except xxe: mail_injection, preg_eval (PHP 5.x), create_function and assert_string (5.x/7.x), dangerous_callback, xxe (enforced by default, but only when a dangerous libxml flag meets an external entity; with [sinks.xml] external_entities), and tls_verify (detect-only). See the configuration reference for each one's PHP-version applicability and defaults.

Coverage by PHP version

Layer 3 sink coverage by PHP version: every cell is detect and block
SinkPHP 5.4–5.6PHP 7.0–7.4PHP 8.0–8.5
Command execution detect and blockdetect and blockdetect and block
unserialize (off by default) detect and blockdetect and blockdetect and block
include / require detect and block, note 1detect and blockdetect and block
eval detect and blockdetect and blockdetect and block
phar:// (off by default) detect and block, note 2detect and block, note 2detect and block, note 3
SSRF (off by default) detect and blockdetect and blockdetect and block

= detect and block (when armed). 1 Checked at compile time: a file served from a warm opcache is not re-inspected (on PHP 7.0+ only with hook = "compile"). 2 Includes phar metadata deserialization through the stream wrapper. 3 Detection and denial of phar:// use only; no deserialization claim.

Verified on PHP 5.4, 5.6, 7.4, 8.3 and 8.5; other minors build and are expected to work but are not independently verified. A debug-build leak review is pending. Blocking an include or eval stops it running and the script continues. PHP 5.x include is checked at compile time, so a file served from a warm opcache is not re-inspected (eval is unaffected; the 7.0+ opcode handler is not affected by opcache, but with [sinks] hook = "compile" PHP 7.0+ has the same warm-opcache limit). Phar: on PHP 5.x/7.x this covers metadata deserialization via the stream wrapper; on 8.x it is detection and denial of phar:// use only. The direct Phar API (new Phar, PharData, Phar::loadPhar, Phar::mapPhar, Phar::getMetadata) is not covered. SSRF is best-effort, resolve-at-check-time detection, not a connection-time boundary: DNS rebinding, redirects, curl_multi_*, CURLOPT_RESOLVE/CONNECT_TO and a non-string or absent CURLOPT_URL bypass it, and copy, file, readfile, SoapClient, DOMDocument::load* and simplexml_load_file are not hooked. It adds a DNS lookup per distinct outbound host with no timeout. More detail on the coverage page.

Log-first, on purpose

Layer 3 has its own sinks.mode, which defaults to detect (log only). It is independent of the global howdah.mode: setting howdah.mode = block does not arm sinks. Every active sink except tls_verify (detect-only) can block, and only when an operator sets that sink to block explicitly, after setting its allowlist. The 1.3 phar and ssrf sinks are off by default and only an explicit per-sink mode arms them.

The argument is never logged

An event records the sink and the function name (plus the class name for unserialize). The command line and the serialized payload are never written to the log.

Honest caveat. A flat allowlist policy is best-effort virtual patching and can be bypassed, which is why Layer 3 logs rather than blocks. Use the log to learn what your application really calls, then fix the application (no shell calls on user input, no unserialize of untrusted data). To configure it, see the [sinks] section of the configuration reference.

Layer 4 — what Howdah watches after a breach 1.4 · log-only

Layers 1 to 3 try to stop the attack. Layer 4 assumes something got through, such as a webshell uploaded into a writable directory, and watches what PHP then does. Its four list-driven facets detect and log and do nothing until you set their lists; the delete and upload-write file guards block by default. Events name the script that made the call, so a finding points at the webshell even when a legitimate script required it.

Four things it watches

Layer 4 facets in 1.4
FacetSettingFlags
Execution origin deny_exec_dirsPHP run from a denied directory, as the requested script or required by another
Expected binaries allow_exec_binariesexec, system, popen, proc_open, shell_exec, passthru to a program not on the list
Expected egress allow_egress_hostsAn outbound connection to a host not on the list
.php writes deny_php_writesA PHP file written into a denied directory, or from a script that lives in one

Lab-verified on PHP 5.4, 5.6, 7.4, 8.3, 8.4 and 8.5: 27 checks per version, covering each facet in detect and block, that a framework-style view write and a plain read of a .php file are not flagged, and that the default configuration is inert. Other minors are not independently verified. More detail on the coverage page.

Hybrid policy: you set it, Howdah helps you find it

You supply the allowlists (allow_exec_binaries, allow_egress_hosts) and the denied directories. To learn what your application really does, set observe = true: Howdah logs each would-be finding as a proposed line, such as the binary that was run or the host contacted, which you can fold into the lists. Observe never blocks and never edits your config, and its output needs your review.

Log-first, on purpose

Layer 4 has its own behavior.mode, which defaults to detect (log only). It is independent of the global howdah.mode: setting howdah.mode = block does not arm it. Every list ships empty, so a fresh install blocks nothing.

Honest caveat. Howdah only sees what PHP itself does: a process PHP launches and then detaches, a reverse shell that forks away, or a dropper that never ran through PHP is invisible to Layer 4. For deny_exec_dirs, the requested-script case does not depend on opcache, but the required-file case is checked at first compile and is best-effort, so a file served from a warm opcache may not be re-checked. Allowlists are best-effort and can be bypassed. The .php-write facet is scoped by origin and can still flag frameworks that compile templates into a denied directory, so scope it before you use block. Observe only proposes. To configure it, see the [behavior] section of the configuration reference.

The PHP2Shell story, plainly told

On 21 October 2026 the PHP project patched two linked flaws, CVE-2026-109618 and CVE-2026-109619, which security researchers named PHP2Shell. As the official advisories describe it, a crafted multipart/form-data request drives PHP's parser to run out of memory while it reads the body — a body well under the default 8 MB limit can still hold thousands of tiny parts, deeply nested names, or a part with a flood of headers. PHP handles running out of memory with a longjmp that can leave the half-built request in a corrupt state, which the advisories say can be turned into remote code execution without logging in.

The official fix ships for PHP 8.2 and newer; older branches get no official patch. PHP 8.1 and older still run a very large share of the web.

What we verified

We ran the PHP2Shell exploit against a vulnerable PHP build with Howdah loaded in its default configuration, and it did not land. Howdah 1.6 added the two protections this needs: request-parsing limits that refuse the amplifying shapes before PHP runs out of memory, and an out-of-memory backstop that exits the worker cleanly if it ever does.

We also measured the shape directly: PHP's own max_input_vars and max_file_uploads keep the flood small on a default box; with those caps raised, the same shape used 127 to 173 MB against a 128 MB limit, and Howdah's default limits refuse it long before that. See the coverage table, the explainer and the measurements.

Why only a PHP extension can stop it

  • PHP reads the whole upload into $_FILES and $_POST before any PHP script runs, so a firewall written in PHP (for example via auto_prepend_file) is too late.
  • opcache.preload runs once when the server starts, never per request.
  • A network firewall sees bytes on the wire, not how PHP will interpret them.
  • A compiled extension runs inside PHP's own upload parser, so it can count parts as PHP reads them and stop the request early.

The incident details above come from public reports. We are checking them against the official advisories (GHSA-w8hw-w9fx-j79w, GHSA-6wmf-4rv5-p3rp, php.net) and will correct this page if they differ.

Version support: PHP 5.4 to 8.6

Howdah ships one build per PHP minor version. A version marked Tested has a passing lab result (matrix run 2026-10-23 on Howdah 1.0.0); a version marked Expected shares a generation's code path with a tested version but has not been independently run, so it is not claimed as a test result. The coverage page has the full per-server-type detail.

  • 5.4.16 Tested
  • 5.5 Expected
  • 5.6.40 Tested
  • 7.0.33 Tested
  • 7.1.33 Tested
  • 7.2.34 Tested
  • 7.3.33 Tested
  • 7.4.33 Tested
  • 8.0.30 Tested
  • 8.1.34 Tested
  • 8.2.35 Tested
  • 8.3.36 Tested
  • 8.4.27 Tested
  • 8.5.12 Tested
  • 8.6 Expected

Linux x86_64 and aarch64, non-thread-safe (NTS) builds — glibc for the broadest reach and musl for Alpine. Published as signed, SLSA-attested tarballs, apt/yum packages, and Docker images. The exact per-architecture binaries are whatever the release build produced — see the install picker and the release assets.

How Howdah compares

Howdah does a narrow set of things well: request-shape limits that block, plus log-first input inspection, sink hardening and after-breach checks — all from inside PHP, on versions most tools no longer cover. It is not a general-purpose WAF. Here is where it sits among tools people reach for, as of October 2026.

How Howdah compares with other PHP protection tools, as of October 2026
ToolWhere it runsLicenseMain jobRuns on EOL PHP (5.4–8.1)?External service
Howdah Inside PHP (Rust extension)MIT OR Apache-2.0Request-shape limits (Layer 1, blocks) + log-first input inspection, sink hardening & after-breach checks (Layers 2–4)Yes — 5.4 to 8.6, including EOL branchesNone
Snuffleupagus Inside PHP (C extension)LGPLHardening: kills bug classes + virtual-patchingPHP 7.0+ (not 5.x)None
OpenRASP (Baidu) Inside the app (RASP, hooks sinks)Apache-2.0Runtime detection of SQL/file/SSRF via sink hooksPHP extension; project quiet since 2022Self-hosted management
Aikido Zen In-app agent (separate process)Open-source agent + commercial cloudHooks runtime sinks (SQLi, SSRF, path/command injection)PHP 7.2+ (not 5.x)Aikido cloud (SaaS)
ModSecurity + OWASP CRS Web-server module (Apache / Nginx)Apache-2.0Generic signature WAF at the server layerPHP-agnostic (sits in front of PHP)None
Datadog App & API Protection In-app (tracing library) + SaaSProprietary (commercial)In-app WAF / threat protection with managed rulesPer the Datadog PHP libraryDatadog cloud (paid)

Compiled October 2026 from each project's own documentation: Snuffleupagus (snuffleupagus.readthedocs.io), OpenRASP (github.com/baidu/openrasp), Aikido Zen (github.com/AikidoSec/firewall-php), ModSecurity & OWASP CRS (owasp.org / owasp-modsecurity), Datadog (docs.datadoghq.com). These tools do more than Howdah in their own areas; Howdah's point is the narrow, in-PHP, EOL-friendly niche. Found something out of date? Tell us.

Coverage: what has actually been tested

Every result is generated from the test matrix, never hand-typed. Totals: 973 checks passed, 0 failed, 33 skipped, with 0 false positives across the legitimate-upload corpus. A version is only called “Blocked” where the test for that exact version and server type passed; untested versions are marked plainly and never claimed as protected.

Read the full coverage table

Install in a minute

On Debian/Ubuntu with the apt repository (one build per PHP minor; replace 8.1 with yours). The key is pinned to this repo only:

sudo install -d -m 0755 /etc/apt/keyringscurl -fsSL https://howdah.org/key.asc | sudo tee /etc/apt/keyrings/howdah.asc >/dev/nullecho "deb [signed-by=/etc/apt/keyrings/howdah.asc] https://pkg.howdah.org/apt stable main" \  | sudo tee /etc/apt/sources.list.d/howdah.listsudo apt-get update && sudo apt-get install php8.1-howdah

On RHEL/CentOS/Alma (Remi layout) the package is php81-howdah via yum, with both package and metadata signatures enforced. Both package names, the exact .repo file, the signed-tarball path for other setups, and the verify/rollback steps are in the picker. Once it is installed, the config editor writes your howdah.ini and howdah.toml from a form and checks the TOML with the extension's own parser.

Prefer containers? Pull a ready-made image — Howdah is installed and enabled in detect mode:

docker pull ghcr.io/howdah/howdah:1.7.1-php8.3

Images cover PHP 5.6–8.5 (Debian, amd64 + arm64); an -alpine variant covers PHP 7.2–8.5 (amd64). Or use a signed, SLSA-attested tarball for any other setup — every method is in the install picker.