OpenAI Codex security incidents and advisories

Two published Codex advisories affect the CLI and IDE extension: a sandbox bypass fixed in CLI 0.39.0 and a critical code execution issue from project config files in @openai/codex. This page explains what each flaw allowed, which versions are affected, and how to set a patching policy around them.

On this page

Does OpenAI Codex have a clean security record for enterprise approval?

A security or platform lead deciding whether Codex can run on staff laptops and CI hosts should start with the advisories, which OpenAI publishes in the security advisories section of the openai/codex repository. The two flaws covered here, a sandbox bypass and code execution from repository configuration files, both have fixed versions, so approval turns on a minimum version and a patching policy that enforces it, not on which ChatGPT plan or edition the team buys. The Codex CLI is Apache-2.0 licensed, so engineers can read the source, review the change that fixed each flaw and pin a known build. The fixed CLI version does not match the fixed IDE extension version, so each channel needs its own floor.

The first, GHSA-w5fx-fh39-j5rw (CVE-2025-59532), was published September 19, 2025 and carries a CVSS v4.0 score of 8.6. The Codex CLI treated a model-generated working directory as the sandbox's writable root. Affected versions were Codex CLI 0.2.0 through 0.38.0 and the IDE extension 0.4.11 and earlier, fixed in CLI 0.39.0 and extension 0.4.12. The advisory says the flaw allowed arbitrary file writes and command execution wherever the Codex process had permissions, and that the network-disabled restriction was not affected. The second, GHSA-xrxf-jgv3-qmrm (CVE-2025-61260), was published April 14, 2026 and is rated Critical at CVSS 3.1 9.8. It covers code execution in @openai/codex 0.23.0 and earlier from project-local .env and .codex/config.toml files loaded without user confirmation. Confirm its fixed version in the advisory text before writing it into policy.

Exposure depends on how Codex reached each machine. A CLI installed through npm carries a different version history from the IDE extension, and a CI host may pin a build that no laptop check will see. Build an inventory that records the install channel, version and host for every copy, then set a minimum version per channel and have the patch process enforce it. Do not treat the repository advisories page as a complete list: as of November 2026 it showed only the first advisory, so check the GitHub advisory database for the second as well. A clean-looking list does not establish that Codex has no other flaws, so pair the version floor with the sandbox and approval settings reviewed elsewhere on this page.

Which Codex versions each published advisory affects and fixes

This table compares each published Codex advisory by identifier, component, affected range, fixed version, severity and what the flaw allowed. Read the affected and fixed columns together, and treat any version floor as provisional until you confirm it in the advisory itself. The main takeaway is that the two advisories cover different components, so a single Codex version number does not settle your exposure.

AdvisoryComponent and affected versionsFixed versionSeverity and what the flaw allowed
GHSA-w5fx-fh39-j5rw (CVE-2025-59532), published September 19, 2025Codex CLI 0.2.0 through 0.38.0; Codex IDE extension 0.4.11 and earlierCLI 0.39.0; IDE extension 0.4.12CVSS v4.0 8.6. Sandbox bypass where a model-generated working directory was treated as the writable root, allowing arbitrary file writes and command execution where the Codex process had permissions. The network-disabled restriction was not affected.
GHSA-xrxf-jgv3-qmrm (CVE-2025-61260), published April 14, 2026@openai/codex 0.23.0 and earlier, loaded from project-local .env and .codex/config.toml filesNot in the supplied advisory summary. Confirm in the advisory before setting a floorCritical, CVSS 3.1 9.8. Code execution from project-local configuration loaded without user confirmation.
Advisory listing checkRepository advisories page listed one published advisory as of November 2026Not applicableBecause the repository page showed only GHSA-w5fx-fh39-j5rw at that date, check the package advisory listing for GHSA-xrxf-jgv3-qmrm separately.

How the sandbox bypass and config file execution reached the host

The first flaw, published as GHSA-w5fx-fh39-j5rw (CVE-2025-59532) on September 19, 2025, sits in how the Codex CLI decided where it was allowed to write. The CLI treated a working directory generated by the model as the sandbox's writable root. Once the sandbox trusted the wrong directory as its boundary, the Codex process could perform arbitrary file writes and command execution using the permissions it already held on the machine. The advisory lists Codex CLI 0.2.0 through 0.38.0 and the Codex IDE extension 0.4.11 and earlier as affected, with fixes in CLI 0.39.0 and extension 0.4.12, and a CVSS v4.0 score of 8.6. The same advisory states that the network-disabled restriction was not affected, so a reviewer should not read this flaw as a network exposure. The practical question is which user account, file system paths and credentials the Codex process could reach on each developer machine.

