FAIR quantitative risk analysis · CVE-2026-109618 / CVE-2026-109619 · 2026-10-21

php2shell FAIR Risk Model

A FAIR (Factor Analysis of Information Risk) model of PHP2Shell, the two critical PHP RCEs disclosed on Oct 21 (out-of-memory corruption and stale global state; fixed in 8.2.35, 8.3.36, 8.4.27, 8.5.12), built on the incident in a widely shared post about one company's emergency patch day. The company is a stand-in for a typical mid-size estate. Every number below is an editable estimate, simulated 20,000 times, so the output is a range of yearly losses, never a single figure.

Asset
Internet-reachable PHP hosts, including legacy 5.x boxes nobody owns
Threat community
Opportunistic sprayers using the public exploit toolkit
Effect
Code execution: payroll data exposure and warehouse shipping outage
Decision
Patch now with downtime, or wait for the weekend?

The answer for Finance

Each scenario's annualized loss exposure (ALE): the mean yearly loss across the simulation, with the 10th to 90th percentile range under it.

Running simulation…

Loss exceedance

The chance that a year's losses exceed a given amount. Curves further right and higher mean more risk. The dashed line is the one-time cost to find and patch everything.

Range of yearly loss per scenario: bar is the 10th to 90th percentile, dot is the median, tick is the mean. Log scale.

The FAIR factor tree

How each scenario's risk breaks down. Loss event frequency is how often an attack succeeds; loss magnitude is what each success costs. Values are simulation means.

Cost of waiting

Finance's question from the post. Attacks spike right after a public exploit, so each day of delay in the first weeks carries more than an average day's risk. Move the sliders to compare.

What the incident tells the model

Each detail in the post maps to one FAIR factor and moves one estimate.

In the postFAIR factorEffect on the estimate
Inventory said 12 PHP servers; the real count was unknownContact frequencyWide threat-event range; unknown hosts are exposed and unwatched
A PHP 5.6 box and a PHP 5.4 box with 4,512 days of uptimeResistance strengthNo vendor fix exists for 5.x, so these stay vulnerable after patch day (Scenario B)
The legacy box nobody may touch runs payroll exportsSecondary lossA compromise exposes employee PII: notification, legal and regulatory cost
Blocking the oldest box stops warehouse shipping labelsPrimary loss: productivityAn outage or rebuild halts fulfilment; also blocks the obvious fix
The documented owner left in 2019Control strengthNo one to approve changes, so remediation is slow
Marketing kept the campaign site up for another hourExposure windowModelled in the cost-of-waiting calculator
Patching took 4 hours; finding the PHP took 11Response costThe dashed reference line on the loss-exceedance chart

Assumptions

Calibrated ranges: minimum, most likely, maximum, sampled as PERT distributions. Edit any value and re-run. These are illustrative; replace them with your organisation's figures.

FactorMinMost likelyMaxBasis

Shared across scenarios: one-time response cost of finding and patching (15 people × 15 hours × $120, plus an hour of campaign-site downtime) is estimated at $25k / $35k / $60k.

Evidence behind the estimates

InputEvidenceConfidence
Vulnerability (exploit success)The PHP project confirmed both CVEs (GHSA-w8hw-w9fx-j79w, GHSA-6wmf-4rv5-p3rp) and validated unauthenticated RCE against Apache mod_php with default limits. Wiz showed RCE on current WordPress, Drupal and Joomla images. Per-attempt success stays modest: more workers and unrelated traffic raise the attempts needed, and FPM has no complete public exploit.medium · vendor-confirmed
Threat event frequencyOur honeypot runs a PHP lure and tags every exploit attempt (cve_hunt). Its first attempt arrived 37 minutes after the advisory; 19 attempts from 2 sources on disclosure day, against 302 ordinary .php requests. Re-calibrate this range from the tracker's time-to-exploit as data arrives.medium · live data
Legacy 5.x exposureWiz reports affected code back to PHP 5.4; NVD lists only 8.2 to 8.5. PHP 5.x and 7.x are end-of-life, so no fix will ship. Only configuration and network controls apply.high
Loss magnitudeIndustry ranges for incident response, rebuild, a fulfilment outage, and a payroll-PII notification event at a mid-size company.medium · generic

Controls, ranked by risk removed per dollar

  1. Update to PHP 8.2.35, 8.3.36, 8.4.27 or 8.5.12. The vendor calls this the only complete mitigation. Restart every worker afterwards.
  2. Where you cannot update, enforce memory_limit=-1 administratively and restart workers. It removes the predictable limit the confirmed exploit needs. Not complete: a failed mmap() can still reach the bad path, and RLIMIT_AS / RLIMIT_DATA make it worse.
  3. Bound multipart at the frontend: decoded body size, parts, headers per part, uploads, input nesting. Block multipart outright where an app does not take uploads.
  4. Pull the end-of-life boxes off the internet: allow only the warehouse VLAN and the payroll consumer. Cuts Contact frequency by orders of magnitude without stopping label printing.
  5. Remove early INI diagnostics: deprecated or invalid php_value settings in .htaccess (mod_php) and PHP_VALUE passed by the frontend (FPM) are the confirmed trigger for CVE-2026-109619.
  6. Move payroll exports off the legacy box, or encrypt them at rest. Cuts Secondary loss, the largest part of the tail.
  7. Scan the network for PHP, assign owners, and run the hunts. The write-up has six hunts with Splunk and KQL queries: oversized multipart, the producer-then-consumer pair, memory-exhaustion and crash logs, web servers spawning shells, PHP inventory, and script files written to the web root.

Scenario C models controls 2 to 4 together on the legacy hosts, which cannot take control 1. The gap between B and C is the value of doing them this week.