Skip to content

Pin the base image to PHP 8.5.12 - #644

Merged
daylioti merged 1 commit into
masterfrom
php-8.5.12
Oct 22, 2026
Merged

daylioti merged 1 commit into
masterfrom
php-8.5.12

Conversation

@daylioti

@daylioti daylioti commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

On 2026-10-21 PHP released 8.5.12 as an emergency security release. It fixes two critical bugs, CVSS v4.0 9.2 each, that allow unauthenticated remote code execution, and exploitation in the wild has been reported:

  • CVE-2026-109618: an out-of-memory error can interrupt PHP while request data is only partly initialised, and request cleanup then treats the invalid data as valid.
  • CVE-2026-109619: request-owned state can outlive its memory, and a later request on the same worker uses it before it is reset.

PHP-FPM, which this image runs, is an affected SAPI. The last published image (sha-02919b7d…, built 2026-10-13) runs PHP 8.5.11.

PHP_VERSION was the minor only (8.5), so the image ran whatever patch the floating php:8.5-fpm tag pointed at the day CI last ran. A PHP security release only reached the image when an unrelated change happened to trigger a rebuild, and any rebuild could change the PHP patch without the diff showing it.

Change

  • ARG PHP_VERSION=8.5.12: the exact release. Every stage that builds from php:${PHP_VERSION}-fpm (qdb-builder, php-builder) now uses 8.5.12, and the runtime takes its /usr/local from there.
  • Comments: explain why the patch is pinned, and that a downstream image compiling extensions of its own must build them against the same exact version. A patch release keeps the module API number but can add engine functions that inline helpers in its headers call, so an extension built against a different patch loads and then fails with undefined symbol on first use.

The qdb target cache id is keyed by PHP_VERSION, so it now changes per patch release and this build starts with a cold Rust target dir.

php:8.5.12-fpm is still Debian trixie, so DEBIAN_SUITE is unchanged; the build asserts it.

Testing

  • Local amd64 build: succeeds. php -v and php-fpm -v in the image report 8.5.12, the Debian suite assertion and the shared-library check pass, and every extension loads with LD_BIND_NOW=1.
  • qdb/tests/run-tests.sh (fallback + daemon) and qdb/tests/run-quanta-tests.sh (noext + fallback + daemon) both pass against the local image.
  • A downstream app image that compiles excimer, xdebug and soap against php:8.5.12-fpm builds on this base, loads all three with LD_BIND_NOW=1, and its php-fpm serves requests with excimer enabled.
  • CI: build and both suites on amd64 and arm64.

PHP 8.5.12 fixes two critical unauthenticated remote code execution bugs
(CVE-2026-109618, CVE-2026-109619) that affect PHP-FPM, which this image
runs.

PHP_VERSION was the minor only, so the image ran whatever patch the
floating php:8.5-fpm tag pointed at the day CI last ran, and a PHP
security release only reached it when an unrelated change triggered a
rebuild. It is now the exact release: a PHP update is a deliberate bump
that rebuilds the image by itself, and downstream images that compile
their own extensions have a patch version to match.
@daylioti
daylioti merged commit 8b51efb into master Oct 22, 2026
2 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.

1 participant