← Resources
Article
Saturday, October 24, 2026•7 min•🇬🇧🇫🇷

Black October: PHP flaws, stolen secrets, and what it means for AI agents

PHP2Shell and the Railway incident (October 2026): what the Black October cluster changes for securing AI agents, SaaS API secrets, and HDS environments.

The Vibe Company mascot places glowing digital API keys into a locked vault in a secure server room

In mid-October 2026, two stories hit tech press and X at once: critical flaws in the PHP engine (PHP2Shell), and a Railway security incident that led the platform to urge secret rotation. The cluster quickly picked up the nickname Black October. For a company shipping AI, the real question isn't generic cybersecurity. It's how you secure an AI agent when legacy runtimes and SaaS API keys become attack surfaces.

This is not legal advice and not an incident-response playbook. For your case, talk to your security lead, your DPO, or a specialized partner.

Black October in one screen

PHP2Shell: flaws in the PHP core

On October 21, 2026, PHP shipped patches for two critical vulnerabilities known as PHP2Shell: CVE-2026-109618 and CVE-2026-109619. According to Wiz Research, these are memory-safety issues in the PHP engine itself. Wiz shows unauthenticated remote code execution on representative deployments (WordPress, Drupal, Joomla), and process-memory disclosure that can expose passwords, tokens, or API keys. Severity reaches CVSS 9.2.

The PHP Foundation announced fixed releases: PHP 8.5.12, 8.4.27, 8.3.36, and 8.2.35. CISA urged organizations to patch immediately and noted that PHP installations serving web requests (Apache mod_php, PHP-FPM, php-cgi, and others) are in scope.

In France, CERT-FR published alert CERTFR-2026-ALE-014, and Cybermalveillance.gouv.fr issued an AlerteCyber on October 22, 2026. PHP 8.1 and older are end of life: no patch, migrate or isolate.

Railway incident: secrets and AI provider keys

In parallel, Railway published a preliminary report on a security incident around October 20-22, 2026. According to that report, a malicious actor gained unauthorized access to a subset of Railway internal systems. Suspected intent: obtain AI provider API keys. Railway states that at most 1.85% of workspaces may have had environment variables potentially compromised. The platform recommends that all customers who stored secrets before October 21 rotate them. TechCrunch and BleepingComputer covered the rotation call.

Two facts, one lesson for AI teams: patch the runtime on one side, govern secrets on the other. A well-designed agent isn't enough if the keys it uses sit in a broad env, or if a neighboring PHP app is still unpatched.

The real risk for a company shipping AI

Many companies now run two stacks side by side:

  1. Legacy web: WordPress, Drupal, PHP intranet, years-old business tools. PHP2Shell shows the flaw can sit in the language, not only in a plugin.
  2. Agent layer: copilots, support agents, pipelines calling OpenAI, Anthropic, OpenRouter, or other APIs, with secrets in environment variables, CI, and PaaS dashboards.

The risks cross. Memory disclosure on PHP can expose tokens. A PaaS incident can expose the same keys your agent uses to read the CRM or write a ticket. And an over-privileged agent turns a stolen key into action: send mail, edit a record, call an internal API.

This isn't abstract. As soon as an agent moves from "summarize" to "execute", the surface changes. We map that ladder in French in Le vrai risque des agents IA, c'est l'autorité. For the broader business frame, see AI agents for business.

French SMBs that still run an unmaintained PHP site or back office, and at the same time wire an agent to SaaS keys, stack both exposures. Black October put both issues on the same week.

TVC grid: read, propose, prepare, execute (and secrets out of agent context)

To secure an AI agent, start by classifying what it is allowed to do:

LevelWhat the agent doesMain risk if secrets leak
ReadSearch, summarize, compareLeak of data visible in context
ProposeDraft, recommend a planBad recommendation, no external effect
PrepareOpen a PR, stage an email ready to sendEasy validation, near-immediate effect
ExecuteSend, modify, deploy, call an APIReal impact, sometimes irreversible

Three concrete rules we apply at The Vibe Company:

  1. Secrets out of agent context. The agent must not "see" the API key in clear text in its prompt or logs. Calls go through a backend or vault that injects the secret at HTTP time, not into the system message.
  2. Least privilege per level. A read-mode agent doesn't get the same scopes as an execute-mode agent. Separate service accounts, separate scopes, expiration.
  3. Human validation before irreversible actions. Mail send, CRM write, deploy, payment: stay in "prepare" until logs, quotas, and a kill switch exist.

Black October doesn't change this grid. It makes it urgent. If SaaS keys can leak through a PaaS or a legacy runtime, a wide execute-mode agent becomes the multiplier.

France: HDS and sensitive data

When the data is health data, secrets and agents sit in a stricter frame. HDS certification covers hosting of health data. We explain it in AI and health data in France: what HDS really means.

Important, and we say it plainly: The Vibe Company is not "HDS-certified". At Monka, the client was already HDS-hosted. We built the caregiver app, nurse CRM, and clinical engine inside the client's HDS environment. No data left it. That's the model we recommend: build in the client's compliant environment. Don't claim the certification yourself.

For an agent that touches patient records or clinical assessments:

  • prompts, logs, and embeddings stay inside the HDS perimeter;
  • model calls do not go to a consumer API with clear health data;
  • API secrets stay in the client's vault, not in the agent chat;
  • agent rights stay at read / propose until business validation is defined.

48-hour checklist after Black October

Do this within two days if you have a PHP web stack, agents, or both:

  1. Inventory PHP. Production versions, internet-facing first. Target 8.5.12 / 8.4.27 / 8.3.36 / 8.2.35 by branch. EOL versions: isolate and plan migration (CERT-FR / Cybermalveillance).
  2. Patch or mitigate. Follow PHP bulletins and CERT-FR temporary measures if the patch is not immediate.
  3. Map agent secrets. OpenAI, Anthropic, CRM, mail, ticketing, registries: where they live (PaaS, CI, .env, vault).
  4. Rotate. If you stored secrets on Railway before October 21, 2026, follow their report: revoke and reissue. Same logic for any PaaS where sensitive env vars were present.
  5. Reduce agent authority. Reclassify every workflow as read / propose / prepare / execute. Cut automatic execution where human validation was missing.
  6. Pull secrets out of context. Confirm no key appears in prompts, LangSmith/PostHog traces, debug tickets, or screenshots.
  7. Health data. If health data is in play: review flows with the HDS guide and your DPO. Do not improvise a model call outside a covered environment.

FAQ

Does Black October only affect PHP?

No. PHP2Shell is a web-runtime issue. The Railway incident is a secrets / platform issue. Together they hit companies that run both legacy stacks and AI agents.

Should we stop all agents?

No. Bound them. A read-and-propose agent with server-side secret injection stays useful. The danger is wide execution with overly powerful keys.

Is The Vibe Company HDS-certified?

No. We build inside the client's HDS environment when that is the case, as with Monka. Certification stays with the host / the client.

Where are the official PHP patches?

On php.net and in the PHP Foundation post. French relays: CERTFR-2026-ALE-014 and Cybermalveillance.

Need an AI agent architecture audit?

The Vibe Company is an AI agency in Paris (YC, Quivr pivot). We help teams ship useful agents into secure production: authority, secrets, observability, and HDS framing when the data requires it.

Book an agent architecture / secure production audit →

Keep Reading
The Vibe Company mascot and three client team members assembling a mechanical assistant together on a workbench, with a city at dusk behind them
Next🇬🇧

Working with an AI development agency: project stages

Working with an AI development agency: what to prepare, the five stages to production, who does what, and the warning signs that a project is drifting.

Read article→