Skip to content

Security: Unpinned remote model downloads allow supply-chain substitution#249

Open
tuanaiseo wants to merge 1 commit intoOpenBMB:mainfrom
tuanaiseo:contribai/fix/security/unpinned-remote-model-downloads-allow-su
Open

Security: Unpinned remote model downloads allow supply-chain substitution#249
tuanaiseo wants to merge 1 commit intoOpenBMB:mainfrom
tuanaiseo:contribai/fix/security/unpinned-remote-model-downloads-allow-su

Conversation

@tuanaiseo
Copy link
Copy Markdown

Problem

from_pretrained downloads model artifacts from Hugging Face based on runtime-provided identifiers. Without pinning to a specific immutable revision/commit hash and integrity verification, a changed or compromised upstream repository can silently alter downloaded artifacts, potentially introducing malicious weights or backdoored configs.

Severity: medium
File: src/voxcpm/core.py

Solution

Require/encourage a pinned revision (commit SHA), validate file hashes, and optionally enforce an allowlist of trusted model IDs. Surface warnings when loading unpinned remote artifacts.

Changes

  • src/voxcpm/core.py (modified)

Testing

  • Existing tests pass
  • Manual review completed
  • No new warnings/errors introduced

…hain

`from_pretrained` downloads model artifacts from Hugging Face based on runtime-provided identifiers. Without pinning to a specific immutable revision/commit hash and integrity verification, a changed or compromised upstream repository can silently alter downloaded artifacts, potentially introducing malicious weights or backdoored configs.

Affected files: core.py

Signed-off-by: tuanaiseo <221258316+tuanaiseo@users.noreply.github.com>
@liuxin99
Copy link
Copy Markdown
Collaborator

Could you clarify the concrete use case for adding revision to from_pretrained() here? Once we open-source a model release, we generally do not modify that weight version afterward.

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.

2 participants