openai / openai/codex

Codex CLI writing outside the authorized directories

Open
#45,360 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug CLI sandbox
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

What version of Codex CLI is running?

Codex CLI 0.153.4

What subscription do you have?

Pro

Which model were you using?

5.6-sol-xhigh

What platform is your computer?

Linux 6.18.35-1-lts x86_64 unknown

What terminal emulator and version are you using (if applicable)?

Alacritty

Codex doctor report

What issue are you seeing?

Managed workspace-write profile
Writable roots: project workspace and /tmp
apply_patch successfully wrote to ~/.codex/config.toml and
~/.dotfiles/config/zsh/zshrc without escalation.
A normal subprocess writing ~/.codex was correctly denied with EROFS.

What steps can reproduce the bug?

Uploaded thread: 01a09e5c-ce32-7f03-852f-d5fcc5390b34

What is the expected behavior?

No response

Additional information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the uploaded thread and the managed workspace-write profile, then trace how apply_patch handles writes to ~/.codex/config.toml and ~/.dotfiles/config/zsh/zshrc compared with a normal subprocess writing ~/.codex. Done means writes outside the project workspace and /tmp are denied or require escalation consistently with subprocess behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
authorization, cli, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.