fix-php-vuln
Use when the user asks to fix, patch or upgrade a PHP vulnerability (e.g. 'Please fix my PHP vulnerability'), PHP2Shell, CVE-2026-109618 or CVE-2026-109619…
от CognitionAI★ 42 звезды на GitHub
Установить fix-php-vuln в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Fix PHP vulnerability (PHP2Shell, CVE-2026-109618 / CVE-2026-109619)
Overview
Find and fix PHP runtimes affected by PHP2Shell: two critical (CVSS v4 9.2) unauthenticated RCEs fixed on 2026-10-21 in 8.2.35, 8.3.36, 8.4.27 and 8.5.12. PHP 8.1 and older are affected too and get no releases, only source backports. PHP says every web-serving SAPI is at risk (mod_php highest, plus FPM, php-cgi, FrankenPHP and LiteSpeed). Treat the built-in php -S server as exposed too, and flag it as not meant for production. Inventory read-only first. Wait for approval before editing. Patch each approved repo to a fixed vendor build, verify the built artifact, and open focused PRs. Upgrading is the only complete fix.
What's Needed From User
- Repos or org to scan. Default: every repo connected to Devin.
- Approval of which discovered repos to patch, and of any minor/major upgrade, base-OS change or likely app-code change.
- Registry, package-mirror and CI access needed to verify targets and run builds.
Procedure
- Search all accessible repos read-only with the git host's code search before cloning (if there is none, which is common on GitHub Enterprise Server and self-managed GitLab, shallow-clone and
rg -n --hidden --glob '!.git'). Look for:php:images and other PHP base images.php*OS packages (apt/apk/dnf),setup-phpCI steps, and PHP source downloads/./configurebuilds.- Helm, Kustomize, Terraform/Packer, and Ansible/Chef/Puppet code that installs PHP.
composer.json/composer.lockand*.phpas usage signals.- The repo's test command and code the target minor is known to break (e.g. for 8.2: undeclared/dynamic properties,
${}interpolation,utf8_encode), so the gate can show upgrade risk.
- Produce one inventory table: repo, file:line, signal, current version, channel (official image, distro package, source build, managed platform), exact/floating/digest pin, SAPI, internet exposure if discernible, test coverage (none, thin, suite), and confidence. List repos you could not search separately.
- Mark each entry fixed, vulnerable, or unknown. For distro and managed-platform builds, check the vendor's package changelog or advisory for both CVEs. Never compare
php -vwith upstream numbers to decide this. - Stop. Show the table and ask which repos to patch. Ask in the same message about minor/major upgrades, base-OS changes and likely app-code changes, so they can all be approved up front. Change nothing during discovery.
- Start one child session per approved repo, at most five running at once. Each child rechecks the inventory for its repo before editing.
- In each child, pick the smallest fixed target per path and confirm it exists before editing. Check against the registry or package mirror the repo's CI already uses (Artifactory, Nexus, Harbor or a cloud registry) when public hosts are blocked; if neither is reachable, mark the target unverified in the PR and let the CI build prove it.
- Exact image tag: bump to the fixed patch in the same minor, keeping the variant (
-fpm,-apache,-alpine,-bookworm, etc.). - Digest pin: resolve and pin the new digest.
- Floating tag: leave the tag. Require a
--pull --no-cacherebuild and redeploy, and record the per-platform digest you verified (index digests change when tags are re-pushed). Say if the tag's base OS has moved (e.g. bookworm → trixie). - Placeholder or unresolvable digest: flag it, since what is actually deployed is unknown, and ask the user to confirm the running image.
- Distro package: upgrade from the vendor security repo and record the package release and its changelog's CVE entry. In Dockerfiles, pin the fixed release or fail the build if an older one is installed. In Ansible/Chef/Puppet,
state=present(or equivalent) never upgrades existing hosts: uselatestor a version pin, then restart PHP. - CI
setup-php: it takesmajor.minorand installs the newest patch the runner can get, so setmajor.minorand confirm the patch in the CI log. - Source build: move to the fixed tarball, verify the php.net SHA-256, and keep configure flags and extensions. For 7.4/8.0/8.1, use PHP's published backport commits instead (pin the commit hash; there is no tarball checksum) or, with approval, a supported branch (step 8).
- Helm/IaC: change the input that actually selects the artifact (image tag/digest, AMI, package pin) and regenerate lock or render outputs.
- Exact image tag: bump to the fixed patch in the same minor, keeping the variant (
- Leave Composer
require.phpandconfig.platform.phpunchanged. They don't select the deployed runtime. - Report PHP 8.1 and older separately, and distinguish vendor-supported builds (e.g. Ubuntu jammy's 8.1, which is fixed by a vendor package) from unsupported ones (source builds, EOL images). Give the vendor-backport or PHP-backport option, plus an upgrade path to a supported branch. Make minor/major upgrades only if the user approves.
- Test for regressions before and after the change:
- Baseline: before editin
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл fix-php-vuln?
Use when the user asks to fix, patch or upgrade a PHP vulnerability (e.g. 'Please fix my PHP vulnerability'), PHP2Shell, CVE-2026-109618 or CVE-2026-109619, or to find vulnerable PHP versions in Dockerfiles, distro packages, source builds, setup-php CI, Helm/IaC or Ansible/Chef/Puppet. Read-only inventory, approval gate, regression tests, focused PRs.
Как установить скилл fix-php-vuln?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл fix-php-vuln запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
ci-review
AnthropicThe scan that the plugin's GitHub Action runs.
azure-static-web-apps
GitHubHelps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
ai-ready
GitHubMake any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
aws-cdk-python-setup
GitHubSetup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…