Skip to content

chore(deps): fix 2 critical Dependabot alerts#7

Open
shenxingy wants to merge 1 commit into
mainfrom
chore/dependabot-critical-fixes
Open

chore(deps): fix 2 critical Dependabot alerts#7
shenxingy wants to merge 1 commit into
mainfrom
chore/dependabot-critical-fixes

Conversation

@shenxingy

Copy link
Copy Markdown
Member

Critical Dependabot alerts remediated

Package From To GHSA Alert
torch 1.13.1 2.6.0 GHSA-53q9-r3pm-6pq6 (critical, torch.load RCE) VisionRush#12
pillow 9.5.0 10.2.0 GHSA-3f63-hfp8-52jq (critical) #3

Companion pin: torchvision 0.14.1 → 0.21.0 (the release paired with torch 2.6.0; it hard-pins torch==2.6.0).

Dockerfile change (required for the bump to be deployable)

torch 2.6.0 requires Python >= 3.9, but the image installed Python 3.8. Switched to python3.10 (newest version compatible with the existing numpy==1.22.0 pin), added python3.10-distutils, fixed the pre-existing update-alternatives typo (/usr/bin/pytho3) so /usr/bin/python3 actually points at 3.10, and switched installs to python3 -m pip so pip targets the right interpreter. Base CUDA image untouched — PyPI torch wheels bundle their own CUDA runtime (2.6.0 defaults to cu124; host driver must support CUDA 12.4, i.e. driver >= 550).

Incidentally cleared (same package bumps)

Still open, out of scope (critical-only pass)

Behavior note for reviewers

torch 2.6 flips the torch.load default to weights_only=True — this IS the CVE fix. Call sites (main_infer.py:17, merge.py:11-12, toolkit/chelper.py:61,71) load state_dict-style checkpoints, which is the supported pattern; if any existing checkpoint pickle contains non-tensor objects, loading will raise — re-save the checkpoint or pass weights_only=False for trusted local files. main.sh uses torch.distributed.launch --use_env, which is deprecated but still functional in 2.6.

Verification

  • uv pip compile requirements.txt --python-version 3.10 resolves cleanly: torch==2.6.0, torchvision==0.21.0, pillow==10.2.0, numpy==1.22.0 all coexist.
  • torch 2.6.0, torchvision 0.21.0, pillow 10.2.0 confirmed on PyPI (no heavy ML packages installed locally, per policy).

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