Skip to content

Upgrade PHP runtime to 8.5.13 and add an official source mirror fallback - #305

Open
b4u-mw wants to merge 1 commit into
linuxserver:masterfrom
b4u-mw:master
Open

b4u-mw wants to merge 1 commit into
linuxserver:masterfrom
b4u-mw:master

Conversation

@b4u-mw

@b4u-mw b4u-mw commented Nov 20, 2026

Copy link
Copy Markdown

linuxserver.io


  • I have read the contributing guideline and understand that I have made the correct modifications
  • An LLM assisted me in writing the code or text for this PR
  • An LLM agent wrote the code or text for this PR

AI assistance: OpenAI Codex via DeepSeek Harness was used for investigation, implementation, review, and testing.


Description:

Upgrade all installed php85* packages, including inherited PHP-FPM and extension packages, and require PHP CLI and FPM version 8.5.13 or later.

Add build-time checks for the PHP version and the required SimpleXML, Memcached, and PDO MySQL extensions.

Apply the same changes to Dockerfile and Dockerfile.aarch64.

Add timeouts and HTTP error handling to the Codeberg source archive download. If it fails, download the same release tag from the official BookStack GitHub mirror. For the tested v26.09.3 release, both hosts resolve to commit bf680915b6dbaf93eee5234ec72dc33bc5abafbf.

The BookStack release selection, base image, entrypoint, and /config layout remain unchanged. Documentation and the changelog are updated in readme-vars.yml; generated files are not edited.

Benefits of this PR and context:

The base image used during validation contained PHP 8.5.12. Rebuilding BookStack against that base alone did not include the PHP security fixes released on 19 November 2026.

Upgrading inherited PHP packages is necessary: installing only the application's explicitly listed dependencies does not reliably update the existing CLI, FPM, Session, SimpleXML, and other runtime packages.

Critical PHP vulnerabilities addressed

CVE Issue
CVE-2026-109618 Remote code execution through out-of-memory state corruption.
CVE-2026-109619 Remote code execution through stale internal request state.
CVE-2026-115560 Remote code execution through a session serializer mismatch involving session upload progress.
CVE-2026-126714 Remote code execution through partially overwritten native PHP session files.
CVE-2026-129182 Use-after-free caused by repopulation of fatal-error backtrace state after request shutdown.
CVE-2026-129474 Use-after-free in magic-method backtraces that can lead to remote code execution.
CVE-2026-129496 Timezone-cache use-after-free that can lead to remote code execution.
CVE-2026-129481 Use-after-free after interrupted session shutdown.
CVE-2026-129289 PHP-FPM request smuggling through an unread request body under specific backend connection-reuse conditions.

PHP 8.5.13 also includes fixes for:

  • CVE-2026-129291: PHP-FPM epoll use-after-free and possible local privilege escalation.
  • CVE-2026-129292: XSS in the PHP-FPM HTML status endpoint.
  • CVE-2026-129538: PHP-CGI out-of-bounds read/write during PATH_INFO correction.
  • CVE-2026-129501: Double-free during DOM XML serialization.
  • CVE-2026-129506: SOAP use-after-free when processing DTD entity references.
  • CVE-2026-15353: SOAP information disclosure through malformed array dimensions.
  • CVE-2026-128064: Plaintext exposure when stream wrappers process mixed-case HTTPS or FTPS URLs.
  • CVE-2026-127960: Denial of service through folded HTTP response headers.
  • CVE-2026-128090: PHAR OpenSSL signature verification bypass through algorithm downgrade.
  • CVE-2026-129438: Incorrect RFC 3986 URI serialization for oversized input.

The update also resolves the SimpleXML garbage-collection double-free regression, GH-24488.

Exploitability depends on the configuration, SAPI, and application code. This list does not imply that every listed issue is reachable in a default BookStack installation.

For CVE-2026-115560, existing configuration overrides still require review. If session upload progress is explicitly enabled, all applications sharing its session storage must use consistent session serializers.

How Has This Been Tested?

Tested locally with Docker Engine 29.9.1 and Buildx 0.39.1.

  • Built both linux/amd64 and linux/arm64 variants with --no-cache --pull.
  • Confirmed PHP CLI, PHP-FPM, and installed PHP core extensions use 8.5.13-r0.
  • Confirmed SimpleXML, Memcached, and PDO MySQL load successfully.
  • Ran the exact GH-24488 regression reproducer as an unprivileged user on both architectures:
    • The previous image crashed.
    • Both patched variants completed with SIMPLEXML_TEST_OK.
  • Started BookStack with a fresh, isolated MariaDB 11.4 database and /config volume.
  • Tested HTTP form login, book creation, and reading on AMD64.
  • Restarted the application with the same database and /config, then verified that the book and configuration persisted.
  • Started the ARM64 variant against the same test database and /config, verified login and the existing book, and repeated the restart/persistence check.
  • Confirmed PHP-FPM configuration validation succeeds.
  • Exercised the source mirror fallback while the Codeberg archive endpoint was timing out.
  • Published both architecture images, verified the multi-platform manifest, and pulled the published artifacts back from GHCR.

No production data or credentials were used. OIDC integration and migration of an existing production database were not tested.

Source / References:

@github-actions

Copy link
Copy Markdown

Thanks for opening this pull request! Be sure to follow the pull request template!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

1 participant