
PHP Emergency Security Response Lab: From Checking Your Server to Verifying the Patch · Information current as of 2026-11-08
Lab files, exercises and solutions are on GitHub; the link is in the external resources of Lesson 1.
In one line
Decide which PHP actually handles web requests → install the security update → restart and confirm the new code is running. Judging by php -v alone can give the wrong answer.
Key ideas
The incident: The PHP project gave advance notice on 2026-10-20 and released fixed versions on 2026-10-21. The two vulnerabilities (CVE-2026-109618 and CVE-2026-109619) allow remote code execution without authentication, and both were rated CVSS v4.0 9.2.
Fixed versions: 8.2.35 · 8.3.36 · 8.4.27 · 8.5.12 (8.6.0 includes the fix from RC4). For 8.1 and earlier the project releases no update, so check the packages from your distribution or long-term-support vendor.
CISA KEV: Both vulnerabilities were added to the US CISA "Known Exploited Vulnerabilities" catalog (KEV) on 2026-10-26.
CLI PHP ≠ web PHP: A server can have several PHP installations. What matters is the PHP that handles web requests.
Distribution packages keep the version number and only add the fix. That is why PHP_VERSION in the web response is still 8.3.6 after the update. You judge whether the fix is present from the package changelog (covered in detail in 2-3).
You are not done until you restart. Replacing the package does not change processes that are already running; they still hold the old code in memory.
Follow along
Preparation: start the lab server as described in lab/README.md. Each time you begin, return it to its starting state.
# Run on: your computer, in the lab/ folder
docker compose down && docker compose up -d
Every command below is run on your computer, in the lab/ folder. docker compose exec server runs it inside the server for you, which does the same job as logging in to the server and typing it there.
Step 1 — Version verdict
① CLI PHP version (V1)
# Run on: your computer (executes inside the server)
docker compose exec server php -v
The first line shows PHP 8.4.27 (cli). That is a fixed version, but it is only the PHP that runs on the command line.
② The PHP that handles web requests (V2)
# Run on: your computer (executes inside the server)
docker compose exec server curl -s | head -4
You see PHP_VERSION 8.3.6 and PHP_SAPI fpm-fcgi. The same server has two PHPs, and the web uses the 8.3 one. runtime.php is a check page for the lab. It is blocked from outside the server, and on a real service you must delete it after checking.
③ Does the package contain the fix? (first part of V3)
# Run on: your computer (executes inside the server)
docker compose exec server bash /opt/lab/tools/package-check.sh | sed -n '/PHP 8.3/,/Verdict/p'
Before the update, both CVEs show not in the changelog and Verdict: VULNERABLE (security update needed).
Step 2 — Update
# Run on: your computer (executes inside the server)
docker compose exec server bash -c "apt update && apt install -y --only-upgrade 'php8.3-*'"
To limit the blast radius, upgrade only the PHP 8.3 packages (--only-upgrade 'php8.3-*'). A full apt upgrade belongs in your regular maintenance.
The line invoke-rc.d: policy-rc.d denied execution of restart. at the end of the output means this lab server is set up so that upgrading a package does not restart the service automatically. Do not assume a real server restarts by itself either; check it.
After the update, run ③ again and it changes to in the changelog and Verdict: FIXED. But run ② again and PHP_VERSION is still 8.3.6, because the distribution keeps the version number and adds only the fix.
Step 3 — Restart and verify
# Run on: your computer (executes inside the server)
docker compose exec server bash /opt/lab/tools/restart-check.sh # before restart
docker compose exec server service php8.3-fpm restart # on a real server: systemctl restart php8.3-fpm
docker compose exec server bash /opt/lab/tools/restart-check.sh # after restart
restart-check.sh shows three things: when the packages last changed, when the running PHP processes started, and which processes still use files that were deleted.
Process start time — Before restart: Earlier than the package change time · After restart: After the package change time
Executable — Before restart: /usr/sbin/php-fpm8.3 (deleted) · After restart: /usr/sbin/php-fpm8.3
Result line — Before restart: Result: a restart is needed. · After restart: Result: the running PHP processes are using the files that are installed now.
(PIDs and times differ on every run. Look less at the values and more at "did the process start before the update?" and "is (deleted) attached?")
Check this · Common mistakes
Concluding "it is a fixed version, so it is safe" from php -v alone. → Check the PHP that handles web requests separately.
Judging whether you are patched from PHP_VERSION in the web response. → A distribution package shows the same number before and after the patch. Judge by the changelog.
Updating but not restarting. → The old code keeps running. Compare before and after the restart with restart-check.sh.
Cases where these three steps are not enough
If the server was already attacked, a restart can erase evidence. Patched is not the same as not compromised. The first-pass check before restarting is in Section 3.
A security update can also break your service, so check key features after patching. That is in Section 4.
Docker needs an image rebuild rather than a restart, shared hosting needs you to ask the hosting company, and 8.1 or earlier needs you to check the distribution or LTS packages.
If patching right now is hard, temporary mitigation settings exist, but they only reduce risk and are not the fix. The fix is the update.
Related exercise
Exercise 1. Three-step quick check in exercises/exercises.md (try it yourself first, then check exercises/exercises_solutions.md).
Sources and dates checked
Official PHP announcements (fixed versions, vulnerability description, mitigation guidance) — checked 2026-11-08
CISA KEV catalog (both CVEs added 2026-10-26) — checked 2026-11-08
The lab server output was captured by running it on 2026-11-08. Official announcements and package versions may change afterwards, so check again before applying anything to a real server.
Next lesson
1-2 The Incident Timeline and How to Read Official Advisories
PHP Emergency Security Response Lab: From Checking Your Server to Verifying the Patch · Information current as of 2026-11-08
Lab files, exercises and solutions are on GitHub; the link is in the external resources of Lesson 1.
In one line
Read three places in the official advisory: impact, fixed versions and mitigation. Use CVSS to ask "how dangerous is it?" and CISA KEV to ask "is it actually being exploited?", and set priorities from both. Each source defines the affected range differently, so decide by asking "does the package I use contain the fix?"
Key ideas
Timeline (2026)
10/17 — What happened: Amazon's threat analysis team saw attack attempts on a honeypot (a decoy server), four days before disclosure · Source: Tenable summary
10/20 — What happened: The vulnerability IDs spread first. The PHP project pre-announced an "urgent security release tomorrow" · Source: php.net
10/21 — What happened: Fixed versions 8.2.35 · 8.3.36 · 8.4.27 · 8.5.12 and the security advisory · Source: php.net
10/22 — What happened: KISA Boho Nara published "Corporate security response guidelines for the PHP vulnerability (PHP2Shell)" · Source: Boho Nara
10/23 — What happened: Information notice about the session upload progress feature (separate from these two vulnerabilities) · Source: php.net
10/24 — What happened: A researcher reported three honeypots compromised · Source: Tenable summary
10/26 — What happened: Added to CISA KEV (remediation due 10/29); Windows builds re-released · Source: CISA, php.net
The 10/17 and 10/24 entries follow Tenable's summary. Attack attempts began before disclosure, so the clock did not start on the day the patch was released.
How the php.net security advisory (10/21) is organized
Summary → who is at risk → description of each vulnerability (CVE and GHSA numbers) → how to update → mitigation when you cannot update. In practice, read three places carefully.
Impact: Every installation that handles web requests (PHP-FPM, Apache mod_php, php-cgi, FrankenPHP, LiteSpeed). The differences between them are covered in 1-4.
Fixed versions: 8.2.35 · 8.3.36 · 8.4.27 · 8.5.12. For 8.1 and earlier, where official support has ended, the project releases no update (7.4 · 8.0 · 8.1 get source patches only).
Mitigation: Each vulnerability has its own settings, and the advisory itself says they "only reduce the risk and do not make you safe." You practice this in 3-3.
Why the affected range differs by source
Wikipedia — Versions: 5.4 – 8.5 · What question it answers: The range where the faulty code existed (Calif's analysis, quoted by Tenable)
KISA, KNVD and many news reports — Versions: 8.2 – 8.5 · What question it answers: The range where fixed versions were released
Source patch only — Versions: 7.4 · 8.0 · 8.1 · What question it answers: No installer, but a source patch is provided
No fix from the project — Versions: 5.4 – 7.3 · What question it answers: Check the distribution or LTS package
GHSA — Versions: below 8.2.35 · 8.3.36 · 8.4.27 · 8.5.12 · What question it answers: The exact impact and fix criteria
They are not contradicting each other; they answer different questions. The question to ask about your own server is not "is this version in the affected range?" but "does the package I use contain the fix?" (you practice this in 2-3).
CVSS v4.0 9.2
The scale runs from zero to ten, and 9.0 or higher is Critical. Both vulnerabilities score 9.2.
The score is technical severity. Whether the flaw is being attacked right now, or whether your server is open to the internet, is not part of the score.
Tenable's summary says the identifiers that circulated during the advance notice carried a 10.0, which the PHP foundation said was a wrong value. Read from the official announcement and the GHSA.
CISA KEV
It is a catalog of vulnerabilities with "confirmed exploitation in the wild." Many high-scoring vulnerabilities are not on the list.
Both CVEs were added 2026-10-26 with a remediation due date of 2026-10-29 (a rule for US federal agencies, not a legal deadline for your server). It is a good basis for setting priorities.
knownRansomwareCampaignUse is "Unknown." Do not read "unknown" as "no." Not being on the list does not mean there are no attacks either.
Two follow-up notices (separate from the fix for these two vulnerabilities)
10/23 Session upload progress (CVE-2026-115560) — Content: Remote code execution under special conditions: the app changes session.serialize_handler at run time and the session upload progress feature is on · Status as of 11-08: The notice names no fixed version ("to be handled in a regular release"). Mitigation: session.upload_progress.enabled=0 (in php.ini, the FPM pool and so on; ini_set and .user.ini are too late to help). No extra action if you already turned it off as the 10/21 advisory said
10/26 Windows builds (CVE-2026-111497) — Content: A vulnerability in the Brotli library. Rebuilt as 8.5.12-1 · 8.4.27-1 · 8.3.36-1 · 8.2.35-1. The -1 is a rebuild that changes only a dependent library; the PHP source version is the same · Status as of 11-08: Applies when automatic decompression is turned on in the cURL extension (off by default). Added to CISA KEV on 2026-10-27
The most recent php.net announcement is the 8.6.0 RC5 (pre-release) on 11-05, and there was no new security advisory. Keep checking, because new ones can appear.
Check it yourself
This is a slides lesson, so you do not need the lab server. Below is how to confirm on your own computer what the lesson described.
① Read the entries in the KEV catalog
This is the result of running it on 2026-11-08. The catalog is updated continuously, so other entries may have been added even if the date is the same.
CVE-2026-109618 2026-10-26 2026-10-29 PHP Memory Corruption Vulnerability
CVE-2026-109619 2026-10-26 2026-10-29 PHP Stale Internal Request-State Vulnerability
② Practice reading the official advisory
Open the 10/21 security advisory at and underline the three places above: "impact · fixed versions · mitigation."
Open the GitHub security advisory using the GHSA number in the announcement and confirm that the affected versions are written as "below."
Find the security advisory for your own environment (distribution or hosting) and check whether your package version is on the fixed list.
Check this · Common mistakes
Deciding from the version range in a news headline → Each source uses a different basis. Decide by whether your package contains the fix.
Setting priority from CVSS alone → It is severity, not proof of exploitation. Look at KEV and whether your server is exposed as well.
"It is not in KEV, so it is safe" or "ransomware is Unknown, so no" → Both are readings with no basis.
Skipping the follow-up notices as "I already patched, so not relevant" → For the session issue, no fixed version is named in the notice as of 11-08, and on Windows you must replace the build with the rebuild.
Quoting a secondary source as if it were primary → The 10/17 and 10/24 events come from Tenable's summary. For an important report, check the original and cite it.
Information can change. Check the official announcement again before applying anything to a real server.
Related exercise
There is no exercise attached to this lesson. When you work on case G of Exercise 4 (the -1 in the Windows build), refer to the "Two follow-up notices" section. Try it yourself first, then check exercises/exercises_solutions.md.
Sources and dates checked
Official PHP news (advance notice, fixed versions, security advisory, information notice, Windows builds, most recent announcement) — checked 2026-11-08
GHSA-w8hw-w9fx-j79w (CVE-2026-109618) — checked 2026-11-08 (for CVE-2026-109619, only the number of GHSA-6wmf-4rv5-p3rp was checked)
CISA KEV — downloaded and checked 2026-11-08 (feed updated 2026-11-06)
KISA Boho Nara security notice — posted 2026-10-22, checked 2026-11-08
Timeline 10/17 and 10/24, affected-range analysis, explanation of the CVSS error: Tenable FAQ — checked 2026-11-08 (secondary source)
PHP supported versions table — checked 2026-11-08
Next lesson
1-3 How the Two Vulnerabilities Work: Concept Diagrams
Some command listings are not repeated here; see the downloadable PDF for the full commands.
PHP Emergency Security Response Lab: From Checking Your Server to Verifying the Patch · Information current as of 2026-11-08
Lab files, exercises and solutions are on GitHub; the link is in the external resources of Lesson 1.
In one line
Both vulnerabilities arise where cleanup and initialization fall out of step while PHP "prepares → handles → cleans up" a request, and the advisory states that both are possible without authentication. The only complete fix is the update; temporary mitigation only reduces exposure. This lesson covers concepts only and does not reproduce any attack.
Key ideas
The life of one request
Start: Prepare the memory and state for this request alone.
Handle: Your code runs on top of that prepared state.
Clean up: Put away the memory and state that were used.
The cleanup step assumes that "the start finished properly." Both vulnerabilities occur where that assumption breaks.
Worker reuse
The processes that run PHP under a web server (workers) do not disappear when one request ends; they take over the next one. That is why restoring a clean state between requests is the crux. For the same reason, when an update replaces files, workers that are already running still hold the old code in memory, so a restart is needed (4-2).
The two vulnerabilities (per the php.net advisory and GHSA)
Where it goes wrong — CVE-2026-109618: Within one request: it stops with the start half finished → cleanup reads it wrongly · CVE-2026-109619: Between requests: the previous request's state is left over and the next request uses it
Cause (advisory) — CVE-2026-109618: Out-of-memory handling can abort PHP at a moment when the request data is only partly initialized, and cleanup can treat that bad data as valid · CVE-2026-109619: The request's internal state outlives the memory beneath it once that memory is freed, and the next request on the same worker can use it before it is initialized
Conditions (GHSA) — CVE-2026-109618: With several workers or other requests mixed in, the number of attempts only increases; the condition does not go away · CVE-2026-109619: The earlier and later requests must reach the same worker. Several workers do not remove the condition
Confirmed impact — CVE-2026-109618: Unauthenticated remote code execution with the privileges of the web worker account · CVE-2026-109619: Unauthenticated use after free, memory exposure, remote code execution
Score · fixed versions — CVE-2026-109618: CVSS v4.0 9.2 · 8.2.35 / 8.3.36 / 8.4.27 / 8.5.12 · CVE-2026-109619: Same
Analogies: a person clearing a table that was only half set, who assumes it was fully laid and goes to collect the plates (the first); a person who trusts the key of a locker that was already returned and uses it as is (the second).
Why no authentication is needed
The problem is not a feature of your app but the part where the engine prepares and cleans up a request, and that happens on every request, separately from any login check. For Apache mod_php, the most dangerous setup, the advisory explains that an unauthenticated request can trigger the attack before any app code runs (differences for FPM and other setups are in 1-4). So hardening your app's login is not the fix.
What the temporary mitigations point at (settings are practiced in 3-3)
109618 — What the mitigation touches: Memory limit, request size limits · Limit stated in the advisory: Cannot stop the underlying memory allocation failure. Do not use RLIMIT_AS or RLIMIT_DATA
109619 — What the mitigation touches: Session upload progress feature, logging of fatal-error calls in PHP 8.5 · Limit stated in the advisory: Blocks only the confirmed paths and not other variants
The advisory states that "the only complete fix is the update." Mitigation is a way to buy time.
Mitigation in a little more detail (based on the advisory's wording)
109618, two kinds of running out of memory: memory_limit=-1 removes the failure that is controllable because of PHP's own limit, but the advisory notes the limitation that real allocation failures below it can still reach the vulnerable path. It tells you to enforce it with php_admin_value (in the FPM pool or Apache config) so the app cannot change it, and to check that no pool, directory or app setting restores a finite limit. Container and cgroup limits are boundaries that contain the damage, and where possible it recommends a policy that ends only the faulty worker. RLIMIT_AS and RLIMIT_DATA can instead cause the very allocation failures at issue, so they are not used.
109619, app-side checks: Remove invalid or deprecated settings that apply on every request (the ones that emit diagnostic messages before initialization). The advisory states that error_reporting, display_errors and hiding messages with @ do not help. Fix fatal errors and execution time-outs that can be reached from outside (including failures in callbacks, upload and import handling, and cleanup).
The concrete values and where to apply them are practiced in 3-3.
Check it yourself
This is a slides lesson, so you do not need the lab server. Here is how to check against the original text.
Open the 2026-10-21 security advisory at and compare its cause descriptions for the two vulnerabilities with the table above.
Using the GHSA numbers in the advisory, open the GitHub security advisories (GHSA-w8hw-w9fx-j79w, GHSA-6wmf-4rv5-p3rp) and check the "below the affected version" wording, the CVSS and the "no authentication needed" notation.
In the advisory's "when you cannot update" section, find the mitigation and limit sentences for each vulnerability and compare them with the table above.
Check this · Common mistakes
Downloading and running exploit code → Do not. According to a security vendor's analysis (per the fact sheet), the public code works only on particular OS, PHP and web server combinations, and unverified code can itself be malware. This reflects content not re-checked against the original, so read it together with other sources.
"It needs a login, so I am fine" → The advisory states that unauthenticated remote code execution is possible.
"I have several workers, so I am safe" → The GHSA says that several workers only lower the chance of success and do not remove the condition.
Mistaking temporary mitigation for the fix → It blocks only the confirmed paths. You still need the update and a restart.
Replacing the files with the new version and leaving the workers running → Running workers hold the old code (4-2).
Information can change. Check the official announcement again before applying anything to a real server.
Related exercise
There is no exercise attached to this lesson (exercises/exercises.md). You do the mitigation settings in Exercise 6 (3-3) and the restart check in Exercise 7 (4-2).
Sources and dates checked
Official PHP news, 2026-10-21 security advisory (cause descriptions, affected SAPIs, fixed versions, mitigation and limits) — checked 2026-11-08
GHSA-w8hw-w9fx-j79w (CVE-2026-109618) — checked 2026-11-08
GHSA-6wmf-4rv5-p3rp (CVE-2026-109619) — checked 2026-11-08
Limits of the public exploit code: based on the Rapid7 and Tenable summaries in the fact sheet (not re-checked against the originals this time)
Next lesson
1-4 Why mod_php Is the Riskiest and FPM Is Not Safe Either
PHP Emergency Security Response Lab: From Checking Your Server to Verifying the Patch · Information current as of 2026-11-08
Lab files, exercises and solutions are on GitHub; the link is in the external resources of Lesson 1.
In one line
Even for the same two vulnerabilities, the risk differs by how PHP receives web requests (the SAPI). mod_php is the most dangerous (it can be attacked before app code runs), and PHP-FPM, php-cgi, FrankenPHP and LiteSpeed are conditionally exposed or not immune, so every setup needs the patch and a restart.
Key ideas
SAPI
This is the way PHP is connected to receive a request and return a result. The command line (CLI) is also a SAPI. These vulnerabilities arise between the start and the cleanup of a request, and the start stage differs by SAPI, which is why the risk differs.
mod_php: PHP runs inside the web server (Apache) process.
PHP-FPM: PHP runs as a separate process pool and exchanges messages with the web server.
php-cgi, FrankenPHP, LiteSpeed (LSAPI): Other ways of connecting.
Guessing the SAPI from the web server's name can be wrong (even behind the same Nginx it may be FPM, and not every Apache is mod_php). How to confirm your own server's setup is practiced in 2-2.
Comparing five setups
Apache mod_php — Risk as read in the advisories: The project sees the risk as highest. There is a demonstration of an unauthenticated request triggering the attack before app code runs · Source: php.net advisory
PHP-FPM — Risk as read in the advisories: Conditional exposure. Code execution for the session vulnerability was verified on both mod_php and FPM · Source: GHSA-6wmf-4rv5-p3rp
php-cgi — Risk as read in the advisories: Included in the affected targets. No detailed comparison is given · Source: php.net advisory
FrankenPHP — Risk as read in the advisories: The same initial configuration path was not found in the default setup, but it is "not immune" · Source: GHSA-6wmf-4rv5-p3rp
LiteSpeed (LSAPI) — Risk as read in the advisories: A conditional candidate · Source: GHSA-6wmf-4rv5-p3rp
I did not verify which setup is the most common, so this guide does not say either.
Why mod_php is the most dangerous
The problem arises at the start stage, before the request reaches the app, so it cannot be stopped even if your app code is safe. No authentication is needed either.
mod_php runs inside the Apache process, and directory-level Apache settings are applied before the request start function. The security advisory explains that this can become the initial input.
Basis: the "demonstrated attack" in the php.net advisory, and the security advisory's "code execution through the fatal-error path was confirmed on mod_php."
Is FPM safe? Conditional exposure
What it blocks: if request start fails, FPM ends that worker. That blocks the sequence demonstrated on mod_php.
What remains: Rapid7 considers that, from source analysis, the path after a successful start may still be vulnerable. However, no complete attack case on FPM has been reported for the first vulnerability (CVE-2026-109618).
What is confirmed: the advisory states that, for the second vulnerability, code execution related to the session lifecycle was verified on both mod_php and FPM.
When a setting takes effect also affects the conditions. According to the advisory, FPM pool settings apply when a worker starts, and a user directory's .user.ini applies after normal initialization finishes. That is why you must restart the workers after changing a setting.
Limits of the public PoC, and why you still patch now
The public PoCs that Rapid7 reviewed each showed code execution only on a particular combination of OS, PHP version and web server, and none was generally reliable.
The honeypot compromise reported by Tenable was also a single-worker mod_php setup (PHP 8.4.26) deliberately configured to favor the attacker.
Reasons to patch anyway: ① The CISA KEV listing (2026-10-26) is evidence of real exploitation. ② The foundation said it had found no working code at disclosure, but Tenable reports that Trail of Bits later reported working code against unpatched 8.2 to 8.5 (secondary source). ③ "The exploit code is weak" and "my server is safe" are different statements.
Do not download or run a PoC whose source you have not verified. Some contain malware. Do your checking through patching and version checks.
Follow along
This is a slides lesson, so there are no commands to follow. Below is a checklist for wrapping up.
Write down how your PHP runs (mod_php / FPM / something else). If you do not know, find out with the 2-2 lab (do not guess from the web server's name).
Whatever the setup, upgrade to a fixed version (8.2.35 · 8.3.36 · 8.4.27 · 8.5.12) or to your distribution's fixed package.
After upgrading, restart so the web runtime runs the new code (4-2). For mod_php, that means restarting Apache.
Check this · Common mistakes
"It is FPM, which is safer than mod_php, so it is not urgent" → It is conditional exposure, and the session vulnerability was verified on FPM as well. It needs the patch and a restart.
"My app has no vulnerable code, so I am safe" → With mod_php, an attack is possible before app code runs.
"The public PoC does not run in my environment, so I am fine" → It only means the PoC works on certain combinations, not that no other attack method exists.
"FrankenPHP is not affected" → The advisory itself says "not immune."
Downloading a PoC and testing it on my own server → Do not. It may be malware, and the KISA guidelines also advise against running public PoCs.
Information can change. Check the official announcement again before applying anything to a real server.
Related exercise
There is no exercise attached to this lesson. How to check the SAPI yourself is in 2-2, and the restart is in 4-2.
Sources and dates checked
Official PHP news (affected SAPIs, mod_php risk assessment) — checked 2026-11-08
GHSA-6wmf-4rv5-p3rp (CVE-2026-109619, description by SAPI) — checked 2026-11-08
Rapid7 (description of FPM, review of public PoCs; updated 2026-10-27) — checked 2026-11-08
Tenable FAQ (honeypot configuration, later reports, malware warning; secondary source) — checked 2026-11-08
CISA KEV (added 2026-10-26) — checked in 1-2
Next lesson
2-1 Setting Up the Lab Environment (Section 2: Is My Server Affected?)
PHP Emergency Security Response Lab: From Checking Your Server to Verifying the Patch · Information current as of 2026-11-08
Lab files, exercises and solutions are on GitHub; the link is in the external resources of Lesson 1.
In one line
Start the lab server with docker compose up -d, get in with docker compose exec server bash, and return to the pre-patch starting state at any time with docker compose down → up -d. The server opens only on your own computer (127.0.0.1); never expose it to the internet.
Key ideas
Why a separate lab server: You need a pre-patch state, and it would be a problem if practicing on a real production server stopped the service. You build a server on your own computer that you can break and restore as many times as you like.
Layout: One container, web01, inside your computer's Docker. Ubuntu 24.04 + Nginx + PHP-FPM. The PHP that handles web requests is 8.3.6 before the patch, and the command-line php is 8.4.27, which is already patched.
Sample service: An internal notice board. It has login, sessions, attachment upload, SQLite, XML import and a CLI batch job, and it is what you check to see whether features still work after patching (4-4).
Port binding: "127.0.0.1:8090:80" — the leading 127.0.0.1 means "reachable only from this computer." Remove it and the server opens to the outside. It contains an unpatched PHP, so never change it.
Resetting: Updates and configuration changes made inside the server disappear with the container. The sample service's posts (the database) also live inside the container and are reset with it. Only attachments remain on your computer, in app/storage/uploads/.
Check where you are by the prompt: On your computer you see a prompt like lab %; inside the server it is the root prompt on web01:/#. If you type a server command on your own computer you get strange results.
Follow along
What you need: Docker Desktop (Windows, macOS) or Docker Engine + Compose v2 (Linux), 2GB of free disk, 2GB of free memory, and an internet connection. Details are in lab/README.md.
1. Read the compose file
Open lab/docker-compose.yml and check the following.
ports: "127.0.0.1:8090:80" — Port 8090 on your computer → port 80 in the container. Reachable only from this computer
4 entries under volumes — Connects app (the sample service) and tools, mitigation and training-data (read-only, :ro) into the server
mem_limit: 1g — An outer boundary so that, even if you lift the memory limit in the 3-3 temporary mitigation lab, it cannot use the whole computer
init: true · cap_add: [SYS_PTRACE] — Settings that let the service restart and process inspection labs (4-2) work properly
2. Start the server
# Run on: your computer, in the lab/ folder
docker compose up -d --build
docker compose logs server | tail -3
docker compose ps
The first time takes a few minutes because it builds the image (the README says 3 to 5 minutes). If the image already exists it finishes quickly.
It worked if the end of the log shows `The lab server is ready
In docker compose ps, check that the ports column shows 127.0.0.1:8090->80/tcp.
3. Try the sample service (browser)
Go to and sign in with the training account: username admin, password lab-password-1234 (a training account, not a real one)
The notice list starts with 2 entries (made-up training notices).
New notice: Write a title and content, attach a file and submit. The attachment's file name appears as a link in the list. Uploaded files are stored outside the web-public folder.
Import notices from XML: Save the file below as notices.xml and upload it. You get "Imported 2 notices from XML.", and the author is shown as admin (XML).
<?xml version="1.0" encoding="UTF-8"?>
<notices>
<notice>
<title>November security training</title>
<body>This is a made-up training notice.</body>
</notice>
<notice>
<title>Server maintenance schedule</title>
<body>This is a made-up training notice.</body>
</notice>
</notices>
4. Get inside the server
# Run on: your computer, in the lab/ folder
docker compose exec server bash
The prompt changes to the root prompt on web01:/#. From here on you are inside the server.
# Run on: inside the server
hostname # web01
head -2 /etc/os-release # Ubuntu 24.04.x LTS
php -v | head -1 # PHP 8.4.27 (cli) ... (the command-line PHP. The web PHP is different → 2-2)
ls /opt/lab/tools # package-check.sh restart-check.sh runtime-check.sh smoke-test.sh timeline.sh triage.sh
exit # back to your computer
On a real production server this does the same job as connecting with ssh. All six check scripts only read; none of them changes anything.
5. Return to the starting state
# Run on: your computer, in the lab/ folder
docker compose down
docker compose up -d
To clear the attachments completely too, delete the files in app/storage/uploads/ yourself after down (keep .gitkeep).
Check this · Common mistakes
Did you remove the 127.0.0.1 in front of the port? If you remove it, the unpatched PHP is open to the outside.
Where are you typing the command? If the prompt is the root prompt on web01 you are inside the server; otherwise you are on your computer.
docker: command not found: Check that Docker Desktop is running and that docker is on your terminal's PATH.
Port 8090 is already in use: If another program uses it, up fails. Stop that program and run it again (we recommend not changing the port number in the compose file, because then it will differ from the lesson screens).
Do not delete the name: php-lab-en line near the top of the compose file, so that it works even when the folder name is not plain ASCII.
This server is not a real production server. It differs from a real one, for example in that package updates do not trigger an automatic restart, so any method you confirm in the lab must be checked again on a real server for your environment.
Related exercise
No exercise is linked to this lesson. Follow "Getting started" and "Returning to the starting state" in lab/README.md yourself.
Sources and dates checked
The lab environment files (docker-compose.yml, README.md) and the results of running them — 2026-11-08. This lesson cites no external official sources.
The image build time (3 to 5 minutes) comes from the README and was not timed.
Next lesson
2-2 CLI PHP and Web-Request PHP Can Differ — Inside the server, you follow the command-line PHP, the installed PHPs, the web server configuration, the FPM processes and the web response to decide which PHP handles web requests.
PHP Emergency Security Response Lab: From Checking Your Server to Verifying the Patch · Information current as of 2026-11-08
Lab files, exercises and solutions are on GitHub; the link is in the external resources of Lesson 1.
In one line
php -v is only the version of the command-line PHP. To decide which PHP handles web requests, follow the chain: web server configuration → socket → PHP-FPM process → web response.
Key ideas
A server can have several PHPs. This lab server has 8.3 and 8.4 installed together. The command-line php uses 8.4, and web requests use 8.3 (PHP-FPM).
The php command is a shortcut. It goes through shortcuts such as /usr/bin/php → /etc/alternatives/php → /usr/bin/php8.4 to the real file, and an administrator can change the end of the chain with the alternatives setting.
Web requests take their own path. Nginx's fastcgi_pass → the listen socket in the FPM pool configuration → the FPM master process (the configuration file path shows in its arguments) → the worker processes.
The verdict is based on the PHP that handles web requests. The PHP advisory names as the at-risk targets "every installation that handles web requests (PHP-FPM, Apache mod_php, php-cgi, FrankenPHP, LiteSpeed)." The advisory says nothing about the command-line PHP, so do not state flatly that "there is no impact." It is a package on the same server, so keep it up to date as well.
Batch jobs (cron and so on) run on the command-line PHP. Know which version that is, separately from the web verdict.
Do not conclude from a single piece of evidence. Check that two or three different methods point to the same answer.
Follow along
Preparation: start the lab server in its starting state.
# Run on: your computer, in the lab/ folder
docker compose down && docker compose up -d
Every command below is run on your computer, in the lab/ folder, and docker compose exec server runs it inside the server for you (the same job as logging in to the server and typing it there). The commands in this lesson do not change the server's state.
V1. Trace the command-line PHP
# Run on: your computer (executes inside the server)
docker compose exec server bash -c 'which php; readlink -f $(which php); update-alternatives --display php | head -3'
docker compose exec server ls -l /usr/bin/php /etc/alternatives/php
You get /usr/bin/php, /usr/bin/php8.4 and php - manual mode (link currently points to /usr/bin/php8.4). One shortcut points to another, and the end is the 8.4 executable.
V2. Find every installed PHP
# Run on: your computer (executes inside the server)
docker compose exec server bash -c "ls -1 /usr/bin/php[0-9]* /usr/sbin/php-fpm*"
docker compose exec server /usr/sbin/php-fpm8.3 -v | head -1
You get /usr/bin/php8.3, /usr/bin/php8.4 and /usr/sbin/php-fpm8.3. The only FPM executable is 8.3, and the first line of php-fpm8.3 -v is PHP 8.3.6 (fpm-fcgi). The candidate narrows to the 8.3 side, but it is still only a "candidate."
V3. Follow where the web server hands off PHP
First command: fastcgi_pass unix:/run/php/php8.3-fpm.sock; (with -R alone, the same line would appear twice with the file name, once for each of two locations, so -h drops the file name, sed strips the indentation and sort -u leaves a single line)
Second command: listen = /run/php/php8.3-fpm.sock matches the path Nginx hands off to. The workers run as the user = www-data account.
Third command: php-fpm: master process (/etc/php/8.3/fpm/php-fpm.conf) and, under it, the php-fpm: pool www worker processes. (The PIDs from ps differ on every run.)
V4. Confirm with the web response
The inside request shows PHP_VERSION 8.3.6, PHP_SAPI fpm-fcgi, PHP_BINARY /usr/sbin/php-fpm8.3 and php.ini /etc/php/8.3/fpm/php.ini. The outside request returns 403. Block check pages like this (including phpinfo) so they open only from inside the server, and delete them when you are done. Leaving them open to the outside hands out your version information as is.
V5. A script that checks it all at once, and the batch job
# Run on: your computer (executes inside the server)
docker compose exec server bash /opt/lab/tools/runtime-check.sh
docker compose exec server php /var/www/app/bin/daily-report.php | head -2
The script shows item 1 (command line 8.4.27 (cli)) through item 5 (web 8.3.6, fpm-fcgi) and ends by noting "The verdict is based on item 5 (the PHP that handles web requests)." The first line of the daily report is Daily report (PHP 8.4.27, cli) with a timestamp in front. The batch job runs on command-line 8.4, not the 8.3 that the web uses.
Check this · Common mistakes
Concluding "the web uses the same PHP" from php -v or which php alone. → Follow it through the web server configuration to the FPM process.
Trusting only the socket name (php8.3-fpm.sock). → Also check the pool configuration (listen) that creates that socket and the configuration file path of the master process.
Thinking the web is safe because the command-line version is a fixed version. The reverse also happens: even if the web is on a fixed version, the command line or batch jobs may be on an old one.
Leaving a check page open to the outside.
You do not yet know whether this lesson's 8.3.6 is fixed. A distribution adds only the fix without raising the number, so the number alone cannot give a verdict → 2-3.
This server has no Apache, only Nginx + PHP-FPM. On a server that uses Apache mod_php, look at the Apache module (mods-enabled/php*.load) instead of fastcgi_pass (item 4 of runtime-check.sh also looks for Apache modules).
Related exercise
Exercise 2. How many PHPs does this server have? in exercises/exercises.md — check with direct commands, without using runtime-check.sh. Try it yourself first, then check exercises/exercises_solutions.md.
Sources and dates checked
Official PHP announcement (targets: every installation that handles web requests; fixed versions 8.2.35 · 8.3.36 · 8.4.27 · 8.5.12) — checked 2026-11-08. This announcement says nothing about the command-line PHP.
The lab server output was captured by running it on 2026-11-08. Official announcements and package versions may change afterwards, so check again before applying anything to a real server.
Next lesson
2-3 php -v Says 8.3.6, Yet It Is Patched? Reading Distribution Backports
Some command listings are not repeated here; see the downloadable PDF for the full commands.
PHP Emergency Security Response Lab: From Checking Your Server to Verifying the Patch · Information current as of 2026-11-08
Lab files, exercises and solutions are on GitHub; the link is in the external resources of Lesson 1.
In one line
Do not judge a distribution's PHP by its version number. Judge it by the part after the hyphen (the distribution revision) and by whether the CVE numbers appear in the installed package's changelog. For PPAs, official Docker images and custom builds, judge by the upstream version.
Key ideas
A version string has two parts. In 8.3.6-0ubuntu0.24.04.13, the 8.3.6 before the hyphen is the PHP project's upstream version, and it is the only part that php -v and PHP_VERSION in the web response show. The 0ubuntu0.24.04.13 after the hyphen is the package revision number that Ubuntu adds.
Backporting: A distribution does not raise the upstream version. It picks only the parts fixed in the new version and puts them into the old one. That is why PHP on Ubuntu 24.04 is still 8.3.6 after the security update (it may be fixed even though the number is lower than the official fixed version 8.3.36).
The verdict method depends on the source.
Distribution (Ubuntu, Debian) — Example versions (lab server): 8.3.6-0maysync1 → 8.3.6-0ubuntu0.24.04.13 · How to judge: Do CVE-2026-109618 and CVE-2026-109619 appear in the installed changelog?
Packages that keep the upstream version (ondrej PPA, official Docker image, custom build) — Example versions (lab server): 8.4.27-1+ubuntu24.04.1+deb.sury.org+1 · How to judge: Is the upstream version 8.2.35 / 8.3.36 / 8.4.27 / 8.5.12 or newer?
apt changelog fetches the changelog of the new version you would install (the candidate). The changelog of the package installed right now is on the server at /usr/share/doc/<package>/changelog.Debian.gz. "An update is available" and "this server contains the fix" are different statements.
End of official support ≠ no patch. PHP 8.1 got no official fix release (the project provides only source fixes for 8.1 and earlier), but php8.1 8.1.2-1ubuntu2.28 on Ubuntu 22.04 contains a patch with the same name and both CVEs. That holds only while the distribution supports that version, though, and it does not come automatically into an 8.1 you built yourself.
Follow along
Preparation: start the lab server in its starting state and fetch a fresh package list.
# Run on: your computer, in the lab/ folder
docker compose down && docker compose up -d
docker compose exec server apt-get update
Every command below is run on your computer, in the lab/ folder, and docker compose exec server runs it inside the server for you. To type directly inside the server, get in with docker compose exec server bash and type only the command inside the quotes. The commands in this lesson do not install any packages.
Why the pipe sits inside the server in forms like bash -c "... | ...": if you print straight to the terminal, dpkg -l and apt changelog open a pager (less).
V1. Look at the package versions
# Run on: your computer (executes inside the server)
docker compose exec server bash -c "dpkg -l 'php8.3*' | grep ^ii"
docker compose exec server bash -c "apt list --upgradable 2>/dev/null | grep php8.3-fpm"
docker compose exec server apt-cache policy php8.3-fpm
All 8 installed php8.3 packages are 8.3.6-0maysync1 (the package that went in when Ubuntu 24.04 was released).
The upgrade list: php8.3-fpm/noble-updates,noble-security 8.3.6-0ubuntu0.24.04.13 arm64 [upgradable from: 8.3.6-0maysync1] — the new version also starts with 8.3.6, and what changed is after the hyphen. noble-security means the update came from the security repository. (On an Intel/AMD computer it says amd64 instead of arm64.)
apt-cache policy: Installed: 8.3.6-0maysync1, Candidate: 8.3.6-0ubuntu0.24.04.13. It separates the installed version from the candidate (the version that would be installed if you update).
V2. Find the CVE numbers in the changelog
# Run on: your computer (executes inside the server)
docker compose exec server bash -c "apt changelog php8.3-common 2>/dev/null | head -5"
docker compose exec server bash -c "apt changelog php8.3-common 2>/dev/null | grep '^php8.3 (' | head -5"
docker compose exec server bash -c "apt changelog php8.3-common 2>/dev/null | grep -n CVE-2026-10961"
docker compose exec server bash -c "zcat /usr/share/doc/php8.3-common/changelog.Debian.gz | head -1"
First command: the top entry is php8.3 (8.3.6-0ubuntu0.24.04.13) noble-security, with SECURITY UPDATE: Remote RCE via state corruption issue and the patch file debian/patches/CVE-2026-109618_109619.patch. (The Get:1 ... line is a download indicator.)
Second command: collecting only the version lines gives .13, .12, .11, .10, .9. All are 8.3.6, and only the trailing number rises. That is the flow of a backport.
Third command: you get the patch file line and the - CVE-2026-109618 and - CVE-2026-109619 lines at the end of the entry. They match the CVE numbers in the official PHP advisory.
Fourth command: the top of the installed package's changelog is php8.3 (8.3.6-0maysync1) noble. This server does not contain the fix yet.
V3. The verdict script
# Run on: your computer (executes inside the server)
docker compose exec server bash /opt/lab/tools/package-check.sh
The list of installed PHP packages: php8.3 is an Ubuntu package, and php8.4 is a PPA package with deb.sury.org in its version.
== PHP 8.3: "distribution package → looking for the CVE numbers in the changelog." Both CVEs are "not in the changelog" → Verdict: VULNERABLE (security update needed).
== PHP 8.4: "package that keeps the upstream version (PPA etc.) → judged by upstream version 8.4.27" → Verdict: FIXED.
Web requests are handled by 8.3 (PHP-FPM) (2-2), so this server's web PHP is still vulnerable.
The last line: even when the package is fixed, the old code runs until you restart the running processes (→ 4-2, restart-check.sh).
Note: even after updating, php-fpm8.3 -v and PHP_VERSION in the web response still show 8.3.6 (checked off screen on 2026-11-08). To see how this script judges it then, try item 4 of Exercise 3 yourself. The update and restart are done in Section 4.
Check this · Common mistakes
Judging by the number, as in "the upstream fixed version is 8.3.36 and this is 8.3.6, so it is vulnerable." → Judge distribution packages by their changelog. Judging by the number keeps wrongly reporting "vulnerable" even after you update.
The reverse: concluding "the CVE is in apt changelog, so our server is safe." → apt changelog is the record of the candidate version. Check the installed version (Installed in apt-cache policy, and /usr/share/doc/.../changelog.Debian.gz).
Trying to judge PPA or official Docker image packages by changelog. → They use the upstream version as is, so judge by the upstream version number.
Stopping after looking at one package. → A server can have PHPs from different sources side by side (this server has 8.3 from Ubuntu and 8.4 from a PPA). What you judge is the PHP that handles web requests (2-2).
Reading a package verdict as "the running code is fixed." → The restart check is in 4-2.
Applying the Ubuntu 22.04 8.1 case as is to other distributions and versions. → Check each distribution's security advisory and changelog yourself.
Related exercise
Exercise 3. Reading backports in exercises/exercises.md — read apt list --upgradable and apt changelog yourself and write your answers. Try it yourself first, then check exercises/exercises_solutions.md.
Sources and dates checked
Ubuntu 24.04 php8.3 changelog (8.3.6-0ubuntu0.24.04.13, entry written 2026-10-19) — checked 2026-11-08
Ubuntu 22.04 php8.1 changelog (8.1.2-1ubuntu2.28, entry written 2026-10-19) — checked 2026-11-08
Both versions were published to the security repository on 2026-10-21 and were the newest as of 2026-11-08 (Launchpad publishing history): ·
Official PHP announcement (fixed versions 8.2.35 · 8.3.36 · 8.4.27 · 8.5.12; only source fixes for 8.1 and earlier) — checked 2026-11-08
The lab server output was captured by running it on 2026-11-08. A distribution package's number changes when a new fix release comes out, so check again before applying anything to a real server.
Next lesson
2-4 The Verdict Matrix: Supported Versions, EOL, Docker, Hosting, Windows
PHP Emergency Security Response Lab: From Checking Your Server to Verifying the Patch · Information current as of 2026-11-08
Lab files, exercises and solutions are on GitHub; the link is in the external resources of Lesson 1.
In one line
Decide in this order: the PHP that handles web requests → the package source → the evidence that fits that source. Judge distribution packages by their changelog; for sources that follow the upstream version (PPAs, official Docker images, official Windows builds and so on), compare against the upstream fixed version; and if you cannot get evidence, leave it as "cannot tell," but never read that as meaning safe.
Key ideas
Three verdicts
Fixed — There is evidence that the fix is in
Vulnerable — The evidence points to a vulnerable version, or you are in a position where you could check for yourself and still found no evidence that it is fixed
Cannot tell — You cannot know with the information you have now → you need to get more evidence
"Cannot tell" does not mean fine. Until you get evidence, respond as if it were vulnerable (ask, plan an upgrade, consider the temporary mitigations in 3-3). Temporary mitigation is not the fix but a way to reduce risk.
Order of the verdict
Find the PHP that handles web requests. It can differ from the command-line (CLI) PHP (2-2).
Identify the package source. Distribution package / package that follows the upstream version (PPA and so on) / official Docker image / custom build / shared hosting / official Windows build.
Judge with the evidence that fits the source. With a different source, the same version number means something different, so do not change the order.
If you cannot get evidence at any step, the verdict is cannot tell, and your job is to get evidence.
Fixed is not the end. Even if the installed files are new, a running worker may still hold the old code. The restart and confirming it took effect are practiced in 4-2.
Evidence by source (the verdict matrix)
Distribution package (Ubuntu and so on) — What to look at: Package version · changelog · Evidence it is fixed: CVE-2026-109618 and 109619 appear in the changelog (it may be fixed even when the upstream number is low, 2-3)
Packages that follow the upstream version (PPA and so on) — What to look at: The start of the version string = the upstream version · Evidence it is fixed: The upstream fixed version or newer
Official Docker image — What to look at: Tag · the real version inside the container · Evidence it is fixed: The upstream fixed version or newer. To fix it, rebuild the image rather than restart (4-3)
Custom build — What to look at: The source version you built · a record of the patches applied · Evidence it is fixed: Fixed-version source, or a record that the backport was applied
Shared hosting — What to look at: The hosting company's answer · Evidence it is fixed: Detailed version · whether the patch was applied · whether it was restarted
Official Windows build — What to look at: The build version you downloaded · Evidence it is fixed: The upstream fixed version or newer
On the official Docker image (php on Docker Hub), the upstream version number goes straight into the tag, as in 8.3.36, 8.3.36-fpm and 8.3.36-apache. Do not trust the tag alone; check the real version inside the container.
Supported versions and fixed versions (php.net, as of 2026-11-08)
8.2 — Status: Security fixes only · End of active support: 2024-12-31 · End of security support: 2026-12-31 · Fixed version: 8.2.35
8.3 — Status: Security fixes only · End of active support: 2025-12-31 · End of security support: 2027-12-31 · Fixed version: 8.3.36
8.4 — Status: Active support · End of active support: 2026-12-31 · End of security support: 2028-12-31 · Fixed version: 8.4.27
8.5 — Status: Active support · End of active support: 2027-12-31 · End of security support: 2029-12-31 · Fixed version: 8.5.12
Active support: both bug fixes and security fixes are released. Security fixes only: releases come only when there is a serious security problem.
Security support for 8.2 ends on 2026-12-31. Even if you moved up to 8.2.35 this time, there may be no official fix for the next security problem, so plan the upgrade as well.
All four fixed versions were released on 2026-10-21.
Versions whose support has ended (8.1 and earlier)
No updates come from the PHP project (8.1 EOL 2025-12-31, 8.0 2023-11-26, 7.4 2022-11-28).
7.4 · 8.0 · 8.1: There is no official release. Because of the severity of the vulnerabilities, the PHP security team published minimal source backports on php-src GitHub branches (PHP-7.4-CVE-2026-109618-109619, PHP-8.0-…, PHP-8.1-…). They are for people who cannot build from source themselves or use a long-term-support (LTS) vendor, and they are not formal releases.
5.4 – 7.3: The project has issued no fix. An analysis reported that the faulty code has been there since 5.4 (see 1-2).
The evidence for a verdict is one of two things.
A package from the distribution or an LTS vendor → that vendor's changelog
A custom build → a record of applying the backport
If you have neither, treat it as vulnerable and plan an upgrade to a supported version.
Shared hosting
The control panel often shows only a major number such as "PHP 8.2." That alone does not tell you whether the detailed version is a fixed version, whether the distribution patch went in, or whether the workers were restarted. Ask the hosting company three things.
The detailed version and the package source
The date the patch was applied
Whether the PHP workers were restarted
A template for the inquiry is planned for Appendix A (the second update).
Official Windows builds and the -1 rebuilds
For official Windows builds, the version number is the upstream version. The criterion is the same as the upstream fixed versions (8.2.35 · 8.3.36 · 8.4.27 · 8.5.12).
On 2026-10-26, 8.5.12-1, 8.4.27-1, 8.3.36-1 and 8.2.35-1 came out. The PHP source and runtime version are unchanged; they are rebuilds that swapped the bundled compression library Brotli for 1.2.1 to fix CVE-2026-111497. It applies when automatic HTTP response decompression is turned on in the cURL extension (the cURL default is off).
So whether you have the -1 is a question to weigh separately from the verdict on the two vulnerabilities (109618 and 109619).
Follow along
This is a slides lesson, so there are no commands to follow. Fill in the log table below with your own servers, one at a time. Do not write only the verdict; write the evidence and the next action with it.
— Verdict: Fixed / Vulnerable / Cannot tell
Check this · Common mistakes
Reading cannot tell as fine → Until you get evidence, respond as if it were vulnerable.
Comparing only numbers without identifying the source → A distribution package may be fixed even when the upstream number is low, like 8.3.6. Identify the source first.
Treating fixed as the end → The running workers may be on old code. Go through the restart and confirmation too (4-2).
Judging by the command-line PHP → Base it on the PHP that handles web requests (2-2).
Mistaking the 7.4 · 8.0 · 8.1 backport branches for an "official release" → They are not formal releases, so if you applied one, keep a record of what you applied and when you built it, or it cannot serve as evidence for a verdict.
Related exercise
Exercise 4. Verdict practice (exercises/exercises.md): for each of cases A to G, choose Fixed / Vulnerable / Cannot tell and write the evidence and the next action. The lesson showed A (Ubuntu 24.04 package), C (official Docker image) and F (shared hosting) as examples and did not give the answers. Try it yourself first, then check exercises/exercises_solutions.md.
Sources and dates checked (all checked 2026-11-08)
PHP supported versions table
PHP EOL branches table
PHP 2026 news archive (the 10-21 security advisory, the guidance on 8.1 and earlier and source backports, the 10-26 Windows rebuilds)
7.4 source backport branch
Docker Hub php image tag (8.3.36)
The "faulty code since 5.4" analysis: see the sources in the 1-2 study guide (Tenable summary)
Next lesson
3-1 Before You Restart: First-Pass Checks for Compromise and Preserving Evidence. You begin the preparation before patching. You learn how to check for signs of compromise before restarting and how to decide whether to preserve evidence.
PHP Emergency Security Response Lab: From Checking Your Server to Verifying the Patch · Information current as of 2026-11-08
Lab files, exercises and solutions are on GitHub; the link is in the external resources of Lesson 1.
In one line
Skim for signs of compromise before you patch and restart. If there are signs, decide in the order preserve evidence → isolate → report → patch, and even when there are no signs, that does not mean there was no compromise.
Key ideas
Why before the restart: To apply the patch you have to restart the running PHP workers. But if the server was already attacked, a restart can erase the evidence left in memory. Google Cloud guidance quoted in Tenable's summary (including a Mandiant opinion) says that for a server showing signs of probing you should "capture worker memory before restarting" (secondary source).
triage.sh is a first-pass check tool. It is not a precision analysis tool, and it changes nothing. What it looks at: records of abnormal PHP worker exits, dropped connections between the web server and PHP, IPs with many 502 and 500 responses, POST requests from programs (judged by User-Agent), requests aimed at version information, requests to PHP files the service never had, PHP files in the upload and image folders, PHP files changed in the last 14 days, the web server account's (www-data) scheduled jobs (crontab), and (when checking a server) other processes running as the web server account.
Signs are the start of a judgment. The script itself says "Do not confirm or rule out a compromise from this result alone." Work out what each sign means and whether there are cases where it could be normal.
No signs ≠ no compromise. Logs can be deleted or never recorded in the first place, and the script looks only at the few things it was set to look at.
Limits of the default log: The default Nginx log format does not record the request size (the number at the end of the line is the response size). You cannot tell from logs alone whether a large request came in, and to record the size you must change the log format beforehand.
Order of judgment when there are signs (this lesson's summary): ① Preserve evidence (copies of logs and suspicious files, and if needed ask a specialist firm to preserve memory) → ② Isolate (do not shut down or restart the server; just block outside access) → ③ Report (your organization's security contact, and a report to Boho Nara) → ④ Patch and restart. Memory forensics techniques themselves are outside this lesson's scope.
Each agency writes the order differently. The KISA Boho Nara security notice (2026-10-22) lists, for a suspected compromise: ① Isolate ("do not shut down or restart the server; block only outside access at the network") ② Report ③ Secure evidence (server records, the list of running programs, network connection information) ④ Remediate (update and restart, remove web shells, rotate credentials). What they share is that restarting and patching come last.
When there are no signs: Skip this judgment and go on to patch. Still, the Boho Nara guidelines say "even if the records show nothing unusual, safety is not guaranteed, so update and rotate credentials together."
Follow along
Run every command on your computer, in the lab/ folder, and docker compose exec server runs it inside the server for you. The commands in this lesson do not change the server.
The training data (training-data/) is a made-up case. The IPs (203.0.113.45, 198.51.100.77, 198.51.100.23) are ranges reserved for documentation examples and are not records from a real server.
Preparation: start from the starting state.
# Run on: your computer, in the lab/ folder
docker compose down && docker compose up -d
V1. First-pass check with the training data
# Run on: your computer (executes inside the server)
docker compose exec server bash /opt/lab/tools/triage.sh /opt/lab/training-data
(On the lesson screen, to fit everything on one screen, it was run inside bash -c "..." with | grep . to filter out blank lines.)
Items 1, 2, 3 and 4: records of abnormal worker exits and dropped connections on the web server side, IPs with many error responses, and POST requests sent by programs. Match up the time windows and counts of the exits with the IPs the requests came from at those times.
Item 5: Requests that looked for version information files. What these requests mean is something you judge yourself in exercise 5.
Items 6 and 7: A successful (200) response to a PHP file the service never had, and a PHP file that actually exists inside the image folder.
Item 9: The web server account's crontab. If the service uses no scheduled jobs, an entry here is unfamiliar. Do not run or connect to the external address shown in its content.
Last line: Result: 5 signs of concern. Do not confirm or rule out a compromise from this result alone.
V2. Look at the raw logs yourself
# Run on: your computer (executes inside the server)
docker compose exec server bash -c "grep 'exited on signal' /opt/lab/training-data/var/log/php8.3-fpm.log | head -3"
docker compose exec server bash -c "grep 203.0.113.45 /opt/lab/training-data/var/log/nginx/access.log | head -5"
First command: warnings of the form child ... exited on signal 11 (SIGSEGV) after ... seconds from start repeat with their times.
Second command: in the access log, the error-response (502) lines sit right next to the times the workers exited. The basic move is matching the exit records and the request records by time.
The number at the end of a log line is the response size. The request size is nowhere.
V3. Compare with the current server check
# Run on: your computer (executes inside the server)
docker compose exec server bash -c "bash /opt/lab/tools/triage.sh | tail -8"
There are no scheduled jobs or other processes, and the last line is Result: this check found no signs. That does not mean there was no compromise.
Run without an argument, item 8 (PHP files changed in the last 14 days) lists all the sample service's files. That is because the lab files were made recently, and it is not a sign of compromise (you do not see it when you look only at the tail with tail).
When you are done, return to the starting state.
# Run on: your computer, in the lab/ folder
docker compose down && docker compose up -d
Check this · Common mistakes
Do not declare "compromised" or "not compromised" from the check result alone.
Even if you see signs, do not restart and patch first out of habit. It can erase evidence.
Do not mistake shutting down or restarting the server for isolation. The Boho Nara guidelines say to block only outside access.
Do not read clean logs as a guarantee of safety. The default log has no request size, and the log itself may be missing or deleted.
"Recently changed files," as in item 8, mean something only when compared with your deployment records. Do not call a file suspicious just because it appeared on the list.
If you find signs on a real server, do not open or run the suspicious file or the external address.
Related exercise
Exercise 5. First-pass check before restart (3-1) in exercises/exercises.md. Check the answers in exercises/exercises_solutions.md.
Sources and dates checked
Guidance to capture worker memory before restart (a secondary source quoting Google Cloud guidance), and that a package update alone does not fix running processes — Source: Tenable FAQ · Date checked: 2026-11-08
Order of response to a suspected compromise, log-checking guidance — Source: Boho Nara security notice (2026-10-22) · Date checked: 2026-11-08
Lab server output — Source: Ran it myself · Date checked: 2026-11-08
Next lesson
3-2 Backups and a Restore Rehearsal: Before the update, back up the package list, configuration, database and uploaded files, and check that you can restore from that backup.
PHP Emergency Security Response Lab: From Checking Your Server to Verifying the Patch · Information current as of 2026-11-08
Lab files, exercises and solutions are on GitHub; the link is in the external resources of Lesson 1.
In one line
Before patching, back up the list, configuration, database and uploaded files, and check that you can unpack and use them. Do not just copy the database file; use a method that makes a consistent copy, and rolling back a security patch is the last resort.
Key ideas
What to back up (for this lab server)
Package list and versions — Where on this server: php* packages · How to back it up: Save dpkg -l 'php*' | grep ^ii to a file
Configuration files — Where on this server: /etc/php, /etc/nginx · How to back it up: tar -czf
Database — Where on this server: /var/lib/lab/board.sqlite (SQLite) · How to back it up: sqlite3 ... ".backup ..."
Uploaded files — Where on this server: /var/www/app/storage/uploads · How to back it up: tar -czf
Do not just copy the database file. If you copy it while a web request is writing, you can get a file with a half-written state mixed in. SQLite's .backup command makes a consistent copy even while writes are happening. If you use MySQL, adding the option that makes a consistent copy (--single-transaction) to mysqldump does the same job. Each database type has a different method, so check the right one for your service (this lesson did not run MySQL).
The upload folder is also something to back up. The database holds only the path of an attachment, and the file itself is in the upload folder.
A backup is a backup only once you have unpacked it. That it was created and that it is usable are different things. Unpack the configuration into a temporary folder, check the database with PRAGMA integrity_check, and look at the upload archive's listing (tar -tzf).
For a restore, unpack somewhere else and check before you overwrite. Use a temporary folder (/tmp/restore) so you do not touch the configuration folders that are in use.
Do not keep backups only inside the server. This lab's backup is in /root/backup inside the server, so it disappears together with the server if the server is destroyed. In production, copy one to another storage or another computer too.
Snapshots and rolling back. On a virtual machine or cloud server, a snapshot of the whole server just before the update is the fastest way to roll back. But when you go back, the data written after that point disappears too. If one setting is the problem, roll back only that backed-up configuration file, not the whole server. Rolling back a security patch returns the server to a vulnerable state, so it is a last resort, and if you did roll back, you need the temporary mitigations (3-3) and a record.
Follow along
Preparation: start the lab server in its starting state, and put one example file in the upload folder (made-up training content).
# Run on: your computer, in the lab/ folder
docker compose down && docker compose up -d
echo "Notice attachment example (made-up training file)" > app/storage/uploads/sample-notice.txt
Every command below is run on your computer, in the lab/ folder, and docker compose exec runs it inside the server for you. -w /root/backup sets the working folder inside the server to /root/backup.
V1. Make the backup
# Run on: your computer (executes inside the server)
docker compose exec server mkdir /root/backup
docker compose exec -w /root/backup server bash -c "dpkg -l 'php*' | grep ^ii > packages-before.txt && cut -c5-70 packages-before.txt"
docker compose exec -w /root/backup server tar -czf config.tar.gz -C / etc/php etc/nginx
docker compose exec -w /root/backup server sqlite3 /var/lib/lab/board.sqlite ".backup board.sqlite"
docker compose exec -w /root/backup server tar -czf uploads.tar.gz -C /var/www/app/storage uploads
docker compose exec -w /root/backup server ls -la
Package list: the versions before the update are recorded, such as 8.3.6-0maysync1 for php8.3-* and 8.4.27-1+ubuntu24.04.1+deb.sury.org+1 for php8.4-*. This becomes the baseline you compare against after the update.
The configuration, database and upload commands print nothing when they succeed.
ls -la: there are four files, packages-before.txt, config.tar.gz, board.sqlite and uploads.tar.gz, and none is size 0. (Sizes and times differ on every run.)
V2. Unpack the backup and check it
# Run on: your computer (executes inside the server)
docker compose exec -w /root/backup server bash -c "mkdir -p /tmp/restore && tar -xzf config.tar.gz -C /tmp/restore && ls /tmp/restore/etc"
docker compose exec -w /root/backup server bash -c "diff -r /tmp/restore/etc/nginx /etc/nginx && echo same"
docker compose exec -w /root/backup server sqlite3 board.sqlite "PRAGMA integrity_check; SELECT COUNT(*) FROM notices;"
docker compose exec -w /root/backup server tar -tzf uploads.tar.gz
First command: two folders, nginx php, appear (the archive is not broken).
Second command: it prints same if the current configuration and the copy are identical. If you make the same comparison after patching, you can tell whether the update changed the configuration, and if there is a difference, you look at only that file (when there is a difference diff exits with code 1, so same is not printed).
Third command: ok and the notice count 2 (the two notices in the lab server's starting state). It opens the backup file, not the original the service uses.
Fourth command: uploads/, uploads/.gitkeep and uploads/sample-notice.txt. It only lists the contents without unpacking.
Clean up: delete the example file and return the server to its starting state.
# Run on: your computer, in the lab/ folder
rm app/storage/uploads/sample-notice.txt
docker compose down && docker compose up -d
Check this · Common mistakes
Copying the database file (board.sqlite) with cp. → If a write is in progress, a half-written state can get mixed in. Use the method the database provides, such as .backup.
Thinking you are done because the backup files were created. → Unpack them, run integrity_check and check the listing.
Archiving only the configuration and forgetting the uploaded files. → The database holds only the attachment paths, so without the files the attachments are gone.
Keeping the backup only inside the server. → If the server is destroyed, it disappears with it. Keep a copy in another storage too.
Overwriting the folders in use right away when restoring. → Unpack somewhere else first, check, and put back only what you need.
Rolling back the patch first whenever something goes wrong. → The server becomes vulnerable again. Find the cause first, and if you did roll back, keep temporary mitigations and a record.
Forgetting that going back to a snapshot also loses the data written after it.
This lab's backup contains a database with account information (only training accounts). A backup of a real server may contain personal information and password hashes, so manage who can access it and where it is kept.
Related exercise
No exercise is linked to this lesson. This lesson's "preparation before the update" record is used in the final assignment (6-3) report. Keep this lesson's backup list and check results together with the records from exercises 1, 5, 6, 7 and 9.
Sources and dates checked
This lesson cites no external documents and is based on the results of running things on the lab server myself (2026-11-08).
File sizes and times in the output differ on every run.
SQLite .backup and MySQL --single-transaction are introduced as general methods; confirm with the official documentation for your service's database type and version.
Next lesson
3-3 When You Cannot Patch Immediately: Temporary Mitigations
PHP Emergency Security Response Lab: From Checking Your Server to Verifying the Patch · Information current as of 2026-11-08
Lab files, exercises and solutions are on GitHub; the link is in the external resources of Lesson 1.
In one line
Temporary mitigation is a way to buy time when you cannot patch right away. Put the official partial mitigations in the right place (php_admin_value in the FPM pool configuration), restart all workers after a syntax check, and confirm that the values changed in the web runtime. It does not replace the patch, and after you patch, you remove the FPM mitigation block.
Key ideas
Official partial mitigations (PHP official security advisory, 2026-10-21)
memory_limit = -1 — What it does: Narrows the path of the out-of-memory vulnerability · Limit: A real allocation failure underneath can still reach the vulnerable path. A single request can use memory without end, so an outer limit is needed
Lower post_max_size, and keep upload_max_filesize smaller than it — What it does: Reduces the size of the request body that is accepted · Limit: Per the advisory: 8M if there are no uploads, 32M if needed. This lab server uses 8M/5M to suit the training app
session.upload_progress.enabled = 0 — What it does: Blocks the confirmed session path of the leftover-state-reuse vulnerability · Limit: Does not block other variants. Restart all workers after applying it
fatal_error_backtraces = 0 — What it does: PHP 8.5 only · Limit: Not applicable to this lab server (8.3)
Where you apply it matters. Put it where the application cannot change it (php.ini, php_admin_value/php_admin_flag in the FPM pool, server settings applied before the request is parsed). ini_set in code or .user.ini apply after the request has been interpreted, so the advisory says not to depend on them.
The price of unlimited memory. memory_limit=-1 removes the memory limit, so put an outer boundary beside it. On this lab server that is Docker mem_limit: 1g; on a production server a container or cgroup limit or systemd MemoryMax does the same job, and the advisory says a policy that kills only the faulty worker is good.
Do not use RLIMIT_AS or RLIMIT_DATA. The advisory warns that using them in place of a memory limit can instead cause the vulnerable allocation failures.
Reduce requests at the web server. Nginx filters requests before they reach PHP. It allows multipart only at the address where this service accepts files, rejects it elsewhere, and limits body size. The advisory says you must also block requests that have no length header, so check that separately in your environment.
Related notice (2026-10-23). The session upload progress feature was narrowed to a problem only in a specific combination where the serialization handler is changed at run time with ini_set. If you already turned it off, just keep it off.
Mitigation is not the fix. All of it is partial mitigation, and after patching you remove the FPM mitigation block, restart, and check that the values went back (you may leave the Nginx request limits in place).
Follow along
Preparation: start from the starting state in the lab/ folder (on your computer).
docker compose down && docker compose up -d
Every command is run on your computer, with docker compose exec server ... running one command at a time inside the server (in a shell inside the server, leave off the docker compose exec server part).
Check the values before applying (a command inside the server)
docker compose exec server bash -c "curl -s | tail -5"
memory_limit 128M
ini_set(memory_limit, 256M) changed (128M -> 256M)
post_max_size 8M
upload_max_filesize 2M
session.upload_progress.enabled On
Look at the lines to apply (a command inside the server)
docker compose exec server grep ^php_admin /opt/lab/mitigation/fpm-pool-mitigation.conf
Append to the end of the FPM pool configuration (a command inside the server)
docker compose exec server bash -c "cat /opt/lab/mitigation/fpm-pool-mitigation.conf >> /etc/php/8.3/fpm/pool.d/
Syntax check, then restart (commands inside the server)
docker compose exec server php-fpm8.3 -t
docker compose exec server service php8.3-fpm restart
-t prints configuration file /etc/php/8.3/fpm/php-fpm.conf test is successful at the end (the time before it differs on every run). 5. Confirm it took effect on the web (run the command from step 1 again)
memory_limit -1
ini_set(memory_limit, 256M) refused (stays -1)
post_max_size 8M
upload_max_filesize 5M
session.upload_progress.enabled Off
Apply the Nginx request limits (a command inside the server). If you send a request right after the reload, the old configuration may answer, so wait 1 second.
docker compose exec server bash -c "cp /opt/lab/mitigation/nginx-lab-limits.conf /etc/nginx/lab-limits.conf && nginx -t && service nginx reload && sleep 1"
Check the response codes (commands inside the server)
index.php 415
post.php 302
big-body 413
An address with no upload feature returns 415, an address with an upload gets the service's normal response (302), and a body over 8M gets 413.
When you are done, return to the starting state with docker compose down && docker compose up -d.
Check this · Common mistakes
Putting it in .user.ini or ini_set and stopping: It has no effect. Put it in the pool configuration or php.ini.
Restarting but not checking: That it was restarted and that the value took effect are different things. Look at the value and at the ini_set refusal in the web runtime.
Restarting without -t: With a wrong configuration, the service may not come back up.
Sending a request right after the Nginx reload: The old configuration may answer, so wait 1 second.
Blocking without knowing the allowed addresses: If you block the address that accepts uploads, normal features break. After applying, test the key features (item 5 of Exercise 6).
Applying only memory_limit=-1: Without an outer memory limit it can use the whole server's memory.
Using RLIMIT_AS/RLIMIT_DATA: Do not use them.
Mistaking mitigation for the fix: Do not put off the patch. After patching, remove the FPM mitigation block.
Temporary mitigation does not change whether you were compromised. Applying it does not mean there was no compromise.
Related exercise
Exercise 6. Applying and proving temporary mitigation (3-3) in exercises/exercises.md.
Sources and dates checked
PHP official security advisory (2026-10-21, related notice 2026-10-23) — checked 2026-11-08. The list of mitigations matches the fact sheet, and there were no new mitigation items (only the 10-23 related notice was added).
The output is the result of running it on the lab server myself. PIDs and times differ on every run.
The 8M/5M on the lab server are values chosen to suit the training app, and the advisory gives up to 32M for post_max_size if uploads are needed. For your own service, set only as much as you need.
Next lesson
4-1 Hands-On: Ubuntu Security Updates
Some command listings are not repeated here; see the downloadable PDF for the full commands.
PHP Emergency Security Response Lab: From Checking Your Server to Verifying the Patch · Information current as of 2026-11-08
Lab files, exercises and solutions are on GitHub; the link is in the external resources of Lesson 1.
In one line
An urgent update narrows its scope. Look at what will be upgraded first, upgrade only the PHP packages, and confirm the result not by the version number but by the install record and the check script. Even after the packages change, you are not done until you restart (4-2).
Key ideas
Look at the targets first. apt update only fetches the list of new versions and installs nothing. apt list --upgradable shows the packages that can be upgraded. On this lab server (starting state), the PHP 8.3 packages numbered 8 out of the total.
Narrow the scope. apt install --only-upgrade 'php8.3-*' upgrades only the php8.3-* packages that are already installed and installs nothing new. In an emergency you should change less, so that if something goes wrong the cause is easier to find. Upgrade the whole server at your regular maintenance. The ones not upgraded this time were non-PHP packages (apt, zlib1g and so on), and you plan and upgrade them at regular maintenance.
Do not look only at the version number. This server's PHP 8.3 packages are 8.3.6-0maysync1 before the update and 8.3.6-0ubuntu0.24.04.13 after. The leading 8.3.6 stays the same and the distribution revision after it changes (2-3).
Confirm by the record. In /var/log/dpkg.log you can see which package went from which version to which, with the time. package-check.sh looks for the CVE numbers of these two vulnerabilities in the package changelog and gives a verdict.
Do not assume an automatic restart. This lab server has a setting that blocks automatic service restarts during package installation, so the line invoke-rc.d: policy-rc.d denied execution of restart. appears. A real server may differ, so check yourself whether it restarted.
It is not the end. The package files on disk having changed and the running processes using the new code are different things. PHP_VERSION in the web response is 8.3.6 both before and after the patch. The next check is done in 4-2.
Follow along
Preparation: start the lab server in its starting state.
# Run on: your computer, in the lab/ folder
docker compose down && docker compose up -d
Every command below is run on your computer, in the lab/ folder, and docker compose exec server runs it inside the server for you.
V1. Look at the update targets first
# Run on: your computer (executes inside the server)
docker compose exec server apt update
docker compose exec server bash -c "apt list --upgradable 2>/dev/null | grep php"
apt update has long output and takes a few seconds. The last line says N packages can be upgraded. (the count varies by date; it was 16 in the recording, 8 of them PHP).
Second command: 8 lines appear: php8.3-cli, common, fpm, mbstring, opcache, readline, sqlite3 and xml. Each line shows 8.3.6-0ubuntu0.24.04.13 (the new version) and [upgradable from: 8.3.6-0maysync1] (the current version).
V2. Update only the PHP packages
# Run on: your computer (executes inside the server)
docker compose exec server apt install -y --only-upgrade 'php8.3-*'
Download, unpack and configure output scrolls by, and at the end you get invoke-rc.d: policy-rc.d denied execution of restart. (because of the lab server's setting).
This command upgrades the 8 PHP 8.3 packages. The service was not restarted.
V3. Confirm the result by the record
# Run on: your computer (executes inside the server)
docker compose exec server bash -c "grep ' upgrade php8.3-fpm' /var/log/dpkg.log | tail -1"
docker compose exec server bash -c "bash /opt/lab/tools/package-check.sh | grep -A5 'PHP 8.3'"
docker compose exec server bash -c "apt list --upgradable 2>/dev/null | grep -v php | cut -c1-110"
First command: one line of the form upgrade php8.3-fpm:arm64 8.3.6-0maysync1 8.3.6-0ubuntu0.24.04.13 (with the run time in front). That time is the baseline you compare the process start times against in 4-2.
Second command: CVE-2026-109618: in the changelog, CVE-2026-109619: in the changelog and Verdict: FIXED. Before the update, the same script gave "not in the changelog" and Verdict: VULNERABLE.
Third command: it shows that the other, non-PHP packages can still be upgraded. They were not put in the scope of this emergency response.
Cleanup (optional): return the server to its starting state. If you want to continue to 4-2, do not reset; keep the state where you updated but did not restart.
# Run on: your computer, in the lab/ folder
docker compose down && docker compose up -d
Check this · Common mistakes
Upgrading the whole server at once with apt upgrade. → In an emergency, narrow the scope so the cause is easy to trace. Do the full upgrade at regular maintenance.
Using apt install php8.3-* without --only-upgrade. → It can newly install packages that were not installed.
Skipping apt update before the update. → There is no list of new versions, so it says "nothing to upgrade." Make sure apt update ran to the end.
Deciding it is safe because the update finished. → The old code can keep running until you restart (4-2).
Judging whether it was applied by php -v or PHP_VERSION in the web response. → A distribution package stays at 8.3.6 (2-3).
Assuming the service restarts automatically. → The lab server blocks it, and real servers differ by environment.
Skipping the backup before the update. → Prepare the backup you made in 3-2 first.
Related exercise
The two columns "Before the update" and "After the update · before restart" of the proof-of-application table in Exercise 7, "Patch it and prove it" (4-1, 4-2), are filled in with this lesson (the package version and whether the CVEs are in the changelog). You do the remaining cells and questions through 4-2. The exercise document is exercises/exercises.md.
Sources and dates checked
This lesson cites no external documents and is based on the results of running things on the lab server myself (2026-11-08).
Package counts, versions and times vary with the date and each run.
The automatic restart behavior of an Ubuntu server was not checked in this lesson. Check it yourself on the server you use.
Next lesson
4-2 Is the New Code Really Running?
PHP Emergency Security Response Lab: From Checking Your Server to Verifying the Patch · Information current as of 2026-11-09
Lab files, exercises and solutions are on GitHub; the link is in the external resources of Lesson 1.
In one line
A package having changed is not the same as the new code running. PHP_VERSION in the web response is not evidence. Check by the process start times and the (deleted) marker on the executables, then restart and run the same check again.
Key ideas
Old code in memory. A process that was already running holds the code it read when it started, in memory. Even if the package files on disk are new, the old code can keep running until you restart.
The web response is not evidence. On this server PHP_VERSION is 8.3.6 before the update, after the update and after the restart (a distribution raises only the trailing revision number, 2-3).
Evidence 1: process start time. If a process started before the time the package was replaced (dpkg.log), it is running old code.
Evidence 2: (deleted). If a running process uses an old executable or library that has already been deleted, (deleted) is attached in /proc/<PID>/maps. This method works for updates to libraries other than PHP too.
Check again after the restart. The start times must be later than the replacement time, and there must be no (deleted) entries.
It differs by server. A reload is often used only to re-read configuration, so after a reload too, check yourself by the same method. With Apache mod_php, PHP is inside Apache, so you restart Apache. Ubuntu's documentation says that from 24.04 LTS needrestart automatically restarts the affected services by default, but whether it is installed and how it is configured must be checked server by server. This lab server does not have needrestart installed.
Follow along
Preparation: start from the state after 4-1 (updated but not restarted). To start from scratch, build that state as follows.
# Run on: your computer, in the lab/ folder
docker compose down && docker compose up -d
docker compose exec server apt update
docker compose exec server apt install -y --only-upgrade 'php8.3-*'
V1. The web response does not tell you
# Run on: your computer (executes inside the server)
docker compose exec server bash -c "curl -s | head -1"
You get PHP_VERSION 8.3.6. It is the same as before the update.
V2. Check before the restart
# Run on: your computer (executes inside the server)
docker compose exec server bash -c "bash /opt/lab/tools/restart-check.sh | cut -c1-110"
Item 1: when the packages last changed (upgrade php8.3-common ...).
Item 2: the start times of the 3 php-fpm8.3 processes are earlier than the time in item 1, and (deleted) is attached after the executable.
Item 3: the list of processes using old .so files that were deleted.
Result: Result: a restart is needed. The time values differ on every run.
V3. Restart and check again
# Run on: your computer (executes inside the server)
docker compose exec server service php8.3-fpm restart
docker compose exec server bash -c "bash /opt/lab/tools/restart-check.sh | cut -c1-110"
On a real server you use systemctl restart php8.3-fpm (this container uses service).
After the restart, the processes' start times are later than the replacement time and there is no (deleted). Item 3 shows none, and the result is Result: the running PHP processes are using the files that are installed now.
PHP_VERSION in the web response is still 8.3.6.
Cleanup (optional): docker compose down && docker compose up -d
Check this · Common mistakes
Stopping after looking only at the package version and dpkg.log. → Check the running processes too.
Judging by PHP_VERSION in the web response. → It is the same before and after the patch.
Looking only at the master process. → Look at the start times and (deleted) for all the processes.
Restarting and skipping the check. → Run the same script again and keep the result.
Assuming the service was restarted automatically. → Check whether needrestart is installed and configured on the server.
Restarting only PHP-FPM in an Apache mod_php environment. → Restart Apache.
A restart can briefly interrupt requests, so schedule a time window for it.
Related exercise
You finish the "After restart" column of the proof-of-application table in Exercise 7, "Patch it and prove it" (4-1, 4-2), along with the remaining cells and questions, in this lesson. The exercise document is exercises/exercises.md.
Sources and dates checked
Lab server output: ran it myself (2026-11-09).
Ubuntu Server documentation (automatic updates): states that from 24.04 LTS needrestart automatically restarts the affected services by default. (checked 2026-11-09)
That needrestart is installed by default on server images is covered in Canonical's security notice (the needrestart vulnerability notice): (confirmed through search results; I did not read the full original)
Next lesson
4-3 Docker: Rebuild the Image, Do Not Just Restart
PHP Emergency Security Response Lab: From Checking Your Server to Verifying the Patch · Information current as of 2026-11-10
Lab files, exercises and solutions are on GitHub; the link is in the external resources of Lesson 1.
In one line
With Docker, restarting the container does not change PHP. You have to fix the FROM version in the Dockerfile, rebuild the image (up -d --build) and replace the container for the patch to go in.
Key ideas
PHP lives inside the image. The FROM line in the Dockerfile decides which image you start from, and building produces an image. A container is that image running.
A restart turns it back on with the same image. restart only starts the same container again with the image you already built.
up -d does not rebuild the image either. It uses the image that already exists, so editing the Dockerfile changes nothing. In this lab it showed Running, and the version stayed at 8.3.35.
--build is what rebuilds the image. The container is replaced with the new image and the version becomes 8.3.36.
This is an Apache + mod_php setup. This app container's PHP_SAPI is apache2handler (PHP running directly inside Apache), which this course treats as the highest-risk setup.
Moving tags. A tag that leaves off the trailing version, such as php:8.3-apache, points at a different image when a new version comes out. When I checked on Docker Hub on 2026-11-10, 8.3-apache and 8.3.36-apache pointed at the same image (the same digest).
--pull. An image you pulled earlier may still be on your computer, so if you use a moving tag, add --pull to the build so it fetches the new image (this lab did not reproduce that separately).
Pin the digest. In production, pin the tag and, if you can, the @sha256:… digest too, so that what was deployed is on record.
Check that everything was replaced. If several containers use the same image, check that all the running ones are on the new image.
Follow along
Preparation: start from the starting state in the lab folder. The FROM in image-lab/Dockerfile is php:8.3.35-apache.
# Run on: your computer, in the lab/ folder
docker compose --profile image up -d --build image-app
V1. The version of the current image
# Run on: your computer
curl -s
You get PHP_VERSION 8.3.35 and PHP_SAPI apache2handler. It is below the fixed version (8.3.36).
V2. Edited but unchanged: restart and up -d (a common mistake)
Change FROM php:8.3.35-apache in image-lab/Dockerfile to FROM php:8.3.36-apache, save, and then
Both times it is PHP_VERSION 8.3.35. Editing the file alone does not patch anything.
V3. Rebuild the image
This time it is PHP_VERSION 8.3.36. (On the first build, downloading the new image can take a while.)
When the lab is over, change FROM back to php:8.3.35-apache.
Choosing the image (the commands shown on slide S2)
# Run on: your computer. When you use a moving tag, build while pulling the new image
docker compose build --pull
# Check the digest
docker buildx imagetools inspect php:8.3.36-apache
Cleanup (optional): docker compose --profile image down && docker compose down
Check this · Common mistakes
Editing only the Dockerfile and finishing with restart or up -d. → Rebuild the image with --build.
Trusting a moving tag and continuing to use an old image. → --pull, and pin the tag and digest.
Building a new image but not replacing the running containers. → Check the version of every container.
Exposing the version in the web response is for teaching. A production service should not expose its version.
Related exercise
Exercise 8, "Patching a Docker image" (exercise document: exercises/exercises.md). Solve item 3 (--pull) and item 4 (a FROM with a pinned digest) using the S2 content above.
Sources and dates checked
Lab server output: ran it myself (2026-11-10).
Docker Hub library/php tag list: 8.3.36-apache and 8.3-apache last updated 2026-11-06, 8.3.35-apache on 2026-10-21. (checked 2026-11-10)
Fixed version 8.3.36: the php.net advisory (2026-10-21); see the 1-1 section of the fact sheet.
The behavior of --pull was not reproduced directly this time.
Next lesson
4-4 Regression Checks: The SimpleXML Crash and Smoke Tests
Some command listings are not repeated here; see the downloadable PDF for the full commands.
PHP Emergency Security Response Lab: From Checking Your Server to Verifying the Patch · Information current as of 2026-11-10
Lab files, exercises and solutions are on GitHub; the link is in the external resources of Lesson 1.
In one line
A security patch can cause an outage too, so right after patching, run a smoke test to check the key features and the records of abnormal worker exits. This does not mean put the patch off; it means check after patching.
Key ideas
A regression case (SimpleXML). In PHP 8.4.27 and 8.5.12 (the releases that carried this security patch), a regression was reported in which code that uses SimpleXML kills the worker. According to the php-src issue record, the issue number is GH-24488, and the cause is that the GC change introduced by an earlier fix (GH-24050) and the SimpleXML free code free the same table twice. It was reported that 8.4.26 and 8.5.9 do not crash.
The fix release. The NEWS of the PHP-8.4 branch lists the fix under an 8.4.28 entry. When I checked on 2026-11-10, the latest 8.4 release on php.net was still 8.4.27 (the fix release was not out). I could not confirm a fix release for the 8.5 side. Check it yourself.
Smoke test. A short pass over the service's key features to see whether anything broke as soon as it came up.
What to check. The user flow (login and session), file and input handling (upload, download, XML import), work outside the web (the CLI batch job), and logs (records of abnormal worker exits).
Catch crashes with the log. Even if a worker dies, on screen it may look like a single error. This lab's script counts exited on signal in the FPM log at the start and end and compares them.
Do not relax just because some items pass. If you stop FPM, the CLI batch and "no abnormal worker exit" still pass (PHP unrelated to the web, and a clean stop is not a crash record). Start with the items that failed.
Note. The web PHP on this lab server is the distribution's 8.3.6 package, so it is unrelated to the regression above (8.4.27 and 8.5.12). It is used as a case study only.
Follow along
Preparation: start from the state after 4-2 (updated and restarted). Run every command in the lab/ folder on your computer.
V1. Run the smoke test
# Run on: your computer, in the lab/ folder (the script executes inside the server)
docker compose exec server bash /opt/lab/tools/smoke-test.sh
Actual output (lab server, 2026-11-10)
== Sample service check
[PASS] Home page opens
[PASS] Sign in
[PASS] Session kept (board opens while signed in)
[PASS] Post notice + attachment upload
[PASS] Attachment download (same as uploaded)
[PASS] XML import (SimpleXML, 2 items)
[PASS] CLI batch: Daily report (PHP 8.4.27, cli)
[PASS] No PHP worker crash during the check
Result: 8 passed · 0 failed
Each run registers a notice for the check and leaves the attachment file in app/storage/uploads/. If you run down && up -d on the server, the list goes back to the start, but the files in the upload folder may remain, so delete them if needed.
V2. Read the structure of the script
Open tools/smoke-test.sh in an editor.
6–9 — Content: The address (BASE), the account, the FPM log path · Where to change it for your service: The address, a check-only account, the log path
13 — Content: Counts exited on signal at the start · Where to change it for your service: The log path, the process name
17 — Content: A function that pulls the CSRF token out of the page · Where to change it for your service: The pattern, if the token name differs
24–27 — Content: Signs in with the token and account, checks the redirect address · Where to change it for your service: The login address, the input names
29–30 — Content: Opens the list with the cookie kept and checks for a sign-out link · Where to change it for your service: The text that shows you are signed in
63–65 — Content: Counts again at the end and fails if it increased · Where to change it for your service: —
V3. Make it fail on purpose
# Run on: your computer, in the lab/ folder
docker compose exec server service php8.3-fpm stop
docker compose exec server bash /opt/lab/tools/smoke-test.sh
docker compose exec server service php8.3-fpm start
docker compose exec server bash /opt/lab/tools/smoke-test.sh
Actual output with FPM stopped
== Sample service check
[FAIL] Home page (HTTP 502)
[FAIL] Sign in (redirected to: none)
[FAIL] Session kept
[FAIL] Post notice + attachment upload (redirected to: none)
[FAIL] Attachment download
[FAIL] XML import (redirected to: none)
[PASS] CLI batch: Daily report (PHP 8.4.27, cli)
[PASS] No PHP worker crash during the check
Result: 2 passed · 6 failed
When you start again, it returns to 8 passed · 0 failed.
Check this · Common mistakes
Make one check-only account for the smoke test. Do not write a real user's account and password into the script (the admin / lab-password-1234 in this lab is for training).
If you run it on a production service, check posts and files are left behind. Decide in advance how you will delete the test data.
Do not look only at the pass count; look at the reason for each failed item (the HTTP code, the redirect address).
Passing once is not the end. Repeat it right after patching and at every regular update after that.
If you suspect a regression, check the log for exited on signal first. Decide whether to roll back the patch by weighing the effect on the service, the security risk and the fix release schedule together.
Related exercise
Exercise 9. Fixing the smoke test (4-4) in exercises/exercises.md (items 1 to 4). /opt/lab/tools is read-only inside the server, so for item 3 (the coding task), copy the script to /tmp and fix it there.
Sources and dates checked
php-src issue GH-24488: (2026-11-10)
PHP-8.4 branch NEWS (the 8.4.28 entry): (2026-11-10)
php.net 8.4 release information: (2026-11-10)
Lab server output: ran it myself (2026-11-10)
Next lesson
Section 5. When You Suspect a Compromise — 5-1 Finding Signs in Logs and File Changes.
PHP Emergency Security Response Lab: From Checking Your Server to Verifying the Patch · Information current as of 2026-11-10
Lab files, exercises and solutions are on GitHub; the link is in the external resources of Lesson 1.
In one line
If you line up the access log, error log, FPM worker log and file change records by time, they become one flow of events. But that table is only "candidates to look at together"; it does not confirm a compromise.
Key ideas
Four kinds of records: ① The access log (who requested which address and what response they got; the default Nginx format has no request size) ② The error log (dropped connections between the web server and PHP) ③ The FPM worker log (abnormal worker exits) ④ Changes to files and scheduled jobs (who changed what, and when).
Lining them up by time: Records that look ordinary on their own gain meaning when they overlap at the same time. In the training case it runs: a worker exit before dawn → connection drops and 502 responses at the same time → about an hour later, a file change by the web server account → the first successful request to that file → a change to the scheduled job file.
Separate it from normal work: A file changed by the deploy account (deploy) during working hours looks like routine work, whereas a change to the code folder or crontab by the web server account (www-data) is a line to check separately. You can judge only by comparing against deployment records and change history.
Record file changes in advance: Moving or copying a file changes its modification time (in this lab too, the current modification time of thumb.php is the day the training material was copied). Collect the change records from the original state before you touch the server.
Limits: The request content (body and size) is not in the default log, and logs can be deleted or never kept. Write down separately what the table can say and what it cannot. No signs ≠ no compromise.
Published indicators of compromise (IOCs): As of 2026-11-10 the php.net advisory had no IOC list. Security vendors' material has addresses and log rules, but they differ by source and have not been cross-checked, so this lesson uses no concrete values. If you use them, check the source first and then compare.
What not to do: While checking, do not open, delete or run a suspicious file. The order of saving a copy of the records first is covered in 5-2.
Follow along
Run every command on your computer, in the lab/ folder, and docker compose exec server runs it inside the server for you. The commands in this lesson only read and do not change the server.
The training data (training-data/) is a made-up case. The IPs (203.0.113.45, 198.51.100.77, 198.51.100.23) are ranges reserved for documentation examples and are not records from a real server. records/file-changes.txt is also a made-up record.
Preparation: start from the starting state.
# Run on: your computer, in the lab/ folder
docker compose down && docker compose up -d
V1. Merge the scattered records in time order
# Run on: your computer (executes inside the server)
docker compose exec server bash /opt/lab/tools/timeline.sh /opt/lab/training-data
The actual result (14 lines)
2026-10-21 08:50 [file change] deploy changed 5 files (/var/www/app/public/index.php and others)
2026-10-21 09:00 [FPM log] FPM started
2026-10-22 02:14 [access log] 198.51.100.77 made 6 requests (6 paths, responses 200 x1, 404 x4, 403 x1)
2026-10-23 03:15 [FPM log] worker exited abnormally x7 (03:15:27~03:16:03)
2026-10-23 03:15 [Nginx error log] connection to PHP reset x7 (03:15:27~03:16:03)
2026-10-23 03:15 [access log] 203.0.113.45 made 16 requests (3 paths, responses 502 x7, 200 x9)
2026-10-24 01:08 [FPM log] worker exited abnormally x11 (01:08:37~01:09:26)
2026-10-24 01:08 [Nginx error log] connection to PHP reset x11 (01:08:37~01:09:26)
2026-10-24 01:08 [access log] 203.0.113.45 made 16 requests (3 paths, responses 502 x11, 200 x5)
2026-10-24 03:01 [FPM log] worker exited abnormally x11 (03:01:56~03:02:40)
2026-10-24 03:01 [Nginx error log] connection to PHP reset x11 (03:01:56~03:02:40)
2026-10-24 03:01 [access log] 203.0.113.45 made 15 requests (3 paths, responses 502 x11, 200 x4)
2026-10-24 03:58 [file change] www-data changed: /var/www/app/public/img/thumb.php
2026-10-24 04:02 [access log] 203.0.113.45 made 5 requests (/img/thumb.php, responses 200 x5)
2026-10-24 04:06 [file change] www-data changed: /var/spool/cron/crontabs/www-data
In the same time windows, the counts in the FPM log, the error log and the access log (7, 11, 11) interlock. The total of 29 matches the worker exit count from triage.sh in 3-1.
The access log lines gather only requests from non-browser User-Agents (the criterion in timeline.sh).
As the closing note says, this table alone does not confirm or rule out a compromise.
V2. Why you need a separate file change record
# Run on: your computer (executes inside the server)
docker compose exec server bash -c "grep www-data /opt/lab/training-data/records/file-changes.txt"
docker compose exec server ls -l --time-style=long-iso /opt/lab/training-data/var/www/app/public/img/thumb.php
docker compose exec server bash -c "grep '24/Oct/2026:04:0' /opt/lab/training-data/var/log/nginx/access.log | cut -c1-100"
First command: the two lines the web server account changed (thumb.php at 03:58:41, and the crontab at 04:06:19).
Second command: the real file's modification time is 2026-11-08 (the day the training material was copied). It is not the time of the incident.
Third command: the access record for that time window is just one line (POST /img/thumb.php, response 200). The number at the end of the line is the response size, and there is no request content.
Check this · Common mistakes
Do not compare the times of different logs without checking their time zones (this training data is all +0900).
Do not conclude it is the same event just because the times overlap. The table is a set of candidates, and you must compare it against normal work (deployments, maintenance, backups).
A file's modification time changes with copying, restoring and unpacking. Take the times you use as evidence from records you collected in advance.
Do not read clean logs as a guarantee of safety.
On a real server, do not open or run a suspicious file or an external address. Deleting comes after you have preserved a copy of the records.
Indicators of compromise (addresses, file names) in vendor material may differ by source, so check them before you compare.
Related exercise
Exercise 10. Lining up scattered records in time order (5-1) in exercises/exercises.md. Check the answers in exercises/exercises_solutions.md.
Sources and dates checked
The official advisory has no list of indicators of compromise (IOCs); fixed versions — Source: The official PHP site · Date checked: 2026-11-10
Indicators in security vendor material (they differ by source and are not cross-checked; this lesson uses no values) — Source: SOCRadar · SOC Prime (confirmed only through search result summaries) · Date checked: 2026-11-10
Lab server output (timeline.sh, change records, modification times) — Source: Ran it myself · Date checked: 2026-11-10
Next lesson
5-2 Preserving Evidence, Isolating, and Reporting: The Right Order: You learn what not to do when you suspect a compromise, the order of what to do, and whom to report to.
PHP Emergency Security Response Lab: From Checking Your Server to Verifying the Patch · Information current as of 2026-11-10
Lab files, exercises and solutions are on GitHub; the link is in the external resources of Lesson 1.
In one line
If you suspect a compromise, do not open or delete suspicious files, do not restart or reinstall the server first, and do not chase the attacker yourself. The order is "preserve evidence → isolate → report," and restarting and patching come last. Whether you must report is something to confirm with your organization's contact and the latest law.
This lesson gives general principles based on a made-up training case, and it is not legal advice. The reporting rules in this lesson are South Korea's, as used in the video, so check the rules, desks and deadlines of your own country and organization.
Key ideas
Four things not to do
Open or delete suspicious files — Opening changes their times, and deleting leaves no trace of what was there
Restart or reinstall first — Running processes and connections disappear, and a reinstall can wipe the logs too
Track down or counterattack the attacker yourself — It damages the evidence and can become a legal problem
Think you are done because you patched — Patched ≠ not compromised. A patch closes the road ahead, and what already happened has to be checked separately
The order to follow
Preserve evidence: Keep copies of the logs and changed files, and record the current state.
Isolate: Do not shut down or restart the server; only block connections coming in from outside.
Report: Tell the responsible person and security contact inside your organization first, and if it is something that must be reported, tell the designated desk.
Then patch and restart (4-1, 4-2).
Each agency writes the order differently. The Boho Nara guidelines you saw in 3-1 list isolate → report → secure evidence → remediate. What they have in common is that restarting and patching come last, after the evidence is secured.
What to keep and how
Logs (access, error, worker) — Why: They get overwritten or deleted by rotation · How: Copy whole files, leave the originals as they are
Changed files and scheduled jobs — Why: Deleting them removes the trace · How: Record the list and times; do not open suspicious files
Running processes and connections — Why: They disappear on restart · How: Save the output on screen now
Account and configuration status — Why: If you change them you will not know the original state · How: Record them before changing
What I did — Why: To tell my work apart from the attacker's traces · How: Record the time, the person and the command
Work on copies and leave the originals untouched.
How to capture memory itself is outside this lesson's scope. If it looks necessary, ask a specialist firm to preserve it.
When you record a time, write the server's time zone with it (5-1).
Isolating is not switching off
If you shut down the server, the evidence in memory is lost. Isolation means cutting the connection to the outside.
Examples of ways: block access with a firewall / take this server out of the load balancer / separate the network in the hosting or cloud console. It differs by environment.
Isolating stops or reduces the service. Do not decide alone on the maintenance notice or on which server takes over; decide with the responsible person.
Whom to tell
Inside — The responsible person in the organization, the security contact, the privacy contact. Tell them first and do not handle it alone
Whoever lends you the service — The hosting company, the cloud vendor, the development and operations contractor. Their records may be needed to clarify the incident
Outside: reporting desks — A compromise → Boho Nara (Korea Internet and Security Agency) / a leak of personal information → the personal information leak report. They are two different reports, filed separately
Reporting criteria and deadlines (South Korea, checked 2026-11-10)
Leak of personal information — Deadline: Within 72 hours of learning of the leak · Criteria and desk: One of: 1,000 people or more / sensitive or unique identification information leaked / leaked through illegal access from outside → file a leak report (receiving agency: Korea Internet and Security Agency). Basis: Personal Information Protection Act Article 34, Enforcement Decree Article 40
A compromise such as hacking — Deadline: Differs by source: the Korea Internet and Security Agency's guidance page says "immediately," other sources say within 24 hours · Criteria and desk: Information and communications service providers and so on → Boho Nara
Finance, public sector and so on — Deadline: Separate · Criteria and desk: The guidance of the authority in charge (for example, financial institutions follow the Financial Supervisory Service guidance)
This lesson does not assert a deadline for compromise reporting. It says to report as soon as you learn of it, without delay.
Whether your organization is subject to reporting (whether it is an information and communications service provider, a personal information handler and so on) differs by organization, and laws change. Confirm with your organization's contact and the latest law (the national law information center).
The deadline for notifying the data subjects (the users) is not covered in this lesson. If you need it, see the Personal Information Protection Commission guidance.
What to put in the report
When you learned of it: Deadlines are counted from when you learned of it, so write the time you learned.
What you saw: Which signs you saw in which records, only what you saw.
What you did: Evidence preservation and isolation, in time order.
What you do not know yet: If whether it was a compromise or the extent of damage is not settled, write it as it is. Do not write what you do not know as if you knew it.
Follow along
This is a slides lesson, so there are no commands to follow. Fill in the checklist below for your own server (or a made-up case). On the lab server do it only as practice, and on a production server do not open suspicious files or connect to external addresses.
0 — Item: The time you learned of it (with time zone)
1 — Item: Where the logs to preserve are, and where to put the copies
1 — Item: The list of changed files and scheduled jobs, and the output of running processes and connections
1 — Item: Account and configuration status before changing
2 — Item: The isolation method (firewall, load balancer, console), its effect on the service, and who decides
3 — Item: Who to report to inside (responsible person, security, privacy)
3 — Item: Contacts at the hosting, cloud and contractor firms
3 — Item: Judging whether it must be reported (confirm with the contact and the latest law)
4 — Item: A record of what I did (time, person, command)
Check this · Common mistakes
Opening or deleting a suspicious file in a hurry → Do not open it; record only the list and times, and deleting comes after you have preserved a copy.
Restarting, reinstalling or patching before keeping evidence → The order is evidence → isolate → report → patch.
Understanding isolation as "turning the server off" → Switching it off loses the evidence in memory. Cut the connection.
Judging and handling it alone → Tell the responsible person first.
Investigating or connecting to the other side's address yourself → Do not.
Thinking of the personal information leak report and the compromise report as one → File each separately.
Not writing down the time you learned of it → The deadline is counted from when you learned.
Reading "patched" as "not compromised" → They are different.
Using this material as legal advice → Confirm whether you must report, and the deadline, with your organization's contact and the latest law.
Related exercise
There is no exercise dedicated to 5-2. Related exercises
Item 5 of Exercise 10. Lining up scattered records in time order (5-1) (records not in the table, and how to keep them in advance) connects to this lesson's evidence preservation.
In the report for the 6-3 final assignment, you write the four "What to put in the report" items above.
Sources and dates checked
Personal information leak report: 72 hours, three reporting criteria, the receiving agency — Source: Personal Information Protection Commission · Date checked: 2026-11-10
The personal information leak report and the compromise report are filed separately; the compromise reporting desk (Boho Nara) — Source: Korea Internet and Security Agency · Date checked: 2026-11-10
The compromise reporting deadline differs by source (the guidance page above says "immediately," some sources say 24 hours) — Source: Search result summaries (I could not check the original text of the law myself) · Date checked: 2026-11-10
Differences in how the order of evidence, isolation and reporting is written — Source: The 3-1 study guide (Boho Nara guidelines) · Date checked: 2026-11-10
Next lesson
5-3 Rebuild vs. Patch, and Rotating Secrets: You learn when a patch is not enough, the criteria for deciding on a rebuild, and which secrets to rotate.
PHP Emergency Security Response Lab: From Checking Your Server to Verifying the Patch · Information current as of 2026-11-10
Lab files, exercises and solutions are on GitHub; the link is in the external resources of Lesson 1.
In one line
If there were signs, the patch is only the beginning. If there are signs you cannot explain, assume a compromise, rebuild in a new environment, make a list of the secrets that server could read, and rotate all of them.
The decision criteria in this lesson are not guidance from the official PHP advisory but general incident-response principles. The php.net advisory and GHSA-w8hw-w9fx-j79w (CVE-2026-109618) contain no rebuild or secret-rotation guidance, and the only follow-up they list is to "restart all PHP workers and check that no finite memory_limit was restored" (checked 2026-11-10). This lesson did not verify any real compromise case or what kinds of secrets leaked, and does not assert any.
Key ideas
Three questions: ① Is the patch enough (were there signs, and how far did it spread)? ② Do we need to rebuild the server? ③ What do we rotate?
Three branches
No signs → patch, restart the workers, confirm it took effect, check for regressions. Keep watching the records afterwards (no signs ≠ no compromise).
Signs present + cause unknown → treat it as a possible compromise and prepare to rebuild and rotate. Separate out changes that are explained by normal deployments and maintenance.
Compromise confirmed → do not trust that server; rebuild and rotate secrets.
Why a patch alone is not enough: ① A patch only closes the door and does not clear out what already came in. ② If it was remote code execution, assume the code ran with the privileges the PHP worker has, and that the files and settings those privileges could read may have been exposed. ③ There is no guarantee you found everything left behind (changed files, scheduled jobs and settings can be scattered).
Criteria for deciding on a rebuild
No signs · patch and restart confirmed — Patch + watch the records
Signs present · cause not explained — Assume a compromise → prepare to rebuild and rotate
The web server account changed files or scheduled jobs — Rebuild + rotate secrets
Administrator privileges on the server are suspected — Rebuild + rotate all secrets
Before rebuilding, keep copies of the evidence first (5-2), because building anew makes the original server's evidence disappear. Starting from a known clean state is easier to verify than deleting only the suspicious files and continuing to use the server.
Three principles of rebuilding: ① A new environment (a new server or new image on the patched version; do not repair and reuse the compromised server). ② Deploy the code again from a trustworthy source such as the repository or deployment records (do not copy the files on the server as they are). ③ Inspect uploaded files and the database and move over only what you need (if you use a backup, check that it is from before the compromise, and use the restore rehearsal order from 3-2).
Secrets to rotate (criterion: everything that server could read)
Database passwords — Why it is a target: They are in the app's configuration file · Action: A new password, changed on both the app and the database
API keys and tokens — Why it is a target: Used for calls to external services · Action: Revoke at the issuer and reissue, and check the usage records
Session keys and app secret values — Why it is a target: They protect the signed-in state · Action: Generate new ones (all users are signed out, so tell them in advance)
Certificate private keys — Why it is a target: Stored on the server · Action: Reissue the certificate
SSH keys and deploy keys — Why it is a target: Usable from that server · Action: Revoke and use new keys
Administrator account passwords — Why it is a target: The server handles them at login · Action: Change them
Order of rotation: ① Start with a list of every secret that was in the server, the app configuration, environment variables and deployment tools. ② Create new values in the new environment (do not create new secrets on the compromised server, and revoke the old values after the switch is done). ③ Check after rotating (that access with the old secret is blocked and that external services show no unfamiliar usage).
Follow along
This lesson is slides only, so there are no demo commands. Below is a checking framework you can use on a real server (an order, not commands).
Keep copies of the evidence (5-2).
Decide: find the row for your situation in the rebuild decision table above.
Make the list of secrets (the kind, where it is stored, who issued it, how to rotate it, the effect of rotating it).
Build a new environment (a new server or new image) on the patched version.
Deploy the code from the source, and move the data over after inspecting it.
Create new secrets in the new environment, apply them and switch over.
Revoke the old values, and check that access with the old secrets is blocked and look at the usage records of external services.
Check this · Common mistakes
Do not decide you are done because you patched when there were signs.
Do not delete only the suspicious files and keep using the server. You cannot know what other paths are left.
Do not change only passwords and leave the keys, tokens, certificate private keys and SSH keys as they are. Change everything on the list without gaps.
Do not create new secrets on the compromised server.
Changing the session key signs all users out. Tell them the effect in advance.
Preserve evidence before rebuilding.
These decisions are general principles, so if you have legal reporting duties or your organization's response procedure, follow those standards too (the reporting order is in 5-2).
Related exercise
None (a slides-only lesson). Practice finding signs of compromise is Exercise 10 (5-1) in exercises/exercises.md, and the order of checks before restart is Exercise 5 (3-1). Check the answers in exercises/exercises_solutions.md.
Sources and dates checked
No rebuild or secret-rotation guidance in the official advisory; the follow-up is to restart workers and check memory_limit — Source: The official PHP site · · Date checked: 2026-11-10
Remote code execution (no authentication needed); fixed versions 8.5.12, 8.4.27, 8.3.36, 8.2.35 — Source: The official PHP site · Date checked: 2026-11-10
Rebuild and rotation decisions — Source: General incident-response principles (not official guidance) · Date checked: —
Next lesson
6-1 EOL Management and an Upgrade Roadmap: You learn how to manage versions whose support is ending and how to upgrade them.
PHP Emergency Security Response Lab: From Checking Your Server to Verifying the Patch · Information current as of 2026-11-10
Lab files, exercises and solutions are on GitHub; the link is in the external resources of Lesson 1.
In one line
Check the support period in the official support table, and before support ends, move in the order inventory → test → switch one at a time. Security support for PHP 8.2 ends on 2026-12-31.
Key ideas
1. The supported versions table (php.net, checked 2026-11-10)
Each branch gets two years of active support plus two years of security support.
8.2 — First released: 2022-12-08 · End of active support: 2024-12-31 (ended) · End of security support: 2026-12-31
8.3 — First released: 2023-11-23 · End of active support: 2025-12-31 (ended) · End of security support: 2027-12-31
8.4 — First released: 2024-11-21 · End of active support: 2026-12-31 · End of security support: 2028-12-31
8.5 — First released: 2025-11-20 · End of active support: 2027-12-31 · End of security support: 2029-12-31
PHP 8.6: It is not in the support table yet. At the time of checking, 8.6.0 RC5 (a release candidate) was published, and the development schedule lists the general release for 2026-11-19. Schedules can change.
Active support = bug and security fixes; security support = security fixes only.
2. What it means when support ends
Even when a new vulnerability is published, no official fixed version comes out. That is what happened to 8.1 and earlier in this incident.
It does not mean you are broken into right away; it means that when a vulnerability is published, upgrading is the only way to stop it.
In this incident, 7.4, 8.0 and 8.1 got no official release but source backport branches were provided (you must build from source). For 5.4 to 7.3 there was no fix (Tenable's summary, a secondary source).
Exception: when a distribution or long-term-support (LTS) vendor fixes its own package separately. Then check that vendor's support period and changelog (reading backports in 2-3).
3. Which version to move to
8.5 — The first candidate if you are moving now. It has the longest support among released versions
8.4 — A realistic choice. When your app or extensions do not yet support 8.5
8.6 — Not yet generally released. For production servers, consider it after the general release and after you check app and extension support
8.3 — Supported now, but security support ends 2027-12-31. Treat it as an intermediate step
4. The order of an upgrade
Inventory: The PHP version of each server, the extensions in use, and the PHP versions your app and framework support.
Test environment: Run the app on the new version and check for errors. Refer to the official migration guide (the migration documents in the php.net manual).
Switch one at a time: Do not change everything at once, and prepare a way back (the previous image, package and configuration backup).
Check: That the new code is really running (the checks from 3-1 to 4-2) and that web requests show no regression (4-4).
Follow along: make your server inventory
This is a slides lesson with no demo. Below are example commands for making the inventory, and they are not output run in this lesson.
# Inside the server: command-line (CLI) PHP version and extensions
php -v
php -m
# Inside the server: installed PHP-related packages (Debian and Ubuntu family)
dpkg -l | grep -i php
Note: The command-line PHP and the PHP that handles web requests can differ (2-2). Check the version the web uses through the web server and FPM configuration and a real request.
Organize the results in a per-server table: server name / web PHP version / end-of-support date / versions the app supports / planned migration time.
Check this · Common mistakes
Starting right before the end date: Testing and fixing take time, so start several months before the end. For 8.2 the date is 2026-12-31.
Going straight to a production server with no testing: You only find changed behavior by running it.
The old version is left behind: If you do not check which version the web server uses, the old version can keep handling requests.
Judging only from the support table: A distribution package follows that distribution's support period. This lesson did not check the period for each distribution.
Related exercise
There is no exercise directly linked to this lesson. The assignment is to make a server inventory table for your own environment.
Sources and dates checked
Supported versions table (schedule for 8.2 to 8.5) — Date checked: 2026-11-10
8.6.0 RC5 · general release planned 2026-11-19 — Source: · · Date checked: 2026-11-10
Response for 8.1 and earlier (backport branches · no fix) — Source: The php.net security advisory (2026-10-21) · Tenable summary (secondary source) · Date checked: 2026-11-08
Next lesson
6-2 Following Advisories and a Regular Patching Routine: You learn where to subscribe to advisories and how to run regular patching.
PHP Emergency Security Response Lab: From Checking Your Server to Verifying the Patch · Information current as of 2026-11-10
Lab files, exercises and solutions are on GitHub; the link is in the external resources of Lesson 1.
In one line
Subscribe to just a few advisories that fit your environment, know the scope and limits of automatic security updates, and once a month confirm they were applied with a checklist.
The monthly checklist and the patch deadline criteria are this lesson's suggestions, not official guidance. If your organization has a policy, follow it.
Key ideas
1. Where to subscribe (you do not need all of them)
PHP official announcements — What it tells you: New releases (including security releases) · How to receive it: The php-announce mailing list (very low volume, moderated, no web archive) · the release Atom feed `
php-src security advisories — What it tells you: Vulnerability advisories and severity · How to receive it: The Security Advisories list of GitHub php/php-src
Ubuntu Security Notices (USN) — What it tells you: Whether the fix has come into your package · How to receive it: The ubuntu-security-announce mailing list · RSS · Atom
CISA KEV — What it tells you: Vulnerabilities already confirmed as exploited · How to receive it: Email alerts · CSV · JSON (I could not confirm a KEV-specific RSS)
Subscribing to php-announce: send a mail to the subscribe address shown on the PHP mailing lists page, and the subscription is complete only when you follow the instructions in the confirmation mail that comes back. To unsubscribe, send from the address you subscribed with to the matching unsubscribe address.
The php.net mailing list page describes php-announce as "announcements of new PHP releases" and does not separately cover security advisories. Security releases are also marked in the release information (tags: security).
Start with what applies to your operating system and PHP. If you subscribe to too many, you stop reading them.
2. Three questions when an advisory arrives
Does it apply to my server?: Decide by looking at the version, how it runs and the distribution's records (2-3).
Is a fix out?: Where to check differs for an official version / a distribution package / an image.
Is it already being exploited?: If exploitation is confirmed, bring the schedule forward, and even if not, apply within a deadline you set in advance.
3. What automatic security updates (Ubuntu unattended-upgrades) do
Default targets: the release's base and the -security repositories (ESM where applicable). -updates, -proposed and -backports are commented out in the default settings.
Third-party repositories (PPAs and so on) become targets only if you add them to Allowed-Origins yourself.
It runs once a day by default (APT::Periodic::Update-Package-Lists and APT::Periodic::Unattended-Upgrade default to "1").
Automatic reboot Unattended-Upgrade::Automatic-Reboot defaults to false.
Configuration files: /etc/apt/apt.conf.d/50unattended-upgrades (behavior) and /etc/apt/apt.conf.d/20auto-upgrades (enabling and interval). Logs: /var/log/unattended-upgrades/.
4. The limits of automatic updates
Out of scope: Repositories you added yourself, a PHP you built yourself, and the PHP inside a Docker image are not targets of this feature (for an image, rebuild it, 4-3). (The documentation does not mention Docker directly; this follows from the repository scope.)
Confirming it was applied is separate: The Ubuntu documentation explains that from 24.04 needrestart automatically restarts the affected services by default, but it can differ by environment settings, so even after an update finishes, check yourself that the new code is running (4-2: compare the worker start times with the update time). This course's lab server is in a state where it does not restart automatically (policy-rc.d) and differs from a real server.
Regressions: Because things are applied automatically, regressions can come in automatically too. Check the logs and run a smoke test after updates (4-4).
Follow along
This lesson is slides only, so there is no recorded demo. Below are example commands you can use for the check, and there is no output newly run on the lab server in this lesson. Each command is of the same kind as those covered in earlier lessons.
Monthly checklist (a suggestion)
1. Subscribed advisories — Was there any news related to my servers?
2. Security fixes applied — Package version and changelog (2-3)
3. Workers restarted — Is the start time after the update? (4-2)
4. Automatic update log — Are there no failures or deferrals?
5. End-of-support versions — Is the version I use not about to end? (6-1)
6. Backups and smoke test — Restore test and key-feature check (3-2, 4-4)
Reference commands (inside the server, with log locations per the documentation above)
ls -l /var/log/unattended-upgrades/
cat /etc/apt/apt.conf.d/20auto-upgrades
Check this · Common mistakes
Do not turn on automatic updates and forget about them. Turning it on is different from proving it was applied.
Do not subscribe to so many advisories that you read none; choose a small number that fit your environment.
Set the patch deadlines in advance (by whether exploitation is confirmed and by severity). The deadline values themselves are for your organization to set.
Do not assume a service restart happens automatically.
Related exercise
None (a slides-only lesson). Item 3 of the checklist (confirming worker restarts) connects to Exercise 7 (4-1, 4-2) in exercises/exercises.md, and the smoke test in item 6 connects to Exercise 9 (4-4). Check the answers in exercises/exercises_solutions.md.
Sources and dates checked
How to subscribe to php-announce — Date checked: 2026-11-10
Release Atom feed, security tag — Source: · · Date checked: 2026-11-10
The php-src security advisories list — Date checked: 2026-11-10
Subscribing to Ubuntu security notices — Date checked: 2026-11-10
CISA KEV alerts and files — Date checked: 2026-11-10
Default behavior of automatic security updates — Date checked: 2026-11-10
Monthly checklist and deadlines — Source: This lesson's suggestion (not official guidance) · Date checked: —
Next lesson
6-3 Final Assignment: A Check, Fix and Verify Report: You combine the checking, remediation and verification you have learned into a single report.
PHP Emergency Security Response Lab: From Checking Your Server to Verifying the Patch · Information current as of 2026-11-10
Lab files, exercises and solutions are on GitHub; the link is in the external resources of Lesson 1.
In one line
Bundle the checking, remediation and verification you have done into a one-page report with six sections, each backed by evidence.
The report format and the "criteria for a good report" are not an official standard but this lesson's suggestion. If your organization has a required reporting format, follow that, and use this format as a checklist so you do not leave anything out.
Key ideas
1. The six sections of the report
1. Summary — What to write: Conclusion · whether affected · remediation status · The lessons that give the evidence: All
2. Target — What to write: Server name · how the PHP that handles web requests runs · The lessons that give the evidence: 2-2
3. Check results — What to write: The verdict and its evidence (including the distribution's records) · The lessons that give the evidence: 2-3 · 2-4
4. Remediation — What to write: Preparation · changes · limits of any temporary mitigation · The lessons that give the evidence: 3-2 · 3-3 · 4-1
5. Verification — What to write: Evidence of the new code · smoke test · The lessons that give the evidence: 4-2 · 4-4
6. Remaining risk — What to write: What you could not confirm · next steps · deadlines · The lessons that give the evidence: 5-1 · 5-3 · 6-1
2. How to write the evidence
Separate what you saw from what you assume: What you confirmed from command output is fact; mark everything else as "assumption."
Where and when you ran it: Your own computer or inside the server, and the time you ran it. The same command gives different results depending on where it runs (2-2).
Quote only the key lines of output, verbatim: Do not rewrite or dress them up in a summary.
3. Criteria for a good report (this lesson's suggestion)
Keep "patched" and "not compromised" apart: A patch only reduces future risk; it is not evidence that nothing already happened.
Do not write temporary mitigation as if it were the fix: Write the mitigated state, its limits, and the deadline for replacing it with the formal patch (3-3).
Do not hide what you could not confirm: A report that says "could not confirm" is more trustworthy.
Follow along
This lesson is slides only, so there is no recorded demo and no newly run commands. You write the report yourself in the order below.
Gather the records you kept from exercises 1, 5, 6, 7, 9 and 10 ("Next steps" in exercises/exercises.md).
Copy the report template (Appendix A at the end of this guide, or exercises/6-3_report_template.md in the repository) and fill it in with the details of your server (for the lab server, a name like web01).
Attach the evidence (the key lines of command output) to each section, and for each command write your computer / inside the server and the time.
Check against the "Before you submit" checklist in the same file.
Compare with the example report (Appendix B, or exercises/6-3_example_report.md) to see that no section is missing. Do not copy the example; fill yours with your own output.
A note on the example report: The example is a made-up training case, and the server name, times, versions and results are all examples. It is not output from a real run, and the IPs are ranges reserved for documentation examples. In your own report, write only the real output that you ran.
Check this · Common mistakes
If you write only the result and leave out the evidence, the next person cannot check it again.
Mask output that shows passwords, tokens or personal information (●●●●). Apart from the training account in this course, do not let any of them appear on screen.
Rather than not writing until it is perfect, write what you confirmed first and leave the gaps as "could not confirm."
Whether a compromise notification or report is needed differs by organization. This format has only a "confirm with the contact and the latest law" row and does not write a reporting deadline (5-2).
Not finding signs in the records you checked does not mean there was no compromise.
Related exercise
The records from Exercise 1 (1-1), 5 (3-1), 6 (3-3), 7 (4-1 and 4-2), 9 (4-4) and 10 (5-1) in exercises/exercises.md are the material for the report. This lesson's final assignment is to bundle those records onto the one-page template above, and there is no separate answer (the example report is a reference for the format).
Sources and dates checked
The report format and the criteria for a good report — Source: This lesson's suggestion (not official guidance) · Date checked: —
Fixed versions and advisory date (background of the example) — Source: The 1-1 record: · Date checked: 2026-11-08
Reporting deadlines — Source: They differ by source, so none is asserted (see the 5-2 record) · Date checked: 2026-11-10
The server and figures in the example report — Source: A made-up case (not run results) · Date checked: —
Next lesson
This lesson completes the main part of the course. Write a report yourself by filling in the template for your own server.
Appendix A. Report template
PHP Security Update Response Report (Template)
Write it to fit on one page. Delete the 〔 〕 in each cell and fill in the details of your own server. For command output, paste only the key lines, verbatim, and mask anything that shows a password, token or personal information (●●●●). Mark what you confirmed from output as fact, and mark everything else (assumption).
Report name — 〔e.g. Response to the PHP security advisory (2026-10-21)〕
Author · date written — 〔name〕 · 〔YYYY-MM-DD〕
Information current as of — 〔the date you checked the advisory and package information〕
1. Summary
Conclusion: 〔Affected / Not affected / Could not decide〕
Remediation status: 〔Done / Under temporary mitigation / Not remediated〕
One-line description: 〔e.g. Verdict made, patch applied, confirmed the new code is running. Whether there was a compromise needs separate checking〕
2. Target
Server name / role — Content: 〔〕 · Command and place used to check: —
Operating system — Content: 〔〕 · Command and place used to check: 〔command · your computer / inside the server〕
How the PHP that handles web requests runs — Content: 〔mod_php / FPM / container …〕 · Command and place used to check: 〔command · place〕 (2-2)
Command-line (CLI) PHP version — Content: 〔〕 · Command and place used to check: 〔command · place〕
3. Check results
Installed package version — Result: 〔〕 · Evidence (key lines of output · time): 〔〕
Whether the distribution changelog includes the fix — Result: 〔Yes / No / Could not confirm〕 · Evidence (key lines of output · time): 〔〕 (2-3)
Verdict — Result: 〔Affected / Not affected / Could not decide〕 · Evidence (key lines of output · time): 〔which source the verdict was based on〕 (2-4)
Signs seen in the first-pass check — Result: 〔Present / None found in the records checked〕 · Evidence (key lines of output · time): 〔〕 (3-1)
4. Remediation
Write them in time order.
〔〕 — What I did: Preparation before the update (copies of configuration, database and uploads; restore test) · Where I ran it: 〔〕 · Result: 〔〕 (3-2)
〔〕 — What I did: 〔Package update / image rebuild〕 · Where I ran it: 〔〕 · Result: 〔〕 (4-1, 4-3)
〔〕 — What I did: 〔Service restart〕 · Where I ran it: 〔〕 · Result: 〔〕
If you used a temporary mitigation: 〔what you applied and where / its limits / the deadline for replacing it with the formal patch〕 (3-3)
5. Verification
Is the worker (process) start time after the update? — Result: 〔〕 · Evidence: 〔〕 (4-2)
Is the code that answers web requests the new code? — Result: 〔〕 · Evidence: 〔〕
Smoke test — Result: 〔passed n / failed n〕 · Evidence: 〔the failing lines, if any〕 (4-4)
6. Remaining risk and next steps
What I could not confirm — Content: 〔e.g. a period with no records kept〕 · Owner · deadline: 〔〕
Whether there was a compromise — Content: 〔even if you found no signs, do not write "no compromise"〕 · Owner · deadline: 〔〕 (5-1)
Whether a report or notification is needed — Content: 〔confirm with your organization's contact and the latest law〕 · Owner · deadline: 〔〕 (5-2)
Rotating secrets — Content: 〔whether it is needed and what〕 · Owner · deadline: 〔〕 (5-3)
Preparing for end of support — Content: 〔the end-of-support date of the version you use and the migration plan〕 · Owner · deadline: 〔〕 (6-1)
Next regular check — Content: 〔the next date on the monthly checklist〕 · Owner · deadline: 〔〕 (6-2)
Before you submit
[ ] Every conclusion has its evidence (the key lines of command output) next to it.
[ ] For each command I wrote where (your computer / inside the server) and when I ran it.
[ ] I did not mix up "patched" and "not compromised."
[ ] I did not write a temporary mitigation as if it were the fix.
[ ] What I could not confirm is written as "could not confirm."
[ ] I masked passwords, tokens and personal information.
Appendix B. Example report
PHP Security Update Response Report (Example)
This is a made-up training case. The server name, times, versions and results are all examples, and are not output from a real run. The command output is shortened to show the format, and on your own server you must paste the real output you ran. The IPs are ranges reserved for documentation examples (198.51.100.x).
Report name — Response to the PHP security advisory (2026-10-21) — training server web01
Author · date written — Example owner · 2026-11-10
Information current as of — 2026-11-10 (php.net advisory, Ubuntu package changelog)
1. Summary
Conclusion: Affected (verdict)
Remediation status: Done (package update · worker restart)
One-line description: The web PHP was judged to be in the affected range, so after making copies before the update I upgraded the packages and restarted the workers, and confirmed that the new code is running and the smoke test passes. I found no signs of compromise in the records I checked, but there is a period with no records, so I do not settle whether there was a compromise.
2. Target
Server name / role — Content: web01 · internal notice board (made-up training) · Command and place used to check: —
Operating system — Content: Ubuntu 24.04 · Command and place used to check: cat /etc/os-release · inside the server
How the PHP that handles web requests runs — Content: Nginx + PHP-FPM · Command and place used to check: ps -ef | grep [p]hp-fpm · inside the server (2-2)
Command-line (CLI) PHP version — Content: Can differ from the web PHP, so not used for the verdict · Command and place used to check: php -v · inside the server
3. Check results
Installed package version — Result: The package version before the update (example: 8.3.6-0ubuntu0.24.04.x) · Evidence (key lines of output · time): dpkg -l php8.3-fpm · inside the server · 10:02
Whether the distribution changelog includes the fix — Result: Included in the candidate version (confirmed) · Evidence (key lines of output · time): The lines in the apt changelog output that contain both vulnerability numbers · inside the server · 10:05 (2-3)
Verdict — Result: Affected — the web PHP is FPM, and the installed version's changelog does not have the fix · Evidence (key lines of output · time): The two lines above (2-4)
Signs seen in the first-pass check — Result: None found in the records checked · Evidence (key lines of output · time): Checked the access log, FPM log and file change records · 10:20 (3-1)
PHP_VERSION in the web response can be the same before and after the patch, so it was not used as evidence for the verdict.
4. Remediation
10:30 — What I did: Made copies of the configuration, database and uploads, and tested a restore by unpacking elsewhere · Where I ran it: Inside the server · Result: Unpacking succeeded, database integrity check ok (3-2)
10:50 — What I did: Package update · Where I ran it: Inside the server · Result: New package version installed (example) (4-1)
10:55 — What I did: Restarted the PHP-FPM service · Where I ran it: Inside the server · Result: Started normally
Temporary mitigation: Not used. (If it had been, write the place applied, its limits and the deadline for the formal patch here.)
5. Verification
Is the worker start time after the update? — Result: Yes — the master process start time is later than the package install time · Evidence: Compared ps -o lstart with dpkg.log · 10:58 (4-2)
(deleted) marker on the executable — Result: None · Evidence: ls -l /proc/<pid>/exe · 10:58
Smoke test — Result: All items passed (example: passed 7 / failed 0) · Evidence: The result line of smoke-test.sh · 11:02 (4-4)
6. Remaining risk and next steps
What I could not confirm — Content: There is a period (example: the last 3 days) in which the access log was not kept · Owner · deadline: Infrastructure owner · log retention setting by 11-17
Whether there was a compromise — Content: I found no signs in the records I checked, but I do not settle it as "no compromise." I will strengthen the file change records and check again · Owner · deadline: Security owner · 11-17 (5-1)
Whether a report or notification is needed — Content: There were no signs, so I did not treat it as reportable, but it must be confirmed with the organization's contact and the latest law · Owner · deadline: Information security owner · 11-12 (5-2)
Rotating secrets — Content: Not rotated because there were no signs of compromise. If a compromise is confirmed, consider rotating the database password and session key · Owner · deadline: Security owner · when it arises (5-3)
Preparing for end of support — Content: Check the end-of-support date of the version in use and make a migration plan · Owner · deadline: Infrastructure owner · 11-30 (6-1)
Next regular check — Content: The next date on the monthly checklist (6-2) · Owner · deadline: Infrastructure owner · 12-10
How to read it: what this example keeps to
The conclusion (affected, remediation done) is at the top, and each section below has its evidence.
It keeps "not found in the records checked" apart from "no compromise."
What could not be confirmed (the log gap) is written in the remaining risk section.
It records where (inside the server) and when (the time) each thing was run.
PHP Emergency Security Response Lab: From Checking Your Server to Verifying the Patch · Information current as of 2026-11-10
Lab files, exercises and solutions are on GitHub; the link is in the external resources of Lesson 1.
In one line
If you cannot touch the server yourself, first find out who does the patching, then ask the hosting company whether it was applied, which version, when, what the change record says and whether it was restarted, and read their answer as evidence.
The inquiry template is not an official form but this lesson's suggestion. This lesson is slides only, so there is no output newly run on the lab server.
Key ideas
1. Who patches differs by environment
Shared hosting — Who patches: The hosting company · What you do: Confirm whether it was applied by asking
Virtual or dedicated server — Who patches: You · What you do: Patch, restart and verify with the methods in sections 2 to 4
A server with Plesk or cPanel installed — Who patches: You (updating the tool) · What you do: Check separately the PHP the tool uses and the PHP your sites use
An example from an overseas hosting company's notice (Namecheap status notice, 2026-10-21 to 22): the company had finished installing on its shared hosting servers, and for VPS and dedicated server customers it told them to update themselves. This does not evaluate any particular company; it is one example of such a notice.
For Plesk, I could not check the original support document (KB 44397729587351) (access was refused). The point about "checking the panel's own PHP and the PHP for sites separately" rests on secondary material (a blog summary in search results), so confirm the actual update procedure and build numbers in Plesk's official documentation.
For cPanel (EasyApache 4), I checked the change log: on 2026-10-21 the fixes for the two vulnerabilities were applied to ea-php74 to 85. For 82 to 85 the official versions went up (8.2.35, 8.3.36, 8.4.27, 8.5.12), and 74, 80 and 81 were recorded as "backport, no version number change."
2. Do not judge by the version number alone
The number can stay the same and still be fixed: Old branches are sometimes fixed by backport. The cPanel record above is an example, and the overseas hosting company's notice also said that the first urgent patch did not change the version number, so it could look unpatched. Do not assume unpatched just because the number is low; ask for evidence (the change record) (2-3).
8.1 and earlier are versions whose regular support has ended. Even if this fix went in, there is no guarantee that later security updates will keep coming, so consider moving to a newer version. A news report on Korean hosting companies' notices also said older environments need to move to a newer version.
The version in the control panel may not be the whole story: Several PHPs may be installed, so check the version your own site actually uses (2-2).
Follow along: a template for inquiring with your hosting company
Paste it as is into the customer center or inquiry board and fill in only the [ ].
I am using [domain / account / service plan name].
Regarding the two PHP security vulnerabilities published on October 21, 2026 (CVE-2026-109618, CVE-2026-109619), I would like to confirm the following.
1. Has the fix for the two vulnerabilities been applied to the server my service runs on?
2. Please tell me the PHP version that was applied and the date and time it was applied.
3. If the version number is unchanged, please tell me the evidence that the fix was included (such as a change record).
4. Has the web service (the PHP handler) been restarted so that it runs the new code?
5. If the PHP version I use ([ ]) is an end-of-support version, please tell me how to switch and what to watch out for (backups, whether data gets deleted).
These questions are this lesson's suggestion, and what a company can answer differs by company.
Question 4 comes from the point in 4-2 that if the package is only replaced and not restarted, the old code can keep running.
How to read the answers (a suggestion)
A one-line "It is safe" — Not enough evidence → ask again for the version, time and record
Gives the version, date and change record — There is evidence → check that it is the server your account uses
"We have received your request" — Received ≠ patch done → get a separate notice of completion
No mention of a restart — Ask once more whether it took effect
What you can do yourself
Keep your apps, plugins and themes up to date and check your administrator passwords. According to a news report on Korean hosting companies' notices, the hosting companies stated a principle that they do not modify customers' source code on their own.
Always back up before changing the PHP version. According to the same report, some plans warn that changing the PHP version can delete server data, databases and backup files (this differs by plan, so check the terms and notices). After switching, check that the main screens, login and board work normally.
Watch for what you are able to see of unusual signs: PHP files you do not recognize, and file modification times that suddenly changed.
If you see signs of compromise
These are general principles. No signs does not mean no compromise (on shared hosting, the logs you can see are limited).
Do not delete or edit the suspicious file; first tell the hosting company and ask them to preserve the logs.
After that, follow the order of 5-2 (preserve → isolate → report, with patching and restarting last).
Confirm with your organization's contact and the latest law whether it must be reported (this is not legal advice).
Check this · Common mistakes
Not asking and just waiting, thinking "the hosting company must have handled it."
Reading "received" as "patch done."
Assuming unpatched just because the version number is low, or assuming safe just because it is high (the evidence is the change record and the time it was applied).
Looking only at the version in the control panel and not checking the PHP your site actually uses.
Changing the PHP version without a backup.
Related exercise
None (a slides-only lesson with no lab material). The inquiry template above is this lesson's exercise. Practice reading the evidence for a verdict connects to Exercise 3 (2-3) and Exercise 4 (2-4) in exercises/exercises.md. Check the answers in exercises/exercises_solutions.md.
Sources and dates checked
cPanel EasyApache 4 change log (I could not read the later part) — Date checked: 2026-11-10
An example notice from an overseas hosting company — Date checked: 2026-11-10
A news article on Korean hosting notices (checked through a web summary) — Date checked: 2026-11-10
Plesk support document — Source: (access refused, original not checked) · Date checked: 2026-11-10
The inquiry template and how to read answers — Source: This lesson's suggestion (not official guidance) · Date checked: —
Next lesson
Appendix B How Apache mod_php Environments Differ: You find out how an environment that uses PHP through the Apache module differs.
PHP Emergency Security Response Lab: From Checking Your Server to Verifying the Patch · Information current as of 2026-11-10
Lab files, exercises and solutions are on GitHub; the link is in the external resources of Lesson 1.
In one line
mod_php is a setup where PHP sits inside Apache as a module. Confirm that your server is this setup using PHP_SAPI in the web response, the Apache module list and the process list, and after patching, restart Apache rather than PHP-FPM and confirm that the new code is running.
Key ideas
The place where requests are handled differs. In a PHP-FPM setup, a web server such as Nginx receives the request and hands it to a separately running FPM process. With mod_php, PHP is loaded into Apache as a module, so the Apache process runs the PHP code directly.
The php.net advisory sees the highest risk in mod_php. Every installation that handles web requests (PHP-FPM, Apache mod_php, php-cgi, FrankenPHP, LiteSpeed) is a target, and among them the advisory describes a demonstration for mod_php in which an unauthenticated request triggered the attack before the application code ran.
If PHP_SAPI is apache2handler, PHP is running inside Apache.
prefork. The Apache in this lab image uses mpm_prefork_module. In it, one process handles one request at a time.
Patching means the module file (libphp.so) becoming the new version. The Apache processes that are already running may still use the old module, so finishing a mod_php server means restarting Apache and confirming the new code is running (the same principle as 4-2). With Docker, it is rebuilding the image rather than restarting (4-3).
Follow along
Preparation: start from the starting state in the lab folder, and bring up the official-image container used in 4-3.
# Run on: your computer, in the lab/ folder
docker compose down && docker compose up -d
docker compose --profile image up -d --build image-app
V1. The PHP module is loaded in Apache
# Run on: your computer
curl -s
# Run on: your computer (executes inside the container)
docker compose --profile image exec image-app apache2ctl -M 2>&1 | grep -i "php\|mpm"
The first command gives PHP_VERSION 8.3.35 and PHP_SAPI apache2handler.
The second command gives mpm_prefork_module (shared) and php_module (shared).
V2. There is no separately running PHP process
# Run on: your computer (executes inside the container)
docker compose --profile image exec image-app ps -eo pid,user,comm
You see only apache2. The top one (PID 1) is the parent started by root, and the rest are child processes of the www-data account. The PHP code runs inside these child processes, and this container has no php-fpm process. PIDs differ on every run.
V3. The file PHP is loaded from
# Run on: your computer (executes inside the container)
docker compose --profile image exec image-app cat /etc/apache2/mods-enabled/php.load
One line appears: LoadModule php_module /usr/lib/apache2/modules/libphp.so. Apache loads the PHP module from this shared file.
Cleanup (optional): docker compose --profile image down && docker compose down
Check this · Common mistakes
Judging a mod_php server by php -v (the command-line PHP). → Confirm with PHP_SAPI in the web response and the Apache module list (1-1, 2-2).
Upgrading only the packages and not restarting Apache. → After the restart, check by the process start times that the new code is running (4-2).
The command names in this lesson are for Debian-family images (apache2ctl). Depending on the distribution, the name may differ, such as apachectl or httpd.
This lab is a single Docker image. On a real server the Apache and PHP setup may have different module names and paths, so check by the same method yourself.
Related exercise
None (there is no exercise dedicated to B in the exercise document). Together with Exercise 8 of 4-3, try checking these three commands in the same container.
Sources and dates checked
Lab server output: ran it myself (2026-11-10).
php.net advisory (the at-risk targets and the mod_php risk level): (checked 2026-11-10)
The need to restart Apache applies the principle from 4-2 and was not newly confirmed in the official Apache documentation.
Next lesson
6-3 Final Assignment (A Check, Fix and Verify Report)
You read the PHP security advisory. Now what? Is your server actually affected, and is it really fixed once you have patched it?
Applying an update takes a few commands. The hard part comes before and after it. Is php -v showing 8.3.6 on a server that is already fixed? Is the PHP in your terminal the same PHP that answers web requests? You upgraded the package, but is the process running right now still the old code?
This course walks you through one complete sequence: judge, check and back up, patch, then prove the new code is running. You practice every step on a disposable Docker lab on your own computer, so nothing you try can touch a real server.
What you will learn
Read an official PHP advisory and pull out what matters: affected versions, fixed versions and mitigations
Find the PHP that really handles web requests (CLI, FPM, Apache mod_php, Docker, hosting panels)
Read distribution changelogs to tell a backported fix from a vulnerable build, even when the version number looks old
Check for early signs of compromise and preserve evidence before you restart anything
Back up and rehearse a restore, then apply temporary mitigations when you cannot patch right away
Patch Ubuntu and rebuild Docker images, then confirm that the running processes use the new code
Run smoke tests so a security patch does not quietly break your application
Build a routine for end-of-life versions, advisory subscriptions and a final check-fix-verify report
How the course works
Most lessons are short, focused demos you can pause and repeat in the lab. Each lesson ends with a clear takeaway, and downloadable practice material is included. The course starts with the concepts, then moves into hands-on work, and closes with what to do when you suspect a compromise.
Who this course is for
PHP developers and small-team server administrators who run PHP sites but are not security specialists
Anyone who can read an advisory but gets stuck on "how do I check this on my own server?"
Not for teams that already have dedicated security staff and an automated patching pipeline.
Requirements
Basic Linux command-line skills
Docker Desktop (free) to follow the lab on your own computer
Information in this course is current as of November 8, 2026. Always check the official PHP announcements for the latest details.