threatdeck
Live 13:45 UTC ·

All AI tools

OpenAI Codex CLI

OpenAI · CLI agent · homepage · openai/codex

0.171.0latest (2026-11-20)
0.39.0minimum safe version
4advisories for OpenAI Codex CLI

Minimum safe version is set by CVE-2025-59532 (Sandbox bypass due to bug in path configuration logic, fixed in 0.39.0): the highest fix among OpenAI Codex CLI's medium-or-higher advisories. Only advisories for OpenAI Codex CLI itself are counted; other components and ecosystem projects are listed separately below. 3 medium-or-higher advisories list no fixed version: check the vendor's guidance before relying on the minimum.

Advisories

IDTitleSeverityFixed inPublished
CVE-2026-19592 OpenAI Codex CLI for Windows, macOS, and Linux and Codex Desktop for Windows and macOS automatically collected Git repository metadata witho… High — 2026-09-01
CVE-2026-19591 OpenAI Codex CLI for Windows, macOS, and Linux and Codex Desktop for Windows and macOS misclassified certain PowerShell commands as safe bec… High — 2026-09-01
CVE-2025-61260 OpenAI Codex CLI enables code execution through malicious MCP (Model Context Protocol) configuration files Critical — 2026-04-14
CVE-2025-59532 Sandbox bypass due to bug in path configuration logic · sets minimum safe version High 0.39.0 2025-09-19

Advisories for other OpenAI components or third-party projects that build on OpenAI Codex CLI. Not counted above and not used for the minimum safe version.

IDComponentTitleSeverityFixed inPublished
CVE-2026-64650 @ai-sdk/harness-opencode tool The `@ai-sdk/harness-opencode` tool is an HarnessV1 adapter backed by @openai/codex-sdk, which drives the codex command line interface. Prio… Medium — 2026-07-20

Hardening checklist

  • Keep auto-update enabled and verify the installed version against the minimum safe version.
  • Do not open untrusted repositories with agent mode or auto-approve enabled.
  • Restrict MCP servers to an allowlist; review each server's permissions and publisher.
  • Never place secrets in project files the agent can read; use a secrets manager or env injection.
  • Keep sandbox mode enabled (workspace-write or read-only) for untrusted code.

Data exposure

What OpenAI Codex CLI keeps on a developer machine, what it sends, and the settings that reduce exposure. Local transcripts can contain anything pasted into a session, including secrets: include these paths in secret scanning and offboarding.

Stored locally

WhatWhere
Session transcripts (on by default).~/.codex/history.jsonl (under CODEX_HOME)
Persisted threads (rollout files) used to resume sessions.~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl
Cached login details in a plaintext file when file storage is used.~/.codex/auth.json, or the OS credential store
Log files.$CODEX_HOME/log

Sent to the vendor

Prompts and code context go to OpenAI. Codex also sends anonymous usage and health metrics by default, which OpenAI says contain no PII. /feedback submissions are sent unless disabled.

Retention and training

Signed in with ChatGPT, usage follows the workspace's ChatGPT retention and residency settings. With an API key, it follows the API organization's settings: API data is not used for training unless you opt in, and abuse-monitoring logs are kept up to 30 days unless Zero Data Retention or Modified Abuse Monitoring is approved.

Settings that reduce exposure

[history] persistence = "none"
Stops saving local session transcripts to history.jsonl.
history.max_bytes
Caps the history file size by dropping the oldest entries.
cli_auth_credentials_store = "keyring" (or "ephemeral")
Stores credentials in the OS credential store (or only in memory) instead of auth.json.
[analytics] enabled = false
Disables anonymous usage metrics sent to OpenAI.
[feedback] enabled = false
Disables /feedback submissions from the CLI, IDE extension and desktop app.
otel.log_user_prompt = false
Keeps prompt text redacted in OpenTelemetry exports (redacted unless explicitly enabled).

For administrators

  • requirements.toml (/etc/codex/requirements.toml on Linux/macOS, %ProgramData%\OpenAI\Codex\requirements.toml on Windows, cloud-managed, or macOS MDM) enforces approval policy, sandbox mode, web search, managed hooks and allowed MCP servers.
  • allowed_login_methods, allowed_chatgpt_workspaces and cli_auth_credentials_store can be pinned in the local system requirements file or macOS MDM.
  • Administrators can enforce OpenTelemetry exporters and prompt-logging settings in requirements.toml.

Sources: Codex docs: Advanced configuration (state locations, history, metrics, feedback) · Codex docs: Configuration reference · Codex docs: Authentication (login caching, credential storage) · Codex docs: Managed configuration · openai/codex: TypeScript SDK README (threads in ~/.codex/sessions) · OpenAI API docs: Your data · BoostSecurity Bagel: AI CLI probe (Codex/Gemini/Claude file locations) · reviewed 2026-11-09

Rolling these tools out? See the playbook Secure AI coding tools in your organisation.

Lock it down: AI hardening kit (managed settings and MCP allowlist generators, free, in your browser).

Check your version

Via the public API:

curl -s "https://threatdeck.net/api/v1/tools/openai-codex-cli/check?version=<your-version>"

Or ask your agent through the ThreatDeck MCP server (https://threatdeck.net/mcp):

check_ai_tool_version { "slug": "openai-codex-cli", "version": "<your-version>" }

Updated 2026-11-22

Following

Follow the vendors, products, AI tools, techniques and actors you care about. Matching stories, CVEs and exploited bugs are marked, a Following tab appears in the feed, and returning visits show what changed. Saved only in this browser.

Presets

Get updates

A personal RSS feed of new stories on everything you follow. Paste it into any feed reader, Slack or Teams RSS app.