Skip to content

Security: Upgrade curl to 8.23.0 in the Alpine images - #743

Open
MarjovanLier wants to merge 1 commit into
serversideup:mainfrom
MarjovanLier:fix/alpine-curl-8.23.0
Open

MarjovanLier wants to merge 1 commit into
serversideup:mainfrom
MarjovanLier:fix/alpine-curl-8.23.0

Conversation

@MarjovanLier

Copy link
Copy Markdown

This PR upgrades curl and libcurl to 8.23.0-r0 in every Alpine image.

Change Why
Every variation lists curl and libcurl in DEPENDENCY_PACKAGES_ALPINE The official PHP Alpine images still ship curl 8.22.0-r0. docker-php-serversideup-dep-install-alpine runs apk add --upgrade, so a listed package is upgraded to the patched version

curl 8.22.0 CVEs

Trivy reports curl 8.22.0-r0 as critical (CVSS 9.1, "HTTP/2 upload Use-After-Free") and lists these CVEs as fixed in 8.23.0-r0:

CVE-2026-86409, CVE-2026-86410, CVE-2026-86411, CVE-2026-86412, CVE-2026-87866, CVE-2026-92386, CVE-2026-92387, CVE-2026-92392

The published images are affected. For example, serversideup/php:8.5-fpm-nginx-alpine-v5.0.5 ships curl-8.22.0-r0 and libcurl-8.22.0-r0. PHP's curl extension, FrankenPHP (linked with -lcurl) and the HEALTHCHECK of the web server images all use the system libcurl, so the package upgrade covers all of them.

Base OS Shipped After this PR
Alpine 3.23 8.22.0-r0 8.23.0-r0
Alpine 3.24 8.22.0-r0 8.23.0-r0
Alpine 3.22 (PHP 8.1 only) 8.14.1-r2 8.14.1-r4, the latest in the 3.22 repository

I did not check whether 8.14.1-r4 contains fixes for these CVEs.

Debian is not changed. In php:8.5-fpm-bookworm and php:8.5-fpm-trixie, apt has no newer curl than the installed 7.88.1-10+deb12u15 and 8.14.1-2+deb13u7.

Remove the packages once the official images ship 8.23.0, the same as the Brotli packages from #737. fpm-apache has no Alpine images, but it gets the same lines so that all five Dockerfiles stay the same, as with brotli-libs.

Tested locally

All arm64, PHP 8.5.12.

Image curl and libcurl test-image.sh
8.5-fpm-nginx-alpine3.24 8.23.0-r0, and PHP curl_version() reports 8.23.0 Passes, including HTTP/2
8.5-cli-alpine3.23 8.23.0-r0 Passes

hadolint passes on all five Dockerfiles. CI is the first build of fpm, frankenphp, Alpine 3.22 and amd64. This PR comes from a fork, so the arm64 image tests run only when a maintainer starts "Docker Publish (PR Images)" with this PR number.

How to test

scripts/dev.sh --variation fpm-nginx --version 8.5 --os alpine3.24
docker run --rm --entrypoint sh serversideup/php:8.5-fpm-nginx-alpine3.24 -c 'apk info -v | grep curl'
scripts/test-image.sh serversideup/php:8.5-fpm-nginx-alpine3.24

Release

The production workflow builds from the latest release tag, and the weekly rebuild also uses that tag (v5.0.5). The fix reaches the public tags only after a new release, for example v5.0.6.

The official PHP Alpine 3.23 and 3.24 images still ship curl and
libcurl 8.22.0-r0, which Trivy reports as critical (CVE-2026-86409
and seven related CVEs). Alpine already publishes 8.23.0-r0, so
every variation now lists both packages and the install helper
upgrades them at build time, the same way as the Brotli fix.

Debian is not changed: apt has no newer curl for Bookworm or
Trixie. Remove the packages once the official images ship 8.23.0.

Signed-off-by: Marjo Wenzel van Lier <marjo.vanlier@gmail.com>

This branch has not been deployed

No deployments
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