CVE-2026-19590: Codex Desktop: Git hook trust flaw enables RCE
HIGHOpenAI Codex Desktop for Windows and macOS will silently execute a Git hook defined in a repository's local core.hooksPath setting during routine automated Git operations, letting an attacker who gets a user to open a specially prepared repository run arbitrary code with the user's full privileges — outside Codex's command sandbox and without any approval prompt. This is a sandbox-bypass, local code execution vector in a widely deployed AI coding assistant; there is no CVSS score, no EPSS data, no CISA KEV listing, and no public exploit or scanner template yet, and OpenAI itself notes that an ordinary `git clone` does not preserve the malicious repository-local configuration required to trigger it, which narrows realistic delivery to zips, tarballs, shared folders, or CI artifacts rather than a normal clone workflow. Even with that narrower path, the payoff is severe: a full sandbox escape with arbitrary file read/write/delete and access to whatever the user's account can reach, which matters for any organization letting developers point Codex Desktop at externally sourced or forked code. A fix is referenced in openai/codex PR #22843 — confirm and apply an updated Codex Desktop build, and until then treat any repository not obtained via a fresh `git clone` as untrusted before opening it in Codex, checking `.git/config` for unexpected `core.hooksPath` entries.
What is the risk?
Medium-severity local code execution with high impact but constrained exploitability. There is no assigned CVSS score, no EPSS percentile, no CISA KEV listing, and no public exploit or Nuclei template, and the vendor explicitly states a plain `git clone` does not carry the attacker-controlled configuration needed — exploitation requires the victim to acquire the repository through some other channel (archive extraction, shared drive, CI artifact, IDE 'open folder' on an unpacked copy) and then open it in Codex Desktop. That user-interaction and non-standard-delivery requirement lowers the likelihood of opportunistic mass exploitation, but the impact ceiling is high: full sandbox bypass and arbitrary code execution at the user's privilege level, with no approval gate. Treat as a targeted/social-engineering risk against developers rather than an internet-scannable one.
How does the attack unfold?
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| OpenAI Node | npm | — | No patch |
| OpenAI Node | npm | — | No patch |
How severe is it?
What is the attack surface?
What should I do?
1 step1) Track and apply the Codex Desktop update referencing openai/codex PR #22843 as soon as a patched build is confirmed available (no patched version number is published yet). 2) Until patched, only open repositories in Codex Desktop that were obtained via a direct
git clonefrom a trusted remote — avoid opening extracted zips/tarballs, copies from shared drives, or CI-extracted artifacts. 3) Before opening an unfamiliar or externally sourced repository, inspect.git/configfor an unexpectedcore.hooksPathentry pointing outside the standard.git/hooksdirectory. 4) As defense in depth, setgit config --global core.hooksPathto a fixed, organization-controlled directory (or a known-empty one) so repository-local overrides are ignored globally. 5) Monitor endpoint telemetry for unexpected child processes spawned by Codex Desktop coinciding with Git operations, which would indicate hook execution.
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2026-19590?
OpenAI Codex Desktop for Windows and macOS will silently execute a Git hook defined in a repository's local core.hooksPath setting during routine automated Git operations, letting an attacker who gets a user to open a specially prepared repository run arbitrary code with the user's full privileges — outside Codex's command sandbox and without any approval prompt. This is a sandbox-bypass, local code execution vector in a widely deployed AI coding assistant; there is no CVSS score, no EPSS data, no CISA KEV listing, and no public exploit or scanner template yet, and OpenAI itself notes that an ordinary `git clone` does not preserve the malicious repository-local configuration required to trigger it, which narrows realistic delivery to zips, tarballs, shared folders, or CI artifacts rather than a normal clone workflow. Even with that narrower path, the payoff is severe: a full sandbox escape with arbitrary file read/write/delete and access to whatever the user's account can reach, which matters for any organization letting developers point Codex Desktop at externally sourced or forked code. A fix is referenced in openai/codex PR #22843 — confirm and apply an updated Codex Desktop build, and until then treat any repository not obtained via a fresh `git clone` as untrusted before opening it in Codex, checking `.git/config` for unexpected `core.hooksPath` entries.
Is CVE-2026-19590 actively exploited?
No confirmed active exploitation of CVE-2026-19590 has been reported, but organizations should still patch proactively.
How to fix CVE-2026-19590?
1) Track and apply the Codex Desktop update referencing openai/codex PR #22843 as soon as a patched build is confirmed available (no patched version number is published yet). 2) Until patched, only open repositories in Codex Desktop that were obtained via a direct `git clone` from a trusted remote — avoid opening extracted zips/tarballs, copies from shared drives, or CI-extracted artifacts. 3) Before opening an unfamiliar or externally sourced repository, inspect `.git/config` for an unexpected `core.hooksPath` entry pointing outside the standard `.git/hooks` directory. 4) As defense in depth, set `git config --global core.hooksPath` to a fixed, organization-controlled directory (or a known-empty one) so repository-local overrides are ignored globally. 5) Monitor endpoint telemetry for unexpected child processes spawned by Codex Desktop coinciding with Git operations, which would indicate hook execution.
What systems are affected by CVE-2026-19590?
This vulnerability affects the following AI/ML architecture patterns: agent frameworks, local AI coding agents, developer tooling / IDE integrations.
What is the CVSS score for CVE-2026-19590?
CVE-2026-19590 has a CVSS v3.1 base score of 7.3 (HIGH). The EPSS exploitation probability is 0.15%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0011User ExecutionAML.T0050Command and Scripting InterpreterAML.T0053AI Agent Tool InvocationAML.T0112.000Local AI AgentCompliance Controls Affected
What are the technical details?
Original Advisory
OpenAI Codex Desktop for Windows and macOS could execute attacker-controlled Git hooks because automated Git operations trusted the repository's local core.hooksPath setting. If a user opens an attacker-prepared repository whose preserved .git/config points core.hooksPath to an attacker-controlled directory, Codex can run a malicious hook while processing the repository. The hook executes outside Codex's command sandbox, without user approval, and with the user's privileges, allowing it to read, change, or delete the user's files and access other resources available to the user's account. An ordinary Git clone does not preserve the attacker-controlled repository-local configuration required for exploitation.
Exploitation Scenario
An attacker crafts a repository directory (not distributed via a normal `git clone`) whose `.git/config` sets `core.hooksPath` to a bundled `hooks/` folder containing a malicious script disguised as a `post-checkout` or `pre-commit` hook. The attacker packages this as a zip file — e.g., attached to a phishing email framed as 'review this feature branch' or shared as a code sample in a chat channel — and convinces a developer to extract it and open the folder in Codex Desktop. When Codex performs a routine automated Git operation (status check, diff, or commit) while working in that folder, the malicious hook fires outside Codex's command sandbox with no approval prompt, executing with the developer's OS privileges to exfiltrate SSH/cloud credentials, modify source code, or establish persistence on the workstation.
Weaknesses (CWE)
CWE-427 — Uncontrolled Search Path Element: The product uses a fixed or controlled search path to find resources, but one or more locations in that path can be under the control of unintended actors.
- [Architecture and Design, Implementation] Hard-code the search path to a set of known-safe values (such as system directories), or only allow them to be specified by the administrator in a configuration file. Do not allow these settings to be modified by an external party. Be careful to avoid related weaknesses such as CWE-426 and CWE-428.
- [Implementation] When invoking other programs, specify those programs using fully-qualified pathnames. While this is an effective approach, code that uses fully-qualified pathnames might not be portable to other systems that do not use the same pathnames. The portability can be improved by locating the full-qualified paths in a centralized, easily-modifiable location within the source code, and having the code refer to these paths.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:HReferences
Timeline
Related Vulnerabilities
GHSA-vjc7-jrh9-9j8610.09Router: no-auth API leaks keys, chats, provider control
Same package: openaiCVE-2026-6153910.0Xinference: eval() on LLM output enables RCE
Same package: openaiCVE-2024-238279.8Nginx-UI: arbitrary file write via cert import leads to RCE
Same package: openaiCVE-2025-612609.8OpenAI Codex CLI: RCE via malicious MCP config files
Same package: openaiCVE-2026-195939.8Codex Desktop: Git config filter triggers sandbox-escape RCE
Same package: openai