# GHSA-CM4P-5RFV-X252: Unauthenticated remote code execution via live coding agent replay (shell=True)

- Database: GitHub
- Severity: CVSS 9.8 (Critical)
- Published: 2026-08-26
- Modified: 2026-08-26

## Affected versions

- potato-annotation (PyPI): through 2.8.0

## Description

When a task configuration declares a `live_coding_agent` instance display field,
Potato registers a blueprint whose endpoints had no authentication check. The
application's global session gate does not cover them: it exempts the `/api/`
prefix, so it never ran for any route in that blueprint.

`POST /api/live_coding_agent/replay/<session_id>` accepted an `edited_actions`
list of tool calls supplied by the caller and executed each one. The `Bash` tool
was implemented with `subprocess.run(..., shell=True)` on the host, and the
`Read`, `Write` and `Edit` tools honoured absolute paths, so they reached any
file readable or writable by the Potato process.

The sandbox intended to contain this did not. `sandbox_mode: docker` was not
implemented and fell back to executing tools directly on the host with only a
log warning. The default mode, `worktree`, creates a git worktree on the same
host, as the same user, with the same network, and does not constrain command
execution.

Together this allowed an unauthenticated remote attacker to execute arbitrary
commands on the Potato host whenever the live coding agent display type was
configured.

**Affected:** 2.8.0 and earlier, only when a config declares a
`live_coding_agent` display field.
**Fixed in:** 2.8.1.

**Workaround for anyone who cannot upgrade:** remove `live_coding_agent` display
fields from your configs, which unregisters the blueprint.

## References

- https://github.com/davidjurgens/potato/security/advisories/GHSA-cm4p-5rfv-x252

Page: https://cve.now/GHSA-CM4P-5RFV-X252

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
