Fix 2 issues flagged across 2 files - #5
Open
begininvoke wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A scan flagged a few things in this repository. This changes 2 files — one item each, described below.
1.
eval/requirements.txt, around line 22CRITICAL severity: Remote Code Execution in PyTorch (CVE-2025-32434). The project pins torch==2.2.0 in eval/requirements.txt (line 22), which is affected by a deserialization flaw where loading a crafted model checkpoint via torch.load() — even with weights_only=True, the historically 'safe' loading mode — allows arbitrary code execution on the host. Impact: any workflow that loads model weights from untrusted or semi-trusted sources (user uploads, public model hubs, shared artifacts, poisoned CI caches) becomes an RCE vector, potentially leading to full server compromise, credential/secret theft, and tampering with models or training data. Risk is rated CRITICAL because exploitation requires only delivering a malicious checkpoint file and it defeats the standard weights_only=True mitigation, so no code changes in the consuming application are needed for an attacker. Remediation: upgrade torch to >= 2.6.0 (patched version), regenerate any lock files, re-run the evaluation pipeline to confirm compatibility (including CUDA/torchvision matching versions), and review torch.load call sites to ensure only trusted artifacts are loaded going forward.
Upgrade torch and pillow to fixed versions to resolve critical CVEs.
For reference: rule
CVE-2025-32434. Rated critical.2.
requirements.txt, around line 15CRITICAL — Remote Code Execution in PyTorch model loading (CVE-2025-32434)
The pinned
torch==2.5.1+cu121in requirements.txt is vulnerable to a remote code execution flaw during deserialization. The key danger of this CVE is that it bypassestorch.load(..., weights_only=True), which developers have historically treated as the safe way to load model checkpoints. This means the usual mitigation pattern offers no protection.Impact: Any code path that loads a model file from a source an attacker can influence (user-uploaded checkpoints, model registries, artifacts fetched from external storage, CI pipelines pulling third-party models) becomes an RCE vector — an attacker crafts a malicious model file, and loading it executes arbitrary code on the host with the service's privileges.
Risk level: CRITICAL (CVSS ~9.3). Exploitation is trivially scriptable, the vulnerable pattern (
torch.load) is ubiquitous in ML services, and the common defense (weights_only=True) is ineffective in the affected versions.Remediation: Upgrade to PyTorch >= 2.6.0, where the deserialization path is patched. Note: 2.6.0 does not publish
+cu121wheels — available CUDA builds are cu118/cu124/cu126 — so the CUDA variant pin (and any wheel index URL) must be updated as well. Iftorchvision/torchaudioare present, bump them to 0.21.0/2.6.0 for ABI compatibility.Updates torch and pillow to versions fixing known CVEs.
For reference: rule
CVE-2025-32434. Rated critical.Take or leave whichever parts are useful. If this is not the right approach, closing is fine.
Found with automated scanning (RedGem) and reviewed before opening. If it is not useful, closing it is completely fine.