Skip to content

Path traversal in inference-engine deploy via --name / --version flags #42

@atkaridarshan04

Description

@atkaridarshan04

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

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions