OpenAI Codex CLI Ripgrep Execution Auto-Approval Vulnerability

Vulnerability

A vulnerability exists in OpenAI Codex CLI versions prior to 0.9.0, where the application automatically approves the execution of ripgrep (rg) commands. This auto-approval occurs even when potentially harmful flags are used, such as '--pre', '--hostname-bin', '--search-zip', or '-z'. The issue arises because the CLI does not properly validate these flags before granting permission to execute the command.

Impact

Exploitation of this vulnerability could lead to unauthorized execution of ripgrep commands with unsafe flags, allowing for potential manipulation or access to sensitive information.

Reproduction

To reproduce this vulnerability, use OpenAI Codex CLI version 0.8.0 or earlier. Initiate a command that includes ripgrep with any of the unsafe flags: '--pre', '--hostname-bin', '--search-zip', or '-z'. The CLI will automatically approve the command without the necessary safeguards.

Remediation

Users can update to OpenAI Codex CLI version 0.9.0 or later, where this vulnerability has been addressed.

Added: Jul 25, 2025, 2:19 AM
Updated: Jul 25, 2025, 2:19 AM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
3.1
exploitability
5.7
remediation
0.0
relevance
0.3
threat
4.8
urgency
2.9
incentive
0.8

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.