Skip to content

Upgrade Alpine base packages so security fixes reach the image - #8

Merged
zamibd merged 1 commit into
mainfrom
fix-base-cves
Nov 28, 2026
Merged

zamibd merged 1 commit into
mainfrom
fix-base-cves

Conversation

@zamibd

@zamibd zamibd commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The published v1.31.10 image ships zlib 1.3.2-r1, affected by CVE-2026-4738 (Docker Scout: 9.4 critical). Alpine 3.24 already has the fix in zlib 1.4-r0, but the runtime stage only ran apk add, which keeps the packages that come with the alpine:3.24 base image at the versions it was built with. libssl3/libcrypto3 were one revision behind for the same reason.

Fix

  • Dockerfile: run apk upgrade --no-cache before installing the runtime packages.
  • CI and release scans fail on fixable findings of any severity. Trivy rates CVE-2026-4738 MEDIUM, so the previous HIGH/CRITICAL filter let it through.

Result (local build)

Package Before After
zlib 1.3.2-r1 1.4-r0
libssl3, libcrypto3 3.5.9-r0 3.5.9-r1
musl 1.2.6-r3 1.2.6-r3

Trivy, all severities, fixed and unfixed: 0 vulnerabilities. Smoke test passes, including HTTP/3.

CVE-2026-107891 (musl)

Not changed here, because Alpine 3.24 has no newer musl: 1.2.6-r3 is the current package, and its APKBUILD lists CVE-2026-107891 as fixed in 1.2.6-r3. The CVE patch in 3.24-stable has the same code changes as the one in edge, where it is listed under 1.2.6-r6. Docker Scout reporting 1.2.6-r3 as vulnerable is most likely based on the edge version number; Trivy does not report it.

Releasing

A manual run of Release rebuilds the existing v1.31.10 tag, which does not contain this fix. After merging, publish with a revision tag:

git tag v1.31.10-1
git push origin v1.31.10-1

The runtime stage only ran "apk add", which leaves the packages already
in the alpine:3.24 base image at the versions that image was built
with. Alpine had published fixes the image did not get:

- zlib 1.3.2-r1 -> 1.4-r0 (CVE-2026-4738)
- libssl3 / libcrypto3 3.5.9-r0 -> 3.5.9-r1

Run "apk upgrade" first. Trivy now reports no vulnerabilities at all.

The scans in CI and before a release now fail on fixable findings of
any severity. Trivy rated CVE-2026-4738 MEDIUM while Docker Scout rates
it 9.4 critical, so the HIGH/CRITICAL filter let it through; with every
package upgraded, any fixable finding means the image is not current.
@zamibd
zamibd merged commit 317fdcf into main Nov 28, 2026
5 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