Skip to content

Commit fe939b2

Browse files
dpark01claude
andcommitted
Fix CVE-2026-33210: upgrade Ruby json gem to >=2.19.2
The sequip conda package pulls in Ruby, whose bundled default json gem (2.18.0) is vulnerable to a format string injection (DoS/info-disclosure when parsing with allow_duplicate_key: false). Ruby's default gem mechanism doesn't support in-place upgrades: `gem install` adds the new version to the load path but leaves the old gemspec and source files on disk, which Trivy continues to flag. Fix by removing the old default gem files (excluding psych/json which is unrelated) then installing the patched version cleanly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3aa0d44 commit fe939b2

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

docker/Dockerfile.assemble

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,16 @@ COPY docker/install-conda-deps.sh /tmp/
2828

2929
# Install conda dependencies (assembly tools)
3030
# All files resolved together in single micromamba call; x86-only files skipped on ARM
31-
# Remove mafft's dash_client (Go 1.22.1 binary with 11 Go stdlib CVEs) — we
32-
# never use --dash mode; delete inline so it never appears in any layer.
31+
# Post-install fixups (inline so vulnerable files never appear in a committed layer):
32+
# - mafft's dash_client: Go 1.22.1 binary with Go stdlib CVEs; we never use --dash mode
33+
# - Ruby json gem: sequip pulls in Ruby, whose bundled json gem has CVE-2026-33210;
34+
# remove the old default gem and install patched version (>=2.19.2)
3335
RUN /tmp/install-conda-deps.sh /tmp/requirements/baseimage.txt /tmp/requirements/core.txt /tmp/requirements/assemble.txt \
3436
--x86-only:/tmp/requirements/assemble-x86.txt && \
35-
rm -f /opt/conda/libexec/mafft/dash_client
37+
rm -f /opt/conda/libexec/mafft/dash_client && \
38+
find /opt/conda/lib/ruby -maxdepth 3 -name 'json*' -not -path '*/psych/*' -exec rm -rf {} + && \
39+
rm -f /opt/conda/lib/ruby/gems/*/specifications/default/json-*.gemspec && \
40+
gem install json --version '>=2.19.2' --no-document
3641

3742
# Copy source code (includes assembly module)
3843
COPY src/ /opt/viral-ngs/source/src/

0 commit comments

Comments
 (0)