The lean-ctx MCP server accepted absolute and parent-relative output paths in save/export tools because its default legacy workspace authority returned user-supplied paths without confinement. GHSA-483j-9vcj-2gxx demonstrates an overwrite outside the approved workspace under normal process filesystem permissions. It identifies 3.12.2 as patched and…
Inspect the ClaimsCase · DiggingBeagle record
lean-ctx MCP save and export tools wrote beyond their configured workspace
The lean-ctx MCP server accepted absolute and parent-relative output paths in save/export tools because its default legacy workspace authority returned user-supplied paths without confinement. GHSA-483j-9vcj-2gxx demonstrates an overwrite outside the approved workspace under normal process filesystem permissions.
Public disclosure: Nov 5, 2026
Reported security vulnerability; exploitation prerequisites and tested version scope matter. No real-world exploitation is established unless separately reported.
Assessment profile
Assessment method- Setting
- research demonstration
- Exploitation
- demonstrated
- Evidence
- Grade C
- Remediation
- patch available
- AI role
- AGAINST AI
Basis and provenance
research demonstration; demonstrated. The cited primary disclosure supports the specific sequence and boundaries described here: An agent calls lean-ctx save or export with an absolute or parent-relative destination. The evidence does not independently establish consequences beyond the record's supported outcome; a numerical impact band cannot be justified from the available evidence. Evidence grade C reflects the source attribution and independent verification limits.
Assessed Nov 7, 2026 using diggingbeagle.assessment/1.
Evidence basis: CLM-DB07-026-OUTCOME · CLM-DB07-026-MECHANISM · Advisory: lean-ctx MCP save/export file writes escape project jail through unchecked path
At a glance
Canonicalize and revalidate every write destination, including symlink targets, for all file-producing tools.
Read the implicationsLimited by process write permissions and generated output; not proven arbitrary binary execution or wild exploitation.
Limits and uncertaintyFull account
The lean-ctx MCP server accepted absolute and parent-relative output paths in save/export tools because its default legacy workspace authority returned user-supplied paths without confinement.
GHSA-483j-9vcj-2gxx demonstrates an overwrite outside the approved workspace under normal process filesystem permissions. It identifies 3.12.2 as patched and distinguishes the already confined handoff tool.
lean-ctx's legacy workspace authority did not confine every tool that created a file. In ctx_package save and ctx_pack export, the authorization helper returned absolute and parent-relative output paths without a final owned-workspace check. The advisory demonstrates writing to a sibling repository while a separate handoff feature already implemented confinement. This difference matters: patching one path-producing tool does not prove all exposed MCP methods now share the same enforcement. The published fixed release is 3.12.2. The demonstrated effect is an out-of-workspace write under the MCP process's operating-system privileges, not arbitrary privileged code execution.
The boundary failure sits in a shared path-confinement helper, but its consequences depend on which MCP tool calls it. Under the reported legacy authority mode, save and export routes accepted paths that could leave the project workspace; another route already enforced confinement. A patch that fixes only one tool leaves alternative file-producing routes open. The result is a file-write escape within the server's operating-system permissions, not independent proof that an arbitrary executable was launched.
Mechanism and trust boundary
- 01
An agent calls lean-ctx save or export with an absolute or parent-relative destination.
- 02
Legacy workspace authority returns the supplied path unchanged for those tools.
- 03
The MCP server writes generated content beyond the configured project directory under its own filesystem permissions.
Claims & evidence
CLM-DB07-026-OUTCOMEGHSA-483j-9vcj-2gxx demonstrates an overwrite outside the approved workspace under normal process filesystem permissions. It identifies 3.12.2 as patched and distinguishes the already confined handoff tool.supported
Basis: reported finding
- supportsAdvisory: lean-ctx MCP save/export file writes escape project jail through unchecked pathprimary disclosure
GHSA-483j-9vcj-2gxx; Authority::Legacy and ctx_package/ctx_pack
CLM-DB07-026-MECHANISMThe lean-ctx MCP server accepted absolute and parent-relative output paths in save/export tools because its default legacy workspace authority returned user-supplied paths without confinement.supported
Basis: reported finding
- supportsAdvisory: lean-ctx MCP save/export file writes escape project jail through unchecked pathprimary disclosure
GHSA-483j-9vcj-2gxx; Authority::Legacy and ctx_package/ctx_pack
Implications
Canonicalize and revalidate every write destination, including symlink targets, for all file-producing tools.
Unknowns and contradictions
- Limited by process write permissions and generated output; not proven arbitrary binary execution or wild exploitation.
Sources and citation
Material revision history
- Nov 7, 2026 · Published version · first publication · revision 227