Skip to content

Security: Untrusted package installation from catalog config enables arbitrary code execution#731

Open
tuanaiseo wants to merge 1 commit intoalan-turing-institute:mainfrom
tuanaiseo:contribai/fix/security/untrusted-package-installation-from-cata
Open

Security: Untrusted package installation from catalog config enables arbitrary code execution#731
tuanaiseo wants to merge 1 commit intoalan-turing-institute:mainfrom
tuanaiseo:contribai/fix/security/untrusted-package-installation-from-cata

Conversation

@tuanaiseo
Copy link
Copy Markdown

Problem

install_package() builds a pip target directly from config["url"]/config["github_branch"] and installs it when allow_install is enabled. If a catalog/model config is attacker-controlled (or tampered), this can install and execute malicious package code during install/import.

Severity: critical
File: src/scivision/io/installer.py

Solution

Treat config as untrusted input: enforce a strict allowlist of approved package sources, require immutable pinned commit SHAs/tags (not branches), verify package integrity/signatures, and keep allow_install=False by default for runtime paths.

Changes

  • src/scivision/io/installer.py (modified)

Testing

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

… config

`install_package()` builds a pip target directly from `config["url"]`/`config["github_branch"]` and installs it when `allow_install` is enabled. If a catalog/model config is attacker-controlled (or tampered), this can install and execute malicious package code during install/import.

Affected files: installer.py

Signed-off-by: tuanaiseo <221258316+tuanaiseo@users.noreply.github.com>
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