Skip to content

fix(huggingface-vllm): patch libbrotli1 for CVE-2026-111497 - #6947

Open
shwang4a wants to merge 1 commit into
aws:mainfrom
shwang4a:fix/huggingface-vllm-libbrotli-cve-2026-111497
Open

shwang4a wants to merge 1 commit into
aws:mainfrom
shwang4a:fix/huggingface-vllm-libbrotli-cve-2026-111497

Conversation

@shwang4a

@shwang4a shwang4a commented Oct 28, 2026 •

Copy link
Copy Markdown

Purpose

Fixes #6955

Patch CVE-2026-111497 (USN-8956-1, Brotli: a crafted compressed stream could cause a DoS or arbitrary code execution) in the huggingface-vllm 0.31.0 SageMaker image (huggingface-vllm:0.31.0-transformers5.15.0-gpu-py312-cu130-ubuntu24.04).

The image inherits libbrotli1 1.1.0-2build2 from the AWS vLLM ubuntu24.04 base (vllm:0.31.0-gpu-py312-cu130-ubuntu24.04-sagemaker-v1.0). It's an OS dependency of libcurl4t64, libcurl3t64-gnutls, libfreetype6 and libjxl0.7, not a Python or npm requirement. Ubuntu shipped the fix as 1.1.0-2ubuntu0.1 in noble-security / noble-updates on 2026-10-26, after the current image was built. A customer running this image on a SageMaker endpoint reported the finding.

Change (docker/huggingface/vllm/Dockerfile, base stage, so every target inherits it):

  • apt-get install --only-upgrade libbrotli1 upgrades the library in place and never adds brotli where it isn't already installed.
  • dpkg --compare-versions "$installed" ge 1.1.0-2ubuntu0.1 makes the build fail with a clear CVE-2026-111497 message instead of silently shipping the vulnerable library if a mirror lags.
  • LIBBROTLI_MIN_VERSION is an ARG, so the floor can be raised without editing the RUN.

The huggingface-vllm-sagemaker stage's existing apt-get upgrade -y would also pick up the fix on a fresh rebuild. The explicit step makes the fix deterministic and enforced at build time, and it also covers the base stage, which has no upgrade.

Test Plan

  1. Confirm the vulnerable package and its reverse deps in the published base image.
  2. docker build --platform linux/amd64 --target base against the real base image.
  3. Negative test of the guard: build with --build-arg LIBBROTLI_MIN_VERSION=9.9.9 and expect failure.
  4. Trivy 0.67.2 rootfs scan (--scanners vuln --pkg-types os,library) of the unpatched base and the patched base target, then diff the findings.
  5. pre-commit on the changed file.

Test Result

Check Result
Base image package libbrotli1:amd64 1.1.0-2build2; reverse deps: libcurl4t64, libcurl3t64-gnutls, libfreetype6, libjxl0.7
Build --target base Passed. Unpacking libbrotli1:amd64 (1.1.0-2ubuntu0.1) over (1.1.0-2build2)
Installed version in built image libbrotli1:amd64 1.1.0-2ubuntu0.1
Guard negative test Failed as intended: libbrotli1 1.1.0-2ubuntu0.1 < 9.9.9 (CVE-2026-111497)
Trivy before 5103 findings (C 30 / H 511 / M 3659 / L 903). CVE-2026-111497 present
Trivy after 5024 findings (C 23 / H 485 / M 3641 / L 875). CVE-2026-111497 absent
New findings introduced None
pre-commit (non-Go hooks) Passed

The other findings that drop between before and after (curl 8.5.0-2ubuntu10.15 lows, aiohttp, pillow, lmcache, uv) come from steps already in this Dockerfile, not from this change.

Not covered locally:

  • The full huggingface-vllm-sagemaker target wasn't built locally because the ffmpeg source build under emulation is too slow. That stage only adds apt-get upgrade, which can't downgrade libbrotli1. The PR pipeline builds and ECR-scans the full target.
  • The Go-based pre-commit hooks (gitleaks, actionlint, dockerfmt, shfmt) couldn't be installed in the test environment because of network restrictions, so CI's _prcheck covers them.

Follow-up: The upstream vllm ubuntu24.04 image (docker/vllm/Dockerfile) carries the same libbrotli1 and likely needs the same rebuild.

The ubuntu24.04 vLLM 0.31.0 SageMaker base ships libbrotli1 1.1.0-2build2
(pulled in by libcurl4t64, libcurl3t64-gnutls and libfreetype6), which is
affected by CVE-2026-111497 (USN-8956-1). Ubuntu published the fix as
1.1.0-2ubuntu0.1 in noble-security on 2026-10-26.

Upgrade libbrotli1 in the base stage with --only-upgrade and assert the
installed version with dpkg --compare-versions so the build fails rather
than silently shipping the vulnerable library if a mirror lags.

Verified with Trivy 0.67.2 (rootfs scan, os+library) on the base stage
built on public.ecr.aws/deep-learning-containers/vllm:0.31.0-gpu-py312-cu130-ubuntu24.04-sagemaker-v1.0:
CVE-2026-111497 present before, absent after, no new findings introduced.

Signed-off-by: shwang <106367778+shwang4a@users.noreply.github.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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Security] CVE-2026-111497: libbrotli1 in huggingface-vllm 0.31.0 SageMaker image

1 participant