Skip to content

fix: the /predict endpoint accepts file uploads with... in app.py#13638

Open
orbisai0security wants to merge 1 commit intotensorflow:masterfrom
orbisai0security:fix-v-005-predict-upload-limits
Open

fix: the /predict endpoint accepts file uploads with... in app.py#13638
orbisai0security wants to merge 1 commit intotensorflow:masterfrom
orbisai0security:fix-v-005-predict-upload-limits

Conversation

@orbisai0security
Copy link
Copy Markdown

Summary

Fix high severity security issue in official/projects/waste_identification_ml/docker_solution/prediction_api/app.py.

Vulnerability

Field Value
ID V-005
Severity HIGH
Scanner multi_agent_ai
Rule V-005
File official/projects/waste_identification_ml/docker_solution/prediction_api/app.py:47

Description: The /predict endpoint accepts file uploads without any rate limiting, file size restrictions, or input dimension validation. No MAX_CONTENT_LENGTH or equivalent framework configuration is present. ML inference is computationally expensive — processing large images consumes significant CPU and memory. An attacker (who requires no authentication per V-004) can submit a continuous stream of large image files or a single extremely large file (e.g., a gigapixel image or decompression bomb) to exhaust all available CPU, memory, and disk resources on the prediction server.

Changes

  • official/projects/waste_identification_ml/docker_solution/prediction_api/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