When a critical PHP vulnerability is discovered, identifying every potentially affected application across hundreds or thousands of repositories becomes a major security challenge. PHP versions can be declared in Dockerfiles, CI/CD workflows, Kubernetes manifests, and dependency configurations. Some applications also run prebuilt images or operating-system packages that hide the actual runtime version.
Manually checking every repository is slow and unreliable. Automated PHP version scanning helps security teams build a repository-wide inventory, identify suspicious versions, and prioritize the applications that need attention.
Why PHP Security Scanning Matters
On October 21, 2026, the PHP project released security updates for two critical vulnerabilities, CVE-2026-109618 and CVE-2026-109619. Both carry a CVSS score of 9.2 and can allow unauthenticated remote code execution. The vulnerabilities affect PHP installations serving web requests, including PHP-FPM and Apache with mod_php.
The fixed versions are:
| PHP branch | Fixed version |
|---|---|
| PHP 8.5 | 8.5.12 |
| PHP 8.4 | 8.4.27 |
| PHP 8.3 | 8.3.36 |
| PHP 8.2 | 8.2.35 |
Earlier versions in these branches need investigation and updating. PHP 8.1 and older do not receive regular upstream security updates, although some vendors provide backported fixes.
For older installations, check the relevant vendor advisory rather than relying only on the upstream version number. See the official PHP security announcement and CERT-EU advisory.
1. Scan Thousands of Repositories Automatically
Searching only for PHP image declarations in Dockerfiles misses version references in CI workflows, Compose files, Kubernetes manifests, and other configuration files.
A community-built tool, php2shell-repo-audit, helps automate this inventory. It scans supported files in individual repositories or across a GitHub organization and groups findings into categories such as Action Required, Check Manually, and Declared at or Above the Fixed Version.
To generate an organization-wide Markdown report, run:
npx php2shell-repo-audit@0.1.1 --org YOUR_ORG --markdown > php-audit.md
The tool requires Node.js 20 or newer. For private repositories, configure a GitHub token with read access to the required repository contents and metadata.
The report helps teams locate PHP version declarations without opening repositories individually. However, it reads the default branch, skips archived repositories and forks by default, and can inspect only repositories accessible to its credentials. For very large repositories, check whether the scan completed successfully and whether any file listings were truncated.
The project is community-maintained, so review its source code, permissions, and detection limitations before incorporating it into your security process.
2. Why Finding a PHP Version Is Not Enough
A version declaration does not always prove which PHP build is running in production.
Consider three common situations:
- Pinned image: A Dockerfile explicitly references an affected PHP release. If that image is deployed, it needs to be updated, rebuilt, and redeployed.
- Floating image tag: An image such as
php:8.3-fpmdoes not pin a specific patch version. A newer upstream image does not automatically update containers that were already built. - Operating-system package: A package such as
php8.3-fpmmay include vendor-backported security fixes even when its displayed upstream version looks older.
Composer requirements create another potential source of confusion. A requirement in composer.json describes application compatibility; it does not prove which PHP version runs in production.
A useful audit report should therefore separate findings into three groups:
| Finding | What it means |
|---|---|
| Action required | An affected version or unsupported branch needs remediation |
| Check manually | The actual build or security status cannot be established from the declaration |
| Declared fixed | The declaration meets the fixed-version threshold, but the deployed runtime remains unverified |
This approach helps reduce false conclusions and gives teams a clearer remediation queue.
3. Verify the Runtime and Prioritize Remediation
Repository scanning tells you where PHP versions are declared. It does not prove what is running on live servers.
For high-priority findings, verify the deployed image, installed package, and PHP runtime used by the web server. The command-line PHP version may differ from the version serving web requests, and an updated image tag does not mean a production container has been recreated.
Prioritize internet-facing production applications first, particularly those running affected PHP builds. Then investigate CI environments, internal services, and development systems.
For distribution packages, consult the vendor's security advisory to confirm whether a fix has been backported. For containerized applications, rebuild and redeploy affected images, then verify the running deployment rather than relying on the source configuration alone.
There is also a separate follow-up to consider: on October 23, 2026, PHP published an informational advisory about a rare, configuration-dependent remote-code-execution path involving session upload progress. That issue requires configuration review in affected setups; a repository version inventory alone cannot verify it. Check the official PHP archive for the current mitigation guidance.
4. Make PHP Auditing Part of CI/CD
A one-time scan is useful during a security incident, but recurring audits help detect outdated declarations before they become urgent problems.
Run the inventory regularly and after important PHP security announcements. Track each finding with its repository, declared version, deployment status, and remediation owner. Add automated checks to CI/CD where appropriate, and keep the fixed-version data current as new security releases appear.
Most importantly, treat scan results as the starting point for investigation—not as proof that an application is secure.
Conclusion
Finding vulnerable PHP versions across thousands of repositories requires more than searching for version strings. Automated repository scanning helps reveal outdated declarations, while contextual analysis identifies findings that need further verification.
The strongest approach combines organization-wide discovery, accurate vulnerability classification, deployed-runtime verification, and repeatable security checks. A repository audit shows where to investigate; validating the actual runtime establishes what needs to be fixed.



