Skip to content

fix: remove unsafe exec() in serve.py#45121

Closed
orbisai0security wants to merge 1 commit intohuggingface:mainfrom
orbisai0security:fix-fix-v007-load-model-arbitrary-path-rce
Closed

fix: remove unsafe exec() in serve.py#45121
orbisai0security wants to merge 1 commit intohuggingface:mainfrom
orbisai0security:fix-fix-v007-load-model-arbitrary-path-rce

Conversation

@orbisai0security
Copy link
Copy Markdown

Summary

Fix critical severity security issue in src/transformers/cli/serve.py.

Vulnerability

Field Value
ID V-007
Severity CRITICAL
Scanner multi_agent_ai
Rule V-007
File src/transformers/cli/serve.py:754

Description: The /load_model endpoint allows loading arbitrary models without authentication or validation. Attackers can load malicious pickle files containing arbitrary Python code that executes during deseri...

Changes

  • src/transformers/cli/serve.py

Verification

  • Build passes
  • Scanner re-scan confirms fix
  • Code review passed

Automated security fix by OrbisAI Security

The /load_model endpoint allows loading arbitrary models without authentication or validation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants