Security Report: Unauthorized Directory Traversal in Codex
Resolved 💬 1 comment Opened Nov 17, 2025 by dikaio Closed Nov 17, 2025
What version of Codex is running?
codex-cli 0.58.0
What subscription do you have?
Business Plan
Which model were you using?
gpt-5.1-codex
What platform is your computer?
Darwin 24.6.0 arm64 arm
What issue are you seeing?
Codex, when operating within a specific project context (e.g., ProjectA - a Next.js application), is performing file system operations that extend beyond the authorized project directory. Specifically:
- Expected Behavior: Codex should only access files within
/path/to/projectA/ - Actual Behavior: Codex uses commands like
grepto traverse and scan arbitrary directories across the entire operating system - Scope Violation: No authorization has been granted for accessing files outside the current project scope
What steps can reproduce the bug?
- Initialize Codex within a Next.js project (ProjectA)
- Monitor file system access using system monitoring tools
- Observe
grepcommands being executed with paths outsideprojectA/
Example of Unauthorized Access
# Expected (authorized) operation:
grep -r "pattern" /home/user/projectA/
# Observed (unauthorized) operation:
grep -r "pattern" /home/user/
grep -r "pattern" /
What is the expected behavior?
Codex should respect the user's scope. There are potentially huge implications for not doing so.
- Data Exposure (Critical)
- Unauthorized access to sensitive files outside project scope
- Potential exposure of credentials, API keys, and configuration files
- Access to other projects' proprietary source code
- Privacy Violation (High)
- Scanning of personal or confidential documents
- Violation of data segregation principles
- Potential compliance violations (GDPR, CCPA, etc.)
- Cross-Project Contamination (Medium-High)
- Risk of information leakage between unrelated projects
- Potential for unintended code or data correlation
- System Reconnaissance (Medium)
- Ability to map the entire file system structure
- Identification of installed software and system configuration
Additional information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