9.1critical
Path traversal and arbitrary directory deletion/overwrite via agent profile import in local-operator
- Severity
- 9.1critical CVSS:3.1 by PyPA Advisory Database
- Published
- Last changed
- Also known as
- PYSEC-2026-4009
Description
The /v1/agents/import endpoint and AgentRegistry.import_agent() in local-operator versions before 0.47.5 trust the id field inside agent.yml of an uploaded agent profile archive when constructing the destination directory. A crafted id containing directory traversal sequences makes shutil.rmtree and shutil.copy2 operate outside the agent registry, allowing an unauthenticated client with network access to the API to recursively delete arbitrary directories and write files with the privileges of the server process. Even without traversal, an imported archive could overwrite or delete existing local agent profiles.
Version 0.47.5 assigns a fresh server-generated identifier to every imported profile, never derives a filesystem path from archive metadata, creates destination directories exclusively, and binds lop serve to 127.0.0.1 by default.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| local-operator (PyPI) | before 29fc4c68a3ed1d238b8abf6b6a6136a3361416a5, before 0.47.5 | PyPA Advisory Database |
Classification
References
Sources
| Source | Record | Licence |
|---|---|---|
| PyPA Advisory Database | PYSEC-2026-4009 changed 2026-09-30 | CC-BY-4.0 |