Skip to content

fix: 修复 PHP RCE 漏洞 CVE-2026-109618 / CVE-2026-109619 - #1

Merged
ExerciseBook merged 8 commits into
masterfrom
fix/php-rce-2026-10
Oct 21, 2026
Merged

ExerciseBook merged 8 commits into
masterfrom
fix/php-rce-2026-10

Conversation

@xkeyC

@xkeyC xkeyC commented Oct 21, 2026

Copy link
Copy Markdown
Member

背景

2026-10-21 PHP 发布安全公告:CVE-2026-109618 / CVE-2026-109619,可导致未认证远程代码执行,PHP-FPM 受影响,修复版本为 8.3.36 / 8.4.27 / 8.5.12。
公告:https://www.php.net/archive/2026.php#2026-10-21-5

本镜像原为 Alpine 3.16 + PHP 8.1,两者均已 EOL,不会获得修复;Alpine 和 Docker Hub 官方镜像目前也尚未发布 8.3.36。

改动

  • 升级到 Alpine 3.24 + PHP 8.3(PHP 8.1 → 8.3,下游项目需验证兼容性)
  • 新增构建阶段:用 Alpine aports 的 community/php83 APKBUILD 以最新上游版本自行编译(源码 sha256 与 php.net 校验),从本地仓库安装;包名与路径(/etc/php83、php-fpm83)保持不变,安装后校验 PHP 版本
  • Composer 改为从官方 composer:2 镜像复制(原安装脚本哈希已失效)
  • chown 使用 nobody:nobody(新版 busybox 不支持点号分隔)
  • 示例页面移到 src/public/,与 nginx root 一致(此前首页 404)
  • 替换继承自 TrafeX 的 CI(会推送到 trafex/*):
    • 从 php.net 获取 8.3 最新版本,amd64 / arm64 原生 runner 构建,PHP 编译阶段走缓存
    • 冒烟测试校验 PHP 版本与 FPM 健康检查
    • master / tag / 每日定时构建发布到 ghcr.io/paraparty/php-nginx(latest、PHP 版本号、sha-*)

注意

  • 合并后首次 master 构建会第一次执行多架构合并与 GHCR 推送
  • GHCR 包首次发布后默认私有,需在包设置中改为公开
  • Alpine 发布 8.3.36 后可去掉自编译阶段,也可保留以提前跟进 PHP 安全版本

本 PR 在 Claude Code 协助下完成。

xkeyC added 8 commits October 21, 2026 21:58
- Move to Alpine 3.24 and PHP 8.3; Alpine 3.16 and PHP 8.1 are EOL and
  will not receive the fix
- Add the FPM pool mitigations from the PHP security advisory until
  Alpine ships PHP 8.3.36
- Install Composer from the official image instead of the pinned
  installer hash, which no longer matches
- Use nobody:nobody for chown, busybox rejects the dot separator
- Replace the inherited trafex CI with a GHCR build that smoke-tests the
  mitigations, warns while PHP is unpatched and rebuilds daily
nginx serves /var/www/html/public since the Laravel support change, so
the bundled phpinfo page was unreachable and the smoke test got a 404.
Alpine has not shipped PHP 8.3.36 yet. Rebuild community/php83 from
aports at the latest upstream release (sha256 checked against php.net)
in a build stage and install it from that local repository, keeping the
stock php83 package names and paths.

CI reads the latest 8.3 release from php.net, builds natively on amd64
and arm64 runners with the PHP stage cached, and checks the image runs
that version. With PHP patched, drop the temporary FPM mitigations.
gitlab.alpinelinux.org answers GitHub runners with HTTP 418.
abuild fetch verifies against the sha512 of the old release. Fetch the
tarball directly, check it against the php.net sha256, then let
abuild checksum regenerate the sums.
@ExerciseBook
ExerciseBook merged commit fe3e8f6 into master Oct 21, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants