Skip to content

fix(docker): pick up Debian security fixes and block untrusted libvips loaders - #3053

Merged
Quick104 merged 2 commits into
mainfrom
fix/docker-image-cves
Oct 25, 2026
Merged

Quick104 merged 2 commits into
mainfrom
fix/docker-image-cves

Conversation

@Quick104

@Quick104 Quick104 commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: N/A
Validation tasks: none

Published Docker images miss Debian security fixes, and Silo lets libvips decode PDFs from untrusted artwork.

CI reuses its registry layer cache for the runtime stage, so the apt-get install layer is rebuilt only when the debian:trixie-slim tag moves. Fixes Debian ships in between never reach the image. The current latest (build-1700) has libbrotli1 1.1.0-2+b7, which has a high-severity out-of-bounds write in its decoder (CVE-2026-111497), and an older libheif. Debian already publishes fixed versions of both. Trivy counts 55 findings in the image that have a Debian fix available.

Silo decodes artwork from metadata providers, media folders and uploads, and bimg picks the decoder from the leading bytes. Any input starting with %PDF goes to the libvips Poppler loader. libvips marks that loader untrusted, along with ImageMagick, OpenEXR, FITS and others, because it is not hardened against hostile input. Silo has no use for PDF artwork.

Approach

  • The image build pulls fresh base images and rebuilds the runtime stage every time (pull: true, no-cache-filters: runtime). The stage also runs apt-get upgrade for packages already in the base image. The frontend and Go stages keep using the cache until their base images change. Each image build now downloads the runtime packages and the Intel compute runtime again.
  • At startup, imageutil blocks every libvips loader marked untrusted, then re-enables SVG, because providers such as TMDB serve logos as SVG. JPEG, PNG, WebP, GIF, TIFF, HEIF and AVIF use trusted loaders and are unaffected. Where libvips links ImageMagick 6, for example on Ubuntu 24.04, the block also keeps bimg from handing BMP, PSD, ICO and similar formats to ImageMagick. bimg does not recognize the loader name of the ImageMagick 7 that the image ships, so those formats were already rejected there. libvips older than 8.13 has no untrusted flag and keeps every loader.

Most findings that remain are in libraries Silo cannot reach (OpenEXR, matio, cfitsio) or in tools it never runs (util-linux, systemd-homed, GnuPG), and Debian has no fix for them yet. The npm findings (undici, brace-expansion) come from the npm bundled with node:24-slim and will clear when that image updates.

Validation

  • Image scan (Trivy, linux/amd64, same database): latest build-1700 has 55 Debian findings with an available fix. This branch, built like CI on the same commit, has none.
  • libvips loader tests on Debian trixie's libvips 8.16.1: a PDF is rejected, and PNG, JPEG and SVG decode, including the existing TMDB SVG logo test. With the block call removed, the PDF test fails.
  • Pre-PR gate: passes, except four internal/jellycompat HDR routing tests that fail the same way on a clean local main checkout and pass in main's CI. The web steps passed when rerun with CI=true, and actionlint 1.7.12 passed via go run.
  • Not run: an image build on GitHub. docker.yml calls trusted-linux-build.yml@main, so the workflow change takes effect only after merge.

Evidence

Evidence: https://evidence.siloserver.org/r/silo-server/pr-3053/

Risks

Image builds take longer, because the runtime stage no longer comes from the cache. Artwork that is a PDF no longer decodes. Neither do BMP, PSD or ICO artwork on installs whose libvips links ImageMagick 6. The Docker image already rejected those three formats.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • The Evidence section shows every change a user can see, or says there is none.

AI Disclosure

  • Harness: Claude Code (desktop app)
  • Tool(s): Claude Code with subagents, GitHub CLI, Trivy
  • Model(s): claude-opus-5-5[1m]
  • Involvement: Fully AI-generated at the maintainer's direction; human verification pending
  • Adversarial review: a separate agent that did not write the change reviewed the diff. It checked whether no-cache-filters overrides the imported registry cache, whether anything depends on the final stage being unnamed, init order against bimg's vips_init, the SVG class name and version guard, and whether the tests catch a regression. It found that the PDF loader is untrusted and now blocked, which the code comment had called trusted. It also found that the first test could not detect a missing block, and that one workflow comment overstated what stays cached. All three are fixed: the comment names PDF, a PDF case now fails without the block, and the workflow comment is corrected.

🤖 Generated with Claude Code

Quick104 and others added 2 commits October 24, 2026 23:52
…updates

The image build reused its registry cache for the runtime stage's
apt-get layer until the debian:trixie-slim tag moved, so published
images missed Debian security fixes released in between. CI now pulls
fresh base images and rebuilds the runtime stage on every build, and
the stage runs apt-get upgrade for packages already in the base image.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
libvips marks loaders that are not hardened against hostile input,
such as PDF (Poppler), ImageMagick, OpenEXR and FITS, as untrusted.
Silo decodes artwork from providers, media folders and uploads, and
bimg routes any %PDF input to the Poppler loader. Block untrusted
loaders for the process and keep SVG, which provider logos use.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@silo-triage silo-triage Bot added the size/M 50–199 added + deleted lines (all files); change volume, not priority. label Oct 25, 2026
@coderabbitai

coderabbitai Bot commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 42 seconds.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available. Your 66 included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: de1b6711-0fd9-4f3c-8752-765e6590129b
Commits

Reviewing files that changed from the base of the PR and between a0f8c54 and 705d809.

Files selected for processing: 4
  • .github/workflows/trusted-linux-build.yml
  • Dockerfile
  • internal/imageutil/untrusted.go
  • internal/imageutil/untrusted_test.go
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@silo-kody

silo-kody Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-25T03:58:14.576385Z 705d809 PR opened
🔒 Security Review ✅ Completed 2026-10-25T04:00:10.691910Z 705d809 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@silo-triage silo-triage Bot added bug Something isn't working go Pull requests that update go code impact: security Auth, privacy, or permission boundary priority: P1 Core-path bug; painful workaround — next after P0 labels Oct 25, 2026
@Quick104
Quick104 merged commit 1b9a1f1 into main Oct 25, 2026
24 of 25 checks passed
@Quick104
Quick104 deleted the fix/docker-image-cves branch October 25, 2026 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working go Pull requests that update go code impact: security Auth, privacy, or permission boundary priority: P1 Core-path bug; painful workaround — next after P0 size/M 50–199 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant