# PYSEC-2026-4010: Arbitrary file read via workspace confinement bypass in local-operator /v1/chat/agents/{id}/edit

> Unauthenticated attackers can read arbitrary files from the server via path traversal in the local-operator API, exposing sensitive data.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 5 Sep 2026
- **Also known as:** GHSA-3xjw-9qpc-53mh

## What is PYSEC-2026-4010?

PYSEC-2026-4010 is a path traversal vulnerability in local-operator, published on 5 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

The `/v1/chat/agents/{agent_id}/edit` endpoint in local-operator versions before 0.47.5 resolves the caller-supplied `file_path` with `expanduser().resolve()` and reads it without checking that it lies inside the agent's workspace. An unauthenticated client with network access to the API can supply an absolute path or a path containing traversal sequences and obtain the contents of any file readable by the server process, which are placed in the model prompt and returned in the response.

Version 0.47.5 resolves server-side reads within the agent's configured workspace and rejects canonical paths outside it (including symlink and junction escapes) before any model call, adds an optional `file_content` request field so clients can submit a buffer without host path resolution, and binds `lop serve` to 127.0.0.1 by default.

## Which versions are affected by PYSEC-2026-4010?

1 open source package ship an affected version, including local-operator.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `local-operator` | PyPI | All versions | 0.47.5 |

## How do I fix PYSEC-2026-4010?

Upgrade local-operator to 0.47.5 or later.

## Is PYSEC-2026-4010 being exploited?

There is no known exploitation of PYSEC-2026-4010 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for PYSEC-2026-4010 and fix it if it is affected.

What it is: PYSEC-2026-4010 is a path traversal vulnerability in local-operator, published on 5 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of PYSEC-2026-4010 in the wild and no public exploit code.

Affected packages and fixed versions:
- local-operator (PyPI): affected all versions; fixed in 0.47.5

Task:
1. 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.
2. 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.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/PYSEC-2026-4010/ (Markdown: https://insights.sbomify.com/PYSEC-2026-4010/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/PYSEC-2026-4010

---
From sbomify Insights: https://insights.sbomify.com/PYSEC-2026-4010/
Summaries are generated and may contain mistakes; the official description above is the record.