The second flaw, GHSA-xrxf-jgv3-qmrm (CVE-2025-61260), was published on April 14, 2026 and rated Critical (CVSS 3.1 9.8). It affects @openai/codex 0.23.0 and earlier. Project-local .env and .codex/config.toml files were loaded without asking the user to confirm. A developer who clones or opens a repository therefore may run code simply by working in it, without any prompt from the agent. Here the sandbox is not the boundary at all, because the configuration is read before the user has made a trust decision about the project.

Both flaws point to the same rule for a rollout. A sandbox is only as strong as the directories and permissions it is told to protect, and any file inside a repository, including configuration, is input written by whoever controls that repository, which may include a contributor, a dependency or a pull request author. Ask your security team to confirm which Codex version each developer and CI image runs, to require the fixed versions named in the advisories, and to treat repositories from outside your trust boundary as untrusted until reviewed. Patching policy should also cover the IDE extension separately from the CLI, since the two have different fixed versions.

Where a repository and a model-generated path reach the host

This simplified model starts when a developer opens or clones a repository. Codex then loads project-local .env and .codex/config.toml files, and the agent proposes a working directory that the sandbox treats as its writable root. The advisory for the Codex CLI sandbox bypass describes that step as the point where the model-generated directory became writable, and the fixed CLI 0.39.0 and IDE extension 0.4.12 changed that outcome. The configuration loading step is covered by the separate advisory for @openai/codex 0.23.0 and earlier. Check whether your fleet still runs an affected version, and remember that commands still run with the host user's permissions when the sandbox or approval step does not stop them.

A simplified decision path showing where fixed versions and host account rights change the outcome.

Which Codex controls limit what a flaw can reach

The network-disabled restriction did not stop the flaw in GHSA-w5fx-fh39-j5rw. The advisory states that the arbitrary file write and command execution path was not affected by that restriction, so turning off network access does not close this class of exposure. Treat it as a control against outbound data movement and remote fetching only. Confirm with the Codex security and approvals documentation on learn.chatgpt.com/docs (linked from the Codex admin rollout guide) how network settings interact with the sandbox in the version you run, and do not record network-off as a mitigation for this advisory in your risk register.

The sandbox mode and approval policy shape what a command may do, but in the sandbox bypass they depend on the sandbox's writable root being correct. In GHSA-w5fx-fh39-j5rw the CLI treated a model-generated working directory as that root, so a restrictive mode could still permit writes outside the intended area, and any command the process was permitted to run stayed available. Before you rely on a read-only or workspace-write setting, confirm how the fixed root is determined in your installed version, and note that a stricter approval policy only reduces what runs without a prompt, not what the process can reach once a command is approved. Settings that the organization enforces centrally are a separate question covered on the admin controls page.

Project-local configuration must be treated as untrusted input until the fixed version is installed. GHSA-xrxf-jgv3-qmrm (CVE-2025-61260) describes code execution from a project's .env and .codex/config.toml files loaded without user confirmation, so cloning an unfamiliar repository can run code before anyone reviews it. Until your fleet is confirmed at or above the fixed versions in the advisories, instruct staff to open untrusted repositories in a clean environment, review .codex and .env files first, and report any version found below the fixed release to the platform owner.

Gaps in the advisory record that a reviewer should raise

The published Codex advisories answer what was broken and which versions were fixed, but they leave open how many advisories exist, how long flaws were exposed and whether a given install is patched. Each card below names one gap and the internal check that closes it.

Two sources, not one

The openai/codex security advisories page listed one published advisory, GHSA-w5fx-fh39-j5rw, as of November 2026. A separate GitHub advisory, GHSA-xrxf-jgv3-qmrm, covers the @openai/codex npm package. A reviewer who reads only the repository page will miss the npm disclosure. Subscribe to both sources and record which one each finding came from in the approval file.

npm advisory record

No fix version for the npm advisory

