What happened?
What happened: app/cli/core/writer.py constructs the deployment destination as Path(models_root) / answers.name / answers.version without validating that the resolved path stays within models_root. A
user passing --name ../../etc --version passwd would write files outside the intended directory.
Steps to reproduce
inference-engine deploy ./model.pkl --name ../../tmp --version pwned
Expected behavior
Command rejects any name/version containing path traversal sequences.
Environment
- OS: Any (Linux / macOS / Windows)
- Python version: 3.12+
- Inference Engine version/commit: main
- Execution backend: N/A (CLI deploy command, not the server)
Relevant logs or error output
What happened?
What happened:
app/cli/core/writer.py constructs the deployment destination asPath(models_root) / answers.name / answers.version without validating that the resolved path stays withinmodels_root. Auser passing
--name ../../etc --version passwdwould write files outside the intended directory.Steps to reproduce
inference-engine deploy ./model.pkl --name ../../tmp --version pwned
Expected behavior
Command rejects any name/version containing path traversal sequences.
Environment
Relevant logs or error output