CVE-2025-61592

8.8 HIGH

📋 TL;DR

This vulnerability allows remote code execution when users run Cursor CLI inside a malicious repository. Attackers can exploit permissive configuration settings and prompt injection via project-specific rules to execute arbitrary shell commands. Users of Cursor CLI versions 1.7 and below are affected.

💻 Affected Systems

Products:
  • Cursor CLI
Versions: 1.7 and below
Operating Systems: All platforms where Cursor CLI runs
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability requires user to run CLI inside a malicious repository with crafted configuration files.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full system compromise with attacker gaining complete control over the user's environment, potentially leading to data theft, lateral movement, or persistent backdoors.

🟠

Likely Case

Local privilege escalation or execution of malicious code within the user's context, potentially stealing credentials, accessing sensitive files, or installing malware.

🟢

If Mitigated

Limited impact if users only run CLI in trusted repositories and have proper security controls preventing execution of untrusted code.

🌐 Internet-Facing: MEDIUM
🏢 Internal Only: HIGH

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires user interaction (running CLI in malicious repo) but the attack chain is straightforward once the malicious files are in place.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Patch 2025.09.17-25b418f

Vendor Advisory: https://github.com/cursor/cursor/security/advisories/GHSA-v64q-396f-7m79

Restart Required: Yes

Instructions:

1. Update to the latest Cursor version when released. 2. Apply patch 2025.09.17-25b418f if available. 3. Restart Cursor CLI after update.

🔧 Temporary Workarounds

Disable automatic config loading

all

Prevent Cursor CLI from automatically loading project-specific configuration files

export CURSOR_DISABLE_PROJECT_CONFIG=1

Use trusted repositories only

all

Only run Cursor CLI in verified, trusted repositories

🧯 If You Can't Patch

  • Avoid running Cursor CLI in untrusted repositories
  • Implement strict file integrity monitoring for .cursor/ directories

🔍 How to Verify

Check if Vulnerable:

Check Cursor CLI version with 'cursor --version' and verify if it's 1.7 or below

Check Version:

cursor --version

Verify Fix Applied:

Verify version is above 1.7 or includes patch 2025.09.17-25b418f

📡 Detection & Monitoring

Log Indicators:

  • Unusual shell command execution from Cursor CLI process
  • Loading of unexpected .cursor/cli.json or .cursor/rules/ files

Network Indicators:

  • Outbound connections from Cursor CLI to unexpected destinations

SIEM Query:

process_name:"cursor" AND (command_line:"*sh*" OR command_line:"*bash*" OR command_line:"*cmd*")

🔗 References

📤 Share & Export