CVE-2025-59944

8.0 HIGH

📋 TL;DR

This vulnerability in Cursor IDE allows attackers to bypass case-sensitive file protection checks on case-insensitive filesystems. By exploiting prompt injection, attackers can modify sensitive configuration files like .cursor/mcp.json to achieve remote code execution. Users running Cursor IDE versions 1.6.23 and below on case-insensitive filesystems are affected.

💻 Affected Systems

Products:
  • Cursor IDE
Versions: 1.6.23 and below
Operating Systems: Windows, macOS (with case-insensitive APFS), Linux (with case-insensitive filesystems)
Default Config Vulnerable: ⚠️ Yes
Notes: Only vulnerable on case-insensitive filesystems. Windows default NTFS and macOS default APFS (case-insensitive) are vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full system compromise through remote code execution, allowing attackers to execute arbitrary commands, steal data, or deploy malware.

🟠

Likely Case

Local privilege escalation or unauthorized modification of Cursor configuration files leading to code execution in the context of the Cursor process.

🟢

If Mitigated

Limited impact if running on case-sensitive filesystems or with proper file permission restrictions.

🌐 Internet-Facing: LOW
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Requires prompt injection capability and access to modify files in Cursor's configuration directory.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.7

Vendor Advisory: https://github.com/cursor/cursor/security/advisories/GHSA-xcwh-rrwj-gxc7

Restart Required: Yes

Instructions:

1. Open Cursor IDE. 2. Go to Settings > About. 3. Check for updates. 4. Install version 1.7 or higher. 5. Restart Cursor.

🔧 Temporary Workarounds

Use case-sensitive filesystem

all

Run Cursor on a case-sensitive filesystem where the vulnerability cannot be exploited.

Restrict file permissions

all

Set read-only permissions on Cursor configuration directories to prevent modification.

chmod -R 444 ~/.cursor/
chmod -R 444 %APPDATA%\Cursor\

🧯 If You Can't Patch

  • Disable AI features that could be used for prompt injection
  • Monitor and restrict write access to Cursor configuration directories

🔍 How to Verify

Check if Vulnerable:

Check Cursor version in Settings > About. If version is 1.6.23 or below, you are vulnerable if on case-insensitive filesystem.

Check Version:

cursor --version

Verify Fix Applied:

Verify Cursor version is 1.7 or higher in Settings > About.

📡 Detection & Monitoring

Log Indicators:

  • Unexpected modifications to .cursor/mcp.json or other Cursor configuration files
  • Unusual process execution originating from Cursor

Network Indicators:

  • Unexpected outbound connections from Cursor process

SIEM Query:

process.name:cursor AND (file.path:*/.cursor/*.json OR process.cmdline:*curl* OR process.cmdline:*wget*)

🔗 References

📤 Share & Export