CVE-2026-22708

Cursor has a Terminal Tool Allowlist Bypass via Environment Variables

Published Jan 14, 2026 CVSS 4.0 · 7.2 High EPSS < 1% KEV · Not listed
Description
Cursor is a code editor built for programming with AI. Prior to 2.3, hen the Cursor Agent is running in Auto-Run Mode with Allowlist mode enabled, certain shell built-ins can still be executed without appearing in the allowlist and without requiring user approval.
This allows an attacker via indirect or direct prompt injection to poison the shell environment by setting, modifying, or removing environment variables that influence trusted commands. This vulnerability is fixed in 2.3.

Analysis

AI-generated

Technical impact

Cursor versions prior to 2.3 allow an Allowlist mode to be bypassed through environment variable manipulation, enabling shell built‑ins to run without user approval. This vulnerability can be triggered by direct or indirect prompt injection, enabling an attacker to poison the shell environment, alter environment variables that influence trusted commands, and potentially execute arbitrary commands or elevate privileges within the user session.

Affected Systems

The affected product is Cursor, a code editor that supports AI programming. All releases earlier than version 2.3 are vulnerable. This includes any 2.2.x or earlier snapshot of Cursor.

Risk and Exploitability

The vulnerability has a CVSS score of 7.2, indicating high severity. The EPSS score is less than 1%, suggesting a low probability of exploitation at present. It is not listed in the CISA KEV catalog. The likely attack vector involves manipulating environment variables via prompt injection or local configuration changes when the Cursor Agent operates in Auto‑Run Mode with Allowlist enabled, leading to unauthorized command execution.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Cursor to version 2.3 or later, which contains the fix for the allowlist bypass.
  • Disable Auto‑Run Mode or require explicit user approval for all shell commands to eliminate the bypass path.
  • Audit and sanitize any input or configuration that may set or alter environment variables used by Cursor before execution.

Generated by OpenCVE AI on April 18, 2026 at 06:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Anysphere
Anysphere cursor
CPEs cpe:2.3:a:anysphere:cursor:*:*:*:*:*:*:*:*
Vendors & Products Anysphere
Anysphere cursor
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

Type Values Removed Values Added
First Time appeared Cursor
Cursor cursor
Vendors & Products Cursor
Cursor cursor
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description Cursor is a code editor built for programming with AI. Prior to 2.3, hen the Cursor Agent is running in Auto-Run Mode with Allowlist mode enabled, certain shell built-ins can still be executed without appearing in the allowlist and without requiring user approval. This allows an attacker via indirect or direct prompt injection to poison the shell environment by setting, modifying, or removing environment variables that influence trusted commands. This vulnerability is fixed in 2.3.
Title Cursor has a Terminal Tool Allowlist Bypass via Environment Variables
Weaknesses CWE-15
CWE-269
CWE-74
CWE-77
CWE-78
CWE-94
References
Metrics cvssV4_0

{'score': 7.2, 'vector': 'CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U'}

Weaknesses
  • CWE-15

    External Control of System or Configuration Setting

  • CWE-269

    Improper Privilege Management

  • CWE-74

    Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')

  • CWE-77

    Improper Neutralization of Special Elements used in a Command ('Command Injection')

  • CWE-78

    Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

  • CWE-94

    Improper Control of Generation of Code ('Code Injection')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jan 14, 2026, 4:59 PM
Reserved
Jan 8, 2026, 7:23 PM
Status
Analyzed
Published
Jan 14, 2026, 5:16 PM
Modified
Jun 17, 2026, 10:20 AM