The supplied record for GHSA-xrxf-jgv3-qmrm states that @openai/codex 0.23.0 and earlier are affected, but it does not give a fixed version in the material reviewed for this page. Do not assume that a newer npm release is patched. Confirm the first fixed version against the live advisory before setting a version floor, and treat any installed version at or below 0.23.0 as exposed until that check is complete.

Read the advisory

No exposure window in the advisories

The advisories give publication dates but do not show when each flaw was introduced or how long it could be exploited before disclosure. A reviewer cannot tell from the record whether a given laptop or CI runner ran a vulnerable build for weeks or months. Ask OpenAI for the introduction and fix dates of each flaw, and check your own endpoint and pipeline logs for installed versions over the same period to estimate exposure.

Fixed versions differ by channel

The sandbox bypass advisory names a fixed Codex CLI release and a separate fixed IDE extension release, while the npm package follows its own version line. A machine can therefore be patched in one channel and exposed in another. Build an inventory that records the CLI, the IDE extension and the npm package separately, and set a version floor for each channel in the approved software list.

Repository content and provider settings

Vendor advisories describe flaws in Codex itself. They do not review your repositories, your project-local .env and .codex/config.toml files, or any custom model provider settings your teams add. A clean advisory record does not prove that a cloned repository is safe to open. Run a pre-approval test that shows how Codex handles project configuration files in a disposable repository before any team opens internal code.

Monitor the advisory feed continuously

Advisory pages change after publication, and a reviewer approving Codex in one quarter may miss a later notice. Assign an owner to check the repository advisories page and the npm advisory feed on a fixed schedule, and to re-run the internal version inventory after each new notice. Record the date each check was made so the audit trail shows when your organization learned of each disclosure.

Codex advisories page

How patching differs by Codex installation channel

The Codex CLI is built from the openai/codex repository, which is licensed under Apache-2.0. For this channel, the advisory that matters is GHSA-w5fx-fh39-j5rw, which covers CVE-2025-59532. It describes a sandbox bypass in which the CLI treated a model-generated working directory as the sandbox's writable root, allowing arbitrary file writes and command execution where the Codex process had permissions.

  • Affected range. CLI versions 0.2.0 through 0.38.0 fall within this advisory.
  • Fixed version. Require 0.39.0 or later, and confirm the installed version on each device before closing the finding.
  • How to learn of releases. Watch the repository's releases and its security advisories page so that new advisories reach the security team as well as the developers.
  • Ownership. On managed devices, IT or platform engineering should own the binary and its version inventory. On unmanaged devices, the developer usually updates the binary, so the security team needs a way to locate older builds.

Confirm with OpenAI whether any CLI release after 0.39.0 carries a separate advisory before you set the minimum version in policy.

Setting a patching policy for Codex advisories

This sequence turns the published Codex CLI and IDE extension advisories into a patching policy you can enforce and audit. It ends with a dated inventory, approved minimum versions, a monitored advisory feed, a tested rule for untrusted repository configuration, and a documented exception record.

  1. Inventory every Codex installation

    Identify each Codex CLI, IDE extension and npm installation across managed laptops, unmanaged personal devices used for work, shared workstations and CI runners. Ask endpoint management for software inventory exports, ask developers to report local installs, and check build images for a globally installed @openai/codex package. Done means every installation has a device or runner owner, an installed version and a channel (CLI, IDE extension or npm), recorded in a single register.

  2. Set minimum approved versions per channel

    Set a minimum approved version for the Codex CLI and for the IDE extension separately, using the fixed versions in advisory GHSA-w5fx-fh39-j5rw: CLI 0.39.0 and extension 0.4.12. Also check the npm package advisory GHSA-xrxf-jgv3-qmrm, which affects @openai/codex 0.23.0 and earlier, so the npm channel has its own floor. Record the approved version set and the approver. Done means a written baseline exists for each channel and anything below it is flagged in the register.

  3. Subscribe to vendor advisory feeds

    Have the security team watch the openai/codex security advisories page and the GitHub advisory listing for the @openai/codex package. Confirm that notifications reach a shared mailbox or ticket queue rather than one person. Note that the advisories page listed one published advisory as of November 2026, so a quiet page does not replace checking the package listing. Done means both feeds route to a named owner and a test notification has been received.

  4. Set time-to-patch targets by severity

    Write your own time-to-patch targets for Critical and High advisories and approve them through your change or risk process. Base the targets on your internal policy, not on a vendor figure, and state how a Critical rating from a CVSS score is mapped to your categories. Confirm whether your CI runners can be updated on the same schedule as developer laptops. Done means a signed policy names the targets, the scope (CLI, extension, npm, CI) and who can grant an extension.

  5. Test untrusted repository configuration handling

    Using a test repository you create for this purpose, add project-local .env and .codex/config.toml files that you know are inert, then open it on a patched and an unpatched build. Confirm that the tool asks for confirmation before loading project-local files and that unexpected settings are not applied silently. Treat any cloned third-party repository as untrusted until this check passes. Done means a dated test record shows the observed prompts and results for each version in your baseline, and the team knows which repositories may be opened only in a trusted state.

  6. Re-verify after each new release

    When OpenAI publishes a new CLI or extension release, repeat the inventory check and confirm the installed version against the approved baseline. Re-run the configuration test if the release notes or advisories mention changes to sandbox paths or project-local file loading. Done means the register shows the new version, the date of verification and the person who signed off, and any device still below the baseline is queued for update.

  7. Record exceptions with owners and review dates

    For any device or runner that cannot meet the minimum version within your target, record an exception with a named owner, the business reason, compensating controls such as restricting the tool to trusted repositories, and a review date set by your risk owner. Review each open exception on its date and close it once the version is updated. Done means the exception log is complete, every entry has an owner and review date, and expired exceptions are escalated.

Questions procurement and security reviewers ask about Codex advisories

Does moving to a higher ChatGPT plan remove the Codex advisories?

No. The published advisories concern software installed on your machines, so a plan change does not patch them. The Codex CLI advisory GHSA-w5fx-fh39-j5rw lists Codex CLI 0.2.0 through 0.38.0 and the Codex IDE extension 0.4.11 and earlier as affected, fixed in CLI 0.39.0 and extension 0.4.12. The second advisory, GHSA-xrxf-jgv3-qmrm (CVE-2025-61260), affects @openai/codex 0.23.0 and earlier. Your exposure depends on the versions installed, not on the subscription tier. Check each endpoint's version against these ranges and confirm the fixed versions with OpenAI's advisory pages before you close the finding.

Are Codex cloud tasks affected by the CLI and extension flaws?

The two published advisories describe the local CLI and IDE extension, so they do not describe cloud task execution. Cloud tasks run in OpenAI's environment rather than on the developer's laptop, but that is a separate question from whether the cloud service has its own vulnerabilities. Ask OpenAI in writing how cloud task sandboxes are isolated, what they can reach, and how they are reviewed for security. Note that the GitHub security advisories page listed one published advisory as of November 2026, so an absence of advisories is not a security assessment.

How much effort does a patching program for Codex take?

Effort scales with the number of installations, the release channels in use and whether installs are centrally managed. A small group of developers installing the CLI by hand is a different task from several hundred endpoints across IDE extensions and terminals. Drivers to assess include: how many machines and users run Codex, whether versions are pinned through a managed package process, how quickly you can push an update, and how you verify the installed version. No duration or fee for this work is supplied here, so ask your team to inventory installations first and measure the result.

Can our own team run the Codex patching program, or do we need outside help?

Many teams can run it in-house if they already manage developer tooling and endpoint software. Outside help is most useful when the inventory is unknown, when installs are scattered across unmanaged laptops, or when no one owns the agent tooling. DeployOpen plans and supports self-hosted open-source platforms inside client infrastructure and runs security testing, including AI and agent security. Any engagement is fixed-scope, with scope, deliverables and timelines agreed in writing before work starts. Ongoing support and continuous testing are available as retainers. DeployOpen does not publish a price list, and a quote follows from the written scope.

What should a security assessment of our Codex setup cover?

A useful assessment covers more than the installed version. It should review the sandbox mode and approval policy in use, whether project-local configuration files such as .env and .codex/config.toml load without user confirmation on your versions, who can change managed settings, how repositories are cloned and opened, and what network and file paths the agent can reach. It should also test prompt injection paths from repositories and web content, and confirm that logging and the Compliance API capture the activity you need. DeployOpen runs application, infrastructure and AI agent security testing, including red teaming, and scopes each test in writing before work starts.

Do OpenAI's SOC 2 reports cover the Codex CLI on our laptops?

Probably not in the way the question implies, so confirm the scope in writing. OpenAI's enterprise privacy page states that ChatGPT Business, Enterprise and Edu have completed SOC 2 Type 2 audits. Those audits relate to OpenAI's services, not to software that runs on your endpoints. The open-source CLI is in the openai/codex repository under Apache-2.0, and its local behavior, including the advisories above, sits with your environment. Ask OpenAI which systems, time period and trust services criteria the report covers, and ask your auditor how the report applies to your own controls.

What should we ask OpenAI in writing before approving Codex?

Request written answers on the points that decide your risk. Ask which Codex CLI and extension versions are supported and when fixed releases ship, how security advisories are announced and whether you can subscribe to them, and whether any Codex component in your plan falls outside the advisory process. Ask how cloud tasks are isolated, which Codex features are covered by the SOC 2 Type 2 audits and the Compliance API, how the Compliance API records cloud-delegated usage, and where the documentation for admins and managed configuration is maintained. Keep the answers with your approval record.

What a security reviewer asks to see for Codex advisories

This table lists the evidence a reviewer should request before approving Codex CLI or IDE extension use, and where each item comes from. Read it as an audit trail: each row names a record, what that record proves, and the source a reviewer can check independently. The main takeaway is that the published advisories set version floors, so the inventory and approval records must show which installed versions meet them.

Evidence itemWhat it provesWhere it comes from
Inventory of Codex installations by channel and versionWhich CLI, IDE extension and cloud-task users are running which versions, across laptops, build hosts and CI runnersOrganization's own asset records and endpoint management exports, compared with the openai/codex release history
Advisory text for each published advisory, with affected and fixed versionsThe exact version ranges affected by GHSA-w5fx-fh39-j5rw and GHSA-xrxf-jgv3-qmrm, and the fixed releases that close themGitHub advisory pages for GHSA-w5fx-fh39-j5rw and GHSA-xrxf-jgv3-qmrm, plus the openai/codex security advisories page
Version floor record and its approval dateThe minimum CLI and extension versions the organization accepts, who approved them and when they took effectChange or policy approval record kept by the security or platform owner
Patch or exception log with ownersWhich hosts are below the floor, the named owner for each, the target date for upgrading, and any approved exception with its expiryOrganization's ticketing system and exception register, reconciled against the inventory
Test record for project-local config handlingWhether a fixed build still loads project-local .env and .codex/config.toml files only after user confirmation, using a repository containing those filesInternal test report run in a controlled environment on the fixed version, retained with the build used
Vendor documentation links used for the decisionThe Codex admin, managed configuration and approvals pages that were relied on, with the access date and the version they describeCodex documentation on learn.chatgpt.com and the Using Codex with your ChatGPT plan help article, saved with the decision record

How DeployOpen helps teams set Codex patching and agent controls

DeployOpen works on OpenAI Codex security incidents and advisories as a fixed-scope engagement inside the client's own infrastructure. We turn published advisories into a patching baseline, controls for the agent's sandbox and approval settings, and evidence the client's security team can review.

How we scope

  • Written scope lists which Codex surfaces are covered: CLI, IDE extension, and any cloud task usage.
  • We inventory installed CLI and extension versions against the affected and fixed versions in each advisory.
  • Scope names the repositories and configuration files that load project-local settings in your environment.

How we build

  • We define a patching policy that sets minimum fixed versions and how quickly teams must update.
  • We test whether project-local configuration files load without confirmation in your builds and developer setups.
  • We document how sandbox writable roots and network restrictions are configured for your approved use cases.

How we hand over

  • Deliverables include the version baseline, patching runbook, and test results for each advisory in scope.
  • We record the controls your security team needs to review, with clear notes on what each control does not cover.
  • Handover includes a checklist to re-run when OpenAI publishes a new advisory or changes its release notes.

How we support

  • Ongoing support, upgrades, and continuous testing are available as a retainer after the initial handover.
  • Retainer work can track new entries in the openai/codex security advisories page as they are published.
  • Your team confirms advisory status and fixed versions with OpenAI and its own environment before changing policy.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.