From 5f54056145c04e9a2e3fb3ca8d7e63e4930df01f Mon Sep 17 00:00:00 2001 From: Bohdan Kanarskyi Date: Mon, 23 Nov 2026 14:57:04 +0200 Subject: [PATCH 1/6] fix: patch nginx HIGH CVEs in the base image --- official-templates/base/Dockerfile | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/official-templates/base/Dockerfile b/official-templates/base/Dockerfile index 6579f315..22895e01 100644 --- a/official-templates/base/Dockerfile +++ b/official-templates/base/Dockerfile @@ -168,6 +168,36 @@ RUN . /etc/os-release && \ fi && \ dpkg-query -W -f='${Package} ${Version}\n' apt "${lib}" +# Same stale-snapshot problem for nginx (CVE-2026-113425, CVE-2026-123007, +# CVE-2026-123633, CVE-2026-123634, HIGH; fixed in 1.24.0-2ubuntu7.20 on 24.04). +# nginx pins nginx-common to its exact version, so both go in together. +# Checksummed, and only when newer. +# debs is split on purpose: it is a list of file paths. +# hadolint ignore=SC2086 +RUN . /etc/os-release && \ + case "${VERSION_ID}" in \ + 24.04) ver="1.24.0-2ubuntu7.21"; \ + sha_nginx=c125a2ad6bfd25b6fdf92e3534a3facbf35180e05a054dcb84f68b63fc38227e; \ + sha_common=4176112bca331776560304ced6f6e6ca36fee2818a834d6ccdf79c6c58ed5e28 ;; \ + 26.04) ver="1.28.3-2ubuntu1.14"; \ + sha_nginx=05a780d312e408d09482a8d735383a29b40514606f2855db94cd81da15f406d1; \ + sha_common=e9e6f64696bd5d0c74f06c3a5d95ac22746ee1a4ab1de62b616393a94db9b8ab ;; \ + *) echo "no pinned nginx for ${VERSION_ID}" && exit 1 ;; \ + esac && \ + cur="$(dpkg-query -W -f='${Version}' nginx 2>/dev/null || echo 0)" && \ + if dpkg --compare-versions "$cur" lt "$ver"; then \ + debs="" && \ + for p in "nginx_${ver}_amd64.deb:${sha_nginx}" "nginx-common_${ver}_all.deb:${sha_common}"; do \ + deb="${p%%:*}" && \ + curl -fsSL --proto '=https' --tlsv1.2 -o "/tmp/${deb}" \ + "https://security.ubuntu.com/ubuntu/pool/main/n/nginx/${deb}" && \ + echo "${p#*:} /tmp/${deb}" | sha256sum -c - && \ + debs="${debs} /tmp/${deb}"; \ + done && \ + dpkg -i ${debs} && rm -f ${debs}; \ + fi && \ + dpkg-query -W -f='${Package} ${Version}\n' nginx nginx-common + # Install SchedMD Slurm from the .deb packages built in the slurm-builder stage # (replaces Ubuntu's stock slurm-wlm). We install via apt (not raw dpkg) so the # runtime dependencies (libmunge2, libmariadb, ...) resolve automatically, as From 4b6bafcc56c42b6c7392f7abbe75794819fda7f9 Mon Sep 17 00:00:00 2001 From: Bohdan Kanarskyi Date: Mon, 23 Nov 2026 15:16:47 +0200 Subject: [PATCH 2/6] fix: bump mistune to 3.3.4 in nvidia-pytorch --- official-templates/nvidia-pytorch/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/official-templates/nvidia-pytorch/requirements.txt b/official-templates/nvidia-pytorch/requirements.txt index 74c73296..f469ab23 100644 --- a/official-templates/nvidia-pytorch/requirements.txt +++ b/official-templates/nvidia-pytorch/requirements.txt @@ -5,7 +5,7 @@ fsspec==2026.6.0 jaraco.context==6.1.0 jupyter_server==2.21.0 jupyterlab==4.6.4 -mistune==3.3.3 +mistune==3.3.4 msgpack==1.2.3 nbconvert==7.17.2 notebook==7.6.3 From 9f6e598de583cd7ed7f3ea7f0b48fe8db613f80a Mon Sep 17 00:00:00 2001 From: Bohdan Kanarskyi Date: Mon, 23 Nov 2026 15:28:21 +0200 Subject: [PATCH 3/6] fix: add retries --- official-templates/base/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/official-templates/base/Dockerfile b/official-templates/base/Dockerfile index 22895e01..f0ac1d18 100644 --- a/official-templates/base/Dockerfile +++ b/official-templates/base/Dockerfile @@ -243,8 +243,8 @@ RUN [[ -n "$RP_SKIP_PYTHON" ]] && exit 0; \ rm -rf "${GNUPGHOME}" && \ echo "deb [signed-by=/usr/share/keyrings/deadsnakes.gpg] https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu ${VERSION_CODENAME} main" \ > /etc/apt/sources.list.d/deadsnakes.list && \ - apt-get update --yes && \ - apt-get install --yes --no-install-recommends \ + apt-get -o Acquire::Retries=10 update --yes --error-on=any && \ + apt-get -o Acquire::Retries=10 install --yes --no-install-recommends \ python3.11-dev python3.11-venv python3.11-distutils \ python3.12-dev python3.12-venv \ python3.13-dev python3.13-venv && \ From cd174659fa6c88f0e1415def1674e3f6d91f2331 Mon Sep 17 00:00:00 2001 From: Bohdan Kanarskyi Date: Mon, 23 Nov 2026 15:40:40 +0200 Subject: [PATCH 4/6] fix: fetch pinned debs from Launchpad with retries and stop on any failed download --- official-templates/base/Dockerfile | 31 ++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/official-templates/base/Dockerfile b/official-templates/base/Dockerfile index f0ac1d18..08b1b3ec 100644 --- a/official-templates/base/Dockerfile +++ b/official-templates/base/Dockerfile @@ -95,8 +95,11 @@ RUN . /etc/os-release && \ # CON-1869: CUDA bases pin apt to a snapshot that lags the emSign removal # (CVE-2026-111943), and plain `apt-get upgrade` there only reaches the stale -# version. Pull the patched ca-certificates from the archive over https, -# checksum it, and install only when newer so we never downgrade a fresher one. +# version. Pull the patched ca-certificates over https, checksum it, and install +# only when newer so we never downgrade a fresher one. Pinned .debs come from +# Launchpad, which keeps superseded builds; the archive pool keeps only the +# newest, so a pin there 404s as soon as Ubuntu ships the next update. Launchpad +# answers 503 in bursts, hence --retry. RUN . /etc/os-release && \ ver="20260816ubuntu0.${VERSION_ID}.1" && \ deb="ca-certificates_${ver}_all.deb" && \ @@ -107,16 +110,16 @@ RUN . /etc/os-release && \ esac && \ cur="$(dpkg-query -W -f='${Version}' ca-certificates 2>/dev/null || echo 0)" && \ if dpkg --compare-versions "$cur" lt "$ver"; then \ - curl -fsSL --proto '=https' --tlsv1.2 -o "/tmp/${deb}" \ - "https://security.ubuntu.com/ubuntu/pool/main/c/ca-certificates/${deb}" && \ + curl -fsSL --retry 5 --proto '=https' --tlsv1.2 -o "/tmp/${deb}" \ + "https://launchpad.net/ubuntu/+archive/primary/+files/${deb}" && \ echo "${sha} /tmp/${deb}" | sha256sum -c - && \ dpkg -i "/tmp/${deb}" && rm "/tmp/${deb}"; \ fi && \ update-ca-certificates # Same stale-snapshot problem for brotli (CVE-2026-111497, KEV): `apt-get -# upgrade` can't reach the patched libbrotli1. Pull it from the security -# archive over https, checksum, and install only when newer. +# upgrade` can't reach the patched libbrotli1. Pull it from Launchpad over +# https, checksum, and install only when newer. RUN . /etc/os-release && \ case "${VERSION_ID}" in \ 24.04) ver="1.1.0-2ubuntu0.1"; sha=70b188a86d81f30d7510aab30e25d638ed5037dded6691af1533952b71ac61de ;; \ @@ -126,8 +129,8 @@ RUN . /etc/os-release && \ deb="libbrotli1_${ver}_amd64.deb" && \ cur="$(dpkg-query -W -f='${Version}' libbrotli1 2>/dev/null || echo 0)" && \ if dpkg --compare-versions "$cur" lt "$ver"; then \ - curl -fsSL --proto '=https' --tlsv1.2 -o "/tmp/${deb}" \ - "https://security.ubuntu.com/ubuntu/pool/main/b/brotli/${deb}" && \ + curl -fsSL --retry 5 --proto '=https' --tlsv1.2 -o "/tmp/${deb}" \ + "https://launchpad.net/ubuntu/+archive/primary/+files/${deb}" && \ echo "${sha} /tmp/${deb}" | sha256sum -c - && \ dpkg -i "/tmp/${deb}" && rm "/tmp/${deb}"; \ fi @@ -159,10 +162,10 @@ RUN . /etc/os-release && \ debs="" && \ for p in ${pkgs}; do \ deb="${p%%:*}_${ver}_amd64.deb" && \ - curl -fsSL --proto '=https' --tlsv1.2 -o "/tmp/${deb}" \ - "https://security.ubuntu.com/ubuntu/pool/main/a/apt/${deb}" && \ + curl -fsSL --retry 5 --proto '=https' --tlsv1.2 -o "/tmp/${deb}" \ + "https://launchpad.net/ubuntu/+archive/primary/+files/${deb}" && \ echo "${p#*:} /tmp/${deb}" | sha256sum -c - && \ - debs="${debs} /tmp/${deb}"; \ + debs="${debs} /tmp/${deb}" || exit 1; \ done && \ dpkg -i ${debs} && rm -f ${debs}; \ fi && \ @@ -189,10 +192,10 @@ RUN . /etc/os-release && \ debs="" && \ for p in "nginx_${ver}_amd64.deb:${sha_nginx}" "nginx-common_${ver}_all.deb:${sha_common}"; do \ deb="${p%%:*}" && \ - curl -fsSL --proto '=https' --tlsv1.2 -o "/tmp/${deb}" \ - "https://security.ubuntu.com/ubuntu/pool/main/n/nginx/${deb}" && \ + curl -fsSL --retry 5 --proto '=https' --tlsv1.2 -o "/tmp/${deb}" \ + "https://launchpad.net/ubuntu/+archive/primary/+files/${deb}" && \ echo "${p#*:} /tmp/${deb}" | sha256sum -c - && \ - debs="${debs} /tmp/${deb}"; \ + debs="${debs} /tmp/${deb}" || exit 1; \ done && \ dpkg -i ${debs} && rm -f ${debs}; \ fi && \ From 4b1467be277b7875773cbbd9e08c757fb8a54ce5 Mon Sep 17 00:00:00 2001 From: Bohdan Kanarskyi Date: Mon, 23 Nov 2026 20:57:50 +0200 Subject: [PATCH 5/6] fix: remove unused pebble from the 26.04 base image --- official-templates/base/Dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/official-templates/base/Dockerfile b/official-templates/base/Dockerfile index 08b1b3ec..a7670300 100644 --- a/official-templates/base/Dockerfile +++ b/official-templates/base/Dockerfile @@ -229,6 +229,12 @@ RUN apt-get update --yes && \ RUN find /opt/nvidia /usr/local/cuda* -type d -name 'efa_metrics' \ -print -exec rm -rf {} + 2>/dev/null || true +# Canonical's service manager, dropped into the 26.04 image outside dpkg, so +# there is no package to purge or upgrade. start.sh is the CMD and nothing +# invokes it, but its Go stdlib carries HIGH findings with no fixed build in +# 26.04. Same removal as sandbox-ubuntu; a no-op on 24.04. +RUN rm -rf /usr/bin/pebble /var/lib/pebble + # Install Python 3.11-3.13. Whichever of them is the release's own system # python3 comes from the Ubuntu archive (3.12 on 24.04; 26.04's system python3 # is 3.14, which is not in this list), the rest from deadsnakes. The PPA is From 106a30e2170e5a59d66c9cffcd801047c214480b Mon Sep 17 00:00:00 2001 From: Bohdan Kanarskyi Date: Tue, 24 Nov 2026 01:27:37 +0200 Subject: [PATCH 6/6] fix: bump runpodctl to v3.1.1 in autoresearch --- .github/actions/grype/ignore.yaml | 2 +- official-templates/autoresearch/Dockerfile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/grype/ignore.yaml b/.github/actions/grype/ignore.yaml index 82778271..f6e4be6e 100644 --- a/.github/actions/grype/ignore.yaml +++ b/.github/actions/grype/ignore.yaml @@ -52,7 +52,7 @@ ignore: type: python # golang.org/x/net < 0.62.0 compiled into the runpodctl release binary - # (GO-2026-6860). The latest release, v3.0.1, is built with x/net 0.60.0 + # (GO-2026-6860). The latest release, v3.1.1, is built with x/net 0.60.0 # and runpodctl main is still on 0.60.0, so there is no release to upgrade # to. Scoped to the runpodctl path so x/net in any other Go binary still # fails the build. Remove once a runpodctl release ships x/net >= 0.62.0. diff --git a/official-templates/autoresearch/Dockerfile b/official-templates/autoresearch/Dockerfile index eb41bc51..20088c9e 100644 --- a/official-templates/autoresearch/Dockerfile +++ b/official-templates/autoresearch/Dockerfile @@ -4,8 +4,8 @@ FROM ${BASE_IMAGE} SHELL ["/bin/bash", "-o", "pipefail", "-c"] # Install runpodctl for pod management (scaling up GPUs) -ARG RUNPODCTL_VERSION=v3.0.1 -ARG RUNPODCTL_SHA256=8529411a10a06a80f88216f4f89a1f22e6943eada01d2d634cc6324dd62542e3 +ARG RUNPODCTL_VERSION=v3.1.1 +ARG RUNPODCTL_SHA256=0d70f2d2317c9687aeb491d1f58c0e013b4ae8ff643b9e4794857ee2f5934a9a RUN wget -q --https-only --secure-protocol=TLSv1_2 --max-redirect=3 \ -O /tmp/runpodctl.tar.gz \ "https://github.com/runpod/runpodctl/releases/download/${RUNPODCTL_VERSION}/runpodctl-linux-amd64.tar.gz" && \