{
 "public_id": "AIR-2026-0218",
 "incident_id": "2026-09-openai-codex-powershell-stop-parsing-approval-bypass",
 "date_disclosed": "2026-09-01",
 "date_occurred": null,
 "title": "CVE-2026-19591: Codex CLI and Desktop misread PowerShell's stop-parsing token as safe, letting an attacker-prepared repository rewrite Codex's config and launch a malicious MCP server without approval",
 "class": "responsible_disclosure",
 "attack_surface": "coding_agent",
 "initial_vector": "malicious_repository",
 "agent_capability_abused": [
  "command_approval_gate",
  "config_write",
  "mcp_server_launch"
 ],
 "target_product": "OpenAI Codex CLI and Codex Desktop",
 "target_vendor": "OpenAI",
 "autonomy_level": "copilot_with_approval",
 "impact_realized": false,
 "impact_type": [
  "code_execution",
  "approval_bypass"
 ],
 "blast_radius": "Codex CLI users on Windows, macOS and Linux and Codex Desktop users who open an attacker-prepared repository; macOS and Linux additionally need PowerShell Core installed; the default filesystem sandbox on macOS and Linux can block the config write",
 "cve": [
  "CVE-2026-19591"
 ],
 "taxonomy": {
  "owasp_asi": [
   "ASI04",
   "ASI05"
  ],
  "mitre_atlas": [],
  "labels": [
   "approval_bypass",
   "malicious_repository",
   "git_config",
   "powershell_stop_parsing",
   "coding_agent"
  ]
 },
 "defense_present": "Codex command sandbox and approval prompts",
 "defense_bypassed": true,
 "fix_shipped": "Codex CLI (PR openai/codex#22643); Codex Desktop fixed builds",
 "primary_sources": [
  "https://cveawg.mitre.org/api/cve/CVE-2026-19591",
  "https://github.com/openai/codex/pull/22643"
 ],
 "verified_quote": "OpenAI Codex CLI for Windows, macOS, and Linux and Codex Desktop for Windows and macOS misclassified certain PowerShell commands as safe because their command-safety parser interpreted PowerShell's stop-parsing token (--%) differently than PowerShell itself.",
 "confidence": "high",
 "notes": "OpenAI-assigned CVE published 2026-09-01 (reporter Compass Security per CVE Brief; CVSS 8.8). Re-scoped 2026-09-21: the sibling CVE-2026-19593 (Codex Desktop auto-executing an attacker-controlled .git/config via attr.tree and clean/process filters when a workspace is opened) is the Codex instance of the GitSpawn class and now lives on the GitSpawn record (2026-09-manifold-gitspawn), so each CVE is held once. Mechanism here: the command-safety parser treats PowerShell's --% token differently from PowerShell, so a file-writing Git command runs without approval; if filesystem protections permit the write, Codex's configuration can be modified and a later load launches an attacker-controlled MCP server with the user's privileges. The bypass does not disable filesystem sandboxing. PoC/disclosure; no real victim.",
 "risk_category": "security_fraud",
 "risk_secondary": [],
 "risk_subcategory": "Supply Chain Compromise",
 "risk_sub_secondary": [
  "Remote Code Execution & Sandbox Escape"
 ],
 "ai_entity": "generative",
 "agency": "ai_as_target",
 "agency_debatable": false,
 "agency_reason": "a command-safety parser flaw in the coding agent's tooling; no model decision",
 "vector_family": "malicious_component",
 "vector_detail": "malicious_repository",
 "guardrail_kind": [
  "human_approval",
  "sandbox_isolation"
 ],
 "guardrail_outcome": "silent",
 "xrefs": {
  "aiid": [],
  "atlas": [],
  "cve": [
   "CVE-2026-19591"
  ],
  "ghsa": []
 },
 "primary_asi": "ASI04",
 "agent_framework": "unknown",
 "model_provider": "openai",
 "model_name": "",
 "detection_mechanism": "unknown",
 "tool_access": "unknown",
 "financial_loss_band": "unknown",
 "eai_category": "supply_chain_vulnerabilities",
 "eai_domain": "tool_misuse",
 "eai_secondary": [
  "privilege_escalation"
 ],
 "eai_reason": "subcategory: Supply Chain Compromise",
 "asi_curated": [],
 "asi_scope": "in_scope",
 "asi_provenance": "rule",
 "asi_reason": "ASI04 (vector_family=malicious_component); ASI05 (impact=code_exec)",
 "submitted_by": "EAI Internal"
}