CVE-2025-54558 Command injection in Codex CLI
OpenAI Codex CLI auto-approves ripgrep execution with dangerous flags, allowing attackers to execute arbitrary commands.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- None listed
What is CVE-2025-54558?
CVE-2025-54558 is a medium-severity command injection vulnerability in OpenAI Codex CLI, published on 25 Jul 2025. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official description
OpenAI Codex CLI before 0.9.0 auto-approves ripgrep (aka rg) execution even with the --pre or --hostname-bin or --search-zip or -z flag.
Weakness: CWE-829
Which versions are affected by CVE-2025-54558?
How do I fix CVE-2025-54558?
No fix has been published for CVE-2025-54558 yet. Limit exposure of the affected software until one is available.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2025-54558 being exploited?
There is no known exploitation of CVE-2025-54558 in the wild and no public exploit code.
Sources
Also known as GHSA-q6hp-29g8-7j6j.