ResourcesBlog
You Cannot Patch What You Forgot: PHP2Shell, LiteLLM, and Governance
Two failures on October 21, 2026 made the same gap public. One hid in a language runtime. One hid in a trusted release. Governance means you can prove what runs, what version, and what you fixed.
Leonard EsereReading time 6 min
Filed underPHP2ShellLiteLLMgovernanceNIST 800-53supply chain
- CVE-2026-109618 and CVE-2026-109619 let strangers run code before your PHP app code starts. Patch to 8.5.12, 8.4.27, 8.3.36, or 8.2.35.
- LiteLLM 1.107.0 shipped a credential stealer in its wheels and Docker images. The source code looked cleaner than the artifact people ran.
- Governance means four current maps: runtimes, packages and images, secrets, and data flows.
- Patch day ends with proof: old and new versions, restart time, scan result, image digest, and the dated list of rotated secrets.
Your site can look patched on paper and stay open in real life. That gap opens when nobody can list what actually runs it. Two failures on October 21, 2026 made that gap public. One hid inside a language runtime. One hid inside a trusted software release.
What is PHP2Shell, in plain words?
PHP runs a huge share of public websites. WordPress sites are one common example. Vendor portals and old internal tools count too. The flaws sit in PHP itself, not your code. RCE means remote code execution. It means a stranger runs code on your server.
CVE-2026-109618 breaks when PHP runs out of memory mid request. It leaves request data half built, then cleans it up. Cleanup treats that bad data as if it were real.
CVE-2026-109619 keeps state from one request too long. Its memory is freed, but later requests may use it. That path can leak memory and run code too.
Both flaws run before your app code starts. A login page cannot stop either one.
How do you fix PHP2Shell?
Update to PHP 8.5.12, 8.4.27, 8.3.36, or 8.2.35. Restart every PHP worker after the update. Rebuild every container image that ships PHP.
On PHP 8.1 or older, move to a supported line. A vendor backport is a bridge, not a home. No setting or firewall rule fully fixes this.
The Cybersecurity and Infrastructure Security Agency, or CISA, says patch now. Read the CISA alert for the full patch order. CISA says take unpatched public systems offline if needed.
Then hunt for signs that someone got there first. Look for very large form posts in your logs. Look for memory errors at request start. Look for PHP workers starting shells or downloads.
What happened to LiteLLM?
LiteLLM is a proxy that routes app requests to AI providers. One proxy can hold keys for many providers. That makes it a vault and a target at once.
Version 1.107.0 shipped with a credential stealer. It also shipped with a loader for remote code. Three files landed in the root of site-packages. Their names were cook.pth, cook.py, and sitecustomize.py. Python runs those files each time it starts. Your app never has to import LiteLLM for harm.
The source code did not tell the whole story. The shipped wheels held files the source lacked. A clean code review could miss this attack.
LiteLLM says stolen GitHub tokens drove the release. One account started the release run. Another account approved that same release. That is a control failure, not bad luck.
This incident has no CVE number of its own. The release itself was hijacked, not just the code. The bad Docker tags went past 1.107.0 alone. Latest, main-latest, and main-stable pointed there too. Floating tags mean you may not know you took it.
What do you do if you ran LiteLLM 1.107.0?
Treat any host that ran it as compromised. This is an incident, not a normal upgrade. Rebuild the host or image from a clean base. Pin LiteLLM to 1.106.2, and pin Docker by digest.
Rotate every secret that host could reach. That means cloud keys and provider keys. It also means build secrets and login keys.
Check for the /tmp/.pc_once marker files. Check for /tmp/remote_code_loader.lock as well.
Older LiteLLM flaws add one more reason to move. SQL is the language apps use to query databases. CVE-2026-42208 is a SQL injection in the key check path. The National Vulnerability Database, or NVD, holds that record. CISA lists that flaw as known exploited.
Why is this a governance problem?
Governance is not a binder on a shelf. It is a true map of how work really runs. You cannot govern a system you only half know.
You need four maps, and each must stay current. The runtime map lists languages and server versions. The dependency map lists packages, images, and digests. The secret map lists keys and what each key opens. The data map lists what data flows through daily. It also names who owns each hard call.
If any map is a guess, governance is a guess.
Which compliance rules does this touch?
NIST is the National Institute of Standards and Technology. Its control catalog is NIST SP 800-53 Revision 5.
Inventory is control CM-8 in that catalog. In NIST 800-171, it is practice 3.4.1. Flaw repair is control SI-2 and practice 3.14.1. Scanning is control RA-5 and practice 3.11.2. Change control is CM-3 and practice 3.4.3. Supply chain checks live in the SR control family. Incident work is control IR-4 and practice 3.6.1.
Your System Security Plan, or SSP, tells the system story. Your Plan of Action and Milestones, or POA&M, lists open gaps. An old PHP server belongs on the POA&M list. It needs an owner, a date, and a real plan.
Defense work adds one hard clock on top. DFARS is the Defense Federal Acquisition Regulation Supplement. Its clause 252.204-7012 can require a report in 72 hours. It also requires keeping images and logs for 90 days. You cannot meet that clock without the four maps.
What proof should you keep after patch day?
Patch day ends with proof, not hope. Keep the old version and the new version. Keep the restart time and the scan after it. Keep the image digest you now run in production. Keep the list of secrets you rotated, with dates. That set of records is the real audit trail.
PolicyCortex does not patch PHP or clean LiteLLM hosts. That limit is worth saying out loud. The habit behind it is what transfers. PolicyCortex collects evidence from live Azure configuration and ties each control to the setting that met it. That is the same habit these incidents demand. Proof from the system itself, not from memory.
Update, October 22, 2026
The LiteLLM compromise got worse after the first disclosure. Wiz observed the attacker validating stolen AWS instance role credentials about 4.5 hours after exfiltration. The attacker then listed Amazon Bedrock models and enumerated IAM. IAM is identity and access management. Wiz calls the pattern consistent with LLMjacking. That means stolen AI access reused for the attacker's own workloads.
JFrog's researchers found the detail that breaks the old playbook. The malicious code lived only in the compiled wheel. The wheel is the binary artifact that pip installs. The source tarball and the public GitHub repo stayed clean the whole time. A team that reviewed the code and scanned the diff could still have installed the backdoor. The thing they audited and the thing they ran were never the same artifact.
Datadog's security research confirms this is the second supply chain compromise of LiteLLM in 2026. The first hit versions 1.82.7 and 1.82.8. It was linked to TeamPCP activity. No connection between the two incidents has been established.
If you ran 1.107.0, assume the keys it could reach are burned. Rotate cloud, CI/CD, SSH, and AI provider keys. Pin to 1.106.2. Rebuild images from a clean base. These steps were in the original article. The update adds urgency, not new steps.
Update, October 27, 2026
The Cybersecurity and Infrastructure Security Agency (CISA) added both PHP flaws to its Known Exploited Vulnerabilities catalog on October 26, 2026. The catalog lists flaws that attackers are actively exploiting. The two records are CVE-2026-109618 and CVE-2026-109619. Federal agencies face a due date of October 29, 2026 under Binding Operational Directive 26-04. That directive also expects forensic triage, a check for compromise before or during patching. The patches are unchanged: 8.5.12, 8.4.27, 8.3.36, and 8.2.35. CISA does not state a victim count in this alert. It does not attribute the flaws to ransomware use in this alert. The lesson from the original article still holds. A catalog listing moves patching from planned work to urgent work. Proof after patching matters more, not less.
Update, October 29, 2026
CISA added a related Linux kernel flaw to the KEV catalog on October 28, 2026. The record is CVE-2026-46300. CISA states the flaw chains with CVE-2026-109618 and CVE-2026-109619 to plant webshells and run commands as root. Palo Alto Networks reported active exploitation of the PHP flaws on internet exposed management interfaces.
Linux kernel Fragnesia flaw joins the exploited list
Sources
- CVE record, CVE-2026-109618, CVE Program. https://www.cve.org/CVERecord?id=CVE-2026-109618
- CVE record, CVE-2026-109619, CVE Program. https://www.cve.org/CVERecord?id=CVE-2026-109619
- Critical Vulnerabilities in PHP Require Immediate Patching, CISA, October 21, 2026. https://www.cisa.gov/news-events/alerts/2026/10/21/critical-vulnerabilities-php-require-immediate-patching
- CISA Adds Two Known Exploited Vulnerabilities to Catalog, CISA, October 26, 2026. https://www.cisa.gov/news-events/alerts/2026/10/26/cisa-adds-two-known-exploited-vulnerabilities-catalog
- CVE-2026-42208 record, National Vulnerability Database, NIST. https://nvd.nist.gov/vuln/detail/CVE-2026-42208
- LiteLLM Compromised, Steals Credentials, Wiz, October 21, 2026. https://www.wiz.io/blog/litellm-compromised-steals-credentials
- LiteLLM PyPI Package and Docker Images Compromised, Socket. https://socket.dev/blog/litellm-compromise
- LiteLLM supply chain compromise: What you need to know, Datadog Security Labs, October 21, 2026. https://securitylabs.datadoghq.com/articles/litellm-compromised-pypi-docker/
- LiteLLM Was Compromised Twice: What an AI Gateway Holds, Offgrid Studio, October 2026. https://offgridstudio.app/blog/litellm-compromised-what-an-ai-gateway-holds
- NIST SP 800-53 Revision 5, Security and Privacy Controls. https://doi.org/10.6028/NIST.SP.800-53r5
- DFARS 252.204-7012 requirements summary, Koop. https://www.koop.ai/blog/dfars-252-204-7012-requirements
- What is PHP2Shell?
- Two flaws in PHP itself, CVE-2026-109618 and CVE-2026-109619. Both can give an attacker remote code execution before any application code runs. Fixed versions are PHP 8.5.12, 8.4.27, 8.3.36, and 8.2.35.
- Does LiteLLM 1.107.0 have a CVE number?
- No. The release itself was hijacked through stolen GitHub tokens. It is a supply chain incident, not a coded flaw with its own CVE. An older LiteLLM flaw, CVE-2026-42208, is a SQL injection on the CISA known exploited list.
- Why is this a compliance issue?
- The same work maps to inventory (CM-8, 3.4.1), flaw repair (SI-2, 3.14.1), scanning (RA-5, 3.11.2), supply chain (SR family), and incident response (IR-4, 3.6.1). If covered defense information is hit, DFARS 252.204-7012 can start a 72 hour reporting clock.
Related records
Guides and articles describe the work. The evidence that work produces is described in three proof pages, the architecture page, and the two pages on authorization.
- proof.state
- Proof of State. What the environment was, as of a date someone else picks: point-in-time records, content hashed and chained.
- proof.change
- Proof of Change. Who or what altered the environment, under what authority, with before and after state hashes.
- proof.agency
- Proof of Agency. What a machine was permitted to do before it acted, what it did, and what would have stopped it.
- architecture
- Architecture. How the chain is built and where the evidence is stored in each delivery mode.
- authorization
- Continuous ATO. How an authorizing official's decision is recorded with its package, and how the authorized system is checked against it every hour.
- baseline
- NIST SP 800-53. The Low, Moderate and High baselines as evidence, with the SSP, SAR and POA&M generated from one record.
Further reading in this register
- cPGuard Update Channel Compromise: Malicious Script in Updates 5.88.12 to 5.88.19A compromised update channel sent a malicious script to cPGuard servers. Update to 5.88.25 or later, check the indicators, and rotate exposed secrets.
- XCPE Firmware Backdoor: 1.3 Million Devices Enrolled Before TakedownGoogle and partners dismantled a firmware backdoor on more than 1.3 million Android devices. The backdoor survives on the boxes, so disconnect and discard, do not trust a reset.
- Cursor Marketplace Carried a Tampered Claude Code UpdateA tampered Claude Code update reached Cursor users on October 29, 2026. It added an attacker key and tried to open remote access.
Verify the record this entry describes.
- Published
- Last updated
- Unchanged since publication
- Author
- Leonard Esere