{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-19591",
        "assignerOrgId": "8f4f43ab-ba69-4d92-aa1d-d772184d6fb7",
        "state": "PUBLISHED",
        "assignerShortName": "OAI",
        "dateReserved": "2026-08-12T03:54:33.704Z",
        "datePublished": "2026-09-01T17:06:45.647Z",
        "dateUpdated": "2026-09-01T17:06:45.647Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "8f4f43ab-ba69-4d92-aa1d-d772184d6fb7",
                "shortName": "OAI",
                "dateUpdated": "2026-09-01T17:06:45.647Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "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. If a user opens an attacker-prepared repository and Codex follows its instructions, Codex can run a file-writing Git command without requesting user approval. On macOS and Linux, exploitation additionally requires separately installed PowerShell Core (pwsh) to be invoked. If filesystem protections permit the write, the command can modify Codex's configuration. If Codex later loads the modified configuration, it can launch an attacker-controlled MCP server and execute code with the user's privileges, allowing it to read, change, or delete files accessible to that account. The approval bypass does not disable filesystem sandboxing; the default filesystem sandbox on macOS and Linux can prevent writes outside permitted locations."
                }
            ],
            "affected": [
                {
                    "vendor": "OpenAI",
                    "product": "Codex CLI",
                    "platforms": [
                        "Windows",
                        "macOS",
                        "Linux"
                    ],
                    "versions": [
                        {
                            "version": "0.72.0",
                            "status": "affected",
                            "versionType": "semver",
                            "lessThanOrEqual": "0.130.0"
                        },
                        {
                            "version": "0.131.0",
                            "status": "unaffected"
                        }
                    ]
                },
                {
                    "vendor": "OpenAI",
                    "product": "Codex Desktop",
                    "platforms": [
                        "macOS"
                    ],
                    "versions": [
                        {
                            "version": "260202.0859",
                            "status": "affected",
                            "versionType": "custom",
                            "lessThanOrEqual": "26.513.31313"
                        },
                        {
                            "version": "26.519.22136",
                            "status": "unaffected"
                        }
                    ]
                },
                {
                    "vendor": "OpenAI",
                    "product": "Codex Desktop",
                    "platforms": [
                        "Windows"
                    ],
                    "versions": [
                        {
                            "version": "26.304.38",
                            "status": "affected",
                            "versionType": "custom",
                            "lessThanOrEqual": "26.513.40821"
                        },
                        {
                            "version": "26.519.21041",
                            "status": "unaffected"
                        }
                    ]
                },
                {
                    "vendor": "OpenAI",
                    "product": "Codex Desktop (Microsoft Store package)",
                    "platforms": [
                        "Windows"
                    ],
                    "versions": [
                        {
                            "version": "26.304.38.0",
                            "status": "affected",
                            "versionType": "custom",
                            "lessThanOrEqual": "26.513.4821.0"
                        },
                        {
                            "version": "26.519.2081.0",
                            "status": "unaffected"
                        }
                    ]
                }
            ],
            "problemTypes": [
                {
                    "descriptions": [
                        {
                            "lang": "en",
                            "cweId": "CWE-150",
                            "description": "CWE-150: Improper Neutralization of Escape, Meta, or Control Sequences",
                            "type": "CWE"
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://github.com/openai/codex/pull/22643"
                }
            ],
            "credits": [
                {
                    "lang": "en",
                    "value": "Emanuele Barbeno, Cyrill Bannwart, Yves Bieri, Lukasz D., and Urs Mueller of Compass Security (@compasssecurity)."
                }
            ],
            "configurations": [
                {
                    "lang": "en",
                    "value": "Codex CLI for Windows, macOS, or Linux, or Codex Desktop for Windows or macOS, with Git and PowerShell. Windows normally includes PowerShell; macOS and Linux require separately installed PowerShell Core (pwsh) to be invoked. Exploitation requires an attacker-prepared repository whose instructions Codex follows. Misclassification bypasses command approval but does not itself disable filesystem sandboxing; code execution also requires a successful configuration write and later configuration load."
                }
            ],
            "solutions": [
                {
                    "lang": "en",
                    "value": "Upgrade Codex CLI to version 0.131.0 or later, Codex Desktop for macOS to application version 26.519.22136 or later, or Codex Desktop for Windows to application version 26.519.21041 (Microsoft Store package 26.519.2081.0) or later."
                }
            ],
            "workarounds": [
                {
                    "lang": "en",
                    "value": "Until updated, do not open or follow instructions from untrusted repositories. On macOS and Linux, keep filesystem sandboxing enabled."
                }
            ],
            "x_generator": {
                "engine": "cvelib 1.8.0"
            }
        }
    }
}