Skip to content

fix: remove unsafe exec() in app.py#977

Open
orbisai0security wants to merge 1 commit intomicrosoft:mainfrom
orbisai0security:fix-v-006-model-integrity-verification
Open

fix: remove unsafe exec() in app.py#977
orbisai0security wants to merge 1 commit intomicrosoft:mainfrom
orbisai0security:fix-v-006-model-integrity-verification

Conversation

@orbisai0security
Copy link
Copy Markdown

Summary

Fix critical severity security issue in 3-Web-App/1-Web-App/solution/web-app/app.py.

Vulnerability

Field Value
ID V-006
Severity CRITICAL
Scanner multi_agent_ai
Rule V-006
File 3-Web-App/1-Web-App/solution/web-app/app.py:1
CWE CWE-22

Description: The Flask web application loads a scikit-learn ML model serialized in Python's pickle or joblib format without verifying the file's integrity before loading. Python's pickle format is inherently unsafe — it executes arbitrary Python code during deserialization. If an attacker can replace the model file (via misconfigured file permissions, a path traversal vulnerability, or a compromised deployment pipeline), they can inject a malicious pickle payload that executes arbitrary operating system commands when the application starts or reloads the model.

Changes

  • 3-Web-App/1-Web-App/solution/web-app/app.py

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