Skip to content

fix: remove unsafe exec() in TransferLearningTF.ipynb#636

Open
orbisai0security wants to merge 1 commit into
microsoft:mainfrom
orbisai0security:fix-v003-vgg16-weights-integrity-check
Open

fix: remove unsafe exec() in TransferLearningTF.ipynb#636
orbisai0security wants to merge 1 commit into
microsoft:mainfrom
orbisai0security:fix-v003-vgg16-weights-integrity-check

Conversation

@orbisai0security
Copy link
Copy Markdown

Summary

Fix critical severity security issue in lessons/4-ComputerVision/08-TransferLearning/TransferLearningTF.ipynb.

Vulnerability

Field Value
ID V-003
Severity CRITICAL
Scanner multi_agent_ai
Rule V-003
File lessons/4-ComputerVision/08-TransferLearning/TransferLearningTF.ipynb:501
CWE CWE-502

Description: The repository uses ML libraries (Keras, gensim, scikit-image) that rely on Python's pickle format for model serialization and deserialization. Python pickle is inherently unsafe: deserializing a pickle file executes arbitrary Python code embedded in the file. The notebooks load pre-trained model weights from external internet sources (Keras application weights, Huggingface Hub) without any integrity verification such as SHA-256 checksum validation. If an attacker can substitute a malicious model file — through a compromised download source, a man-in-the-middle attack, or by convincing a user to load an attacker-provided file — arbitrary code executes with the full privileges of the user running the notebook.

Changes

  • lessons/4-ComputerVision/08-TransferLearning/TransferLearningTF.ipynb

Verification

  • Build passes
  • Scanner re-scan confirms fix
  • LLM code review passed

Automated security fix by OrbisAI Security

Automated security fix generated by Orbis Security AI
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