{"answers":{"affected":"1 open source package ship an affected version, including local-operator.","exploited":"There is no known exploitation of PYSEC-2026-4009 in the wild and no public exploit code.","fix":"Upgrade local-operator to 0.47.5 or later.","what":"PYSEC-2026-4009 is a vulnerability in local-operator, published on 5 Sep 2026."},"fix_prompt":"Check this codebase for PYSEC-2026-4009 and fix it if it is affected.\n\nWhat it is: PYSEC-2026-4009 is a vulnerability in local-operator, published on 5 Sep 2026. \nExploitation: There is no known exploitation of PYSEC-2026-4009 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- local-operator (PyPI): affected all versions; fixed in 0.47.5\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/PYSEC-2026-4009/ (Markdown: https://insights.sbomify.com/PYSEC-2026-4009/index.md)","id":"PYSEC-2026-4009","markdown":"https://insights.sbomify.com/PYSEC-2026-4009/index.md","name":"PYSEC-2026-4009","record":{"aliases":["GHSA-22mg-8gw7-636x"],"analysis":null,"analysis_generated_by":null,"assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"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.\n\nVersion 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.","ecosystems":["PyPI"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Path traversal and arbitrary directory deletion/overwrite via agent profile import in local-operator","id":"PYSEC-2026-4009","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"PyPI","product":null,"products":[],"type":null,"year":"2026"},"n_packages":1,"n_references":null,"packages":[{"ecosystem":"PyPI","fixed":["0.47.5"],"introduced":["0"],"last_affected":[],"package":"local-operator","purl":"pkg:pypi/local-operator","source":"PYSEC-2026-4009"}],"products":null,"published":"2026-09-05","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":null,"url":"https://insights.sbomify.com/PYSEC-2026-4009/"}