Detection queries Simulation available Vulnerability reportAgents & MCP

Cursor MCPoison persistent MCP trust bypass (CVE-2025-54136)

After a victim approved a benign MCP config, an attacker could swap in a reverse shell that ran on every project open without a new prompt. Fixed in Cursor 1.3.

What happened

Cursor one-time MCP approval bound to key name only. Attacker commits benign .cursor MCP, victim approves, later swaps command/args to reverse shell; re-executes on every project open/sync without new prompt. Fixed in Cursor 1.3 (any MCP change re-prompts).

Read the original sourceAdditional source: tenable.com

How it happened

Select a stage to explore its defenses
Detect this stage Test this stage
Detect this stage Test this stage
Detect this stage Test this stage
Detect this stage
Select a stage · Drag to explore · + / − to zoom · Dashed edges are loopsSelect a stage · Arrows show reported connectionsReported sequence
Read the flow as text & sources

A catalog reconstruction of the supplied source account. Unknown steps remain explicit; an edge describes the reported relationship between steps.

  1. 01 · Shared MCP configuration is approved

    A benign-looking configuration is approved in a shared repository.

    Hunt: A repository, dependency or agent changes MCP commands, automatic-task settings, tool approval or model-routing configuration before new execution.

    A file-write event alone cannot establish what changed. Legitimate setup also changes these files; obtain a diff and authorization context.

    Source for step 1
  2. 02 · Attacker replaces command arguments

    Later changes keep the trusted key name but replace its command or arguments.

    Hunt: A repository, dependency or agent changes MCP commands, automatic-task settings, tool approval or model-routing configuration before new execution.

    A file-write event alone cannot establish what changed. Legitimate setup also changes these files; obtain a diff and authorization context.

    Source for step 2
  3. 03 · Cursor reuses the previous trust

    The client does not request new approval for the changed configuration.

    Hunt: A repository, dependency or agent changes MCP commands, automatic-task settings, tool approval or model-routing configuration before new execution.

    A file-write event alone cannot establish what changed. Legitimate setup also changes these files; obtain a diff and authorization context.

    Source for step 3
  4. 04 · Command runs on project reopen

    The replacement command executes on open or synchronization, enabling persistent code execution.

    Hunt: Untrusted content or a changed tool definition precedes a file read, command, or remote call outside the user's intended task.

    Process logs cannot recover model intent. Remote connectors and in-process interpreters may produce no local child process. Prompt content alone is not a reliable signature.

    Source for step 4

Why it matters

Reported entry point: Write access to shared repo with .cursor MCP config. Reported impact: The replacement command executes on open or synchronization, enabling persistent code execution.

Check these source-linked conditions against your setup.

CursorMCP connection required

Cursor with a shared MCP configuration is the reported trust boundary.

Conditions to check
  • Confirm that the installed version is affected by the historical report; selecting a product does not establish its version or patch status.
  • The reported path requires an approved MCP configuration and attacker write access to the shared repository.

Source-linked applicability guidance. Confirm current scope in the original report.

Read the original report

What you can do

Protection & prevention

Start here

Check the vendor advisory and review ownership and changes to shared Cursor MCP configurations.

Upgrade Cursor; treat .cursor/** as code; code owners on MCP configs

Catalog defensive guidance based on the reported behavior. Confirm scope and current mitigations in the original source.

Review the original guidance Additional source 2
Investigate each phase

Detection queries

Draft query starters grouped by the attack stages where they apply.

Download stage pack

Start with the logs you collect. Each hunt identifies its required visibility, field mapping and limits. Queries are catalog-authored drafts using reusable behavior profiles; test with known activity and your normal baseline before alerting.

01Shared MCP configuration is approvedAgent trust / configuration changesCustom schema · Draft

A benign-looking configuration is approved in a shared repository.

What to look for

A repository, dependency or agent changes MCP commands, automatic-task settings, tool approval or model-routing configuration before new execution.

Visibility: Defender-side logs where collected

Required logs

  • File changes and before/after content for MCP / IDE configuration
  • Repository audit / pull-request history
  • Agent startup and tool-invocation logs

Coverage limit. A file-write event alone cannot establish what changed. Legitimate setup also changes these files; obtain a diff and authorization context.

Custom-schema candidates, not out-of-box detectors. Map your application / cloud / platform logs to EventType, Actor, Asset, Action, Target and CorrelationId. KQL uses a custom OpenAttacksAudit_CL table; SPL uses openattacks:audit. EventType values are proposed normalization names, not native vendor event names. Correlation and environment-specific alert logic remain to be built.

Sigma
Draft SigmaDownload Sigma
title: Hunt - Agent trust / configuration changes
id: 2dfc8034-d66b-42a7-a699-a76b2ef872ac
status: experimental
description: A repository, dependency or agent changes MCP commands,
  automatic-task settings, tool approval or model-routing configuration before
  new execution.
author: MagicSword OpenAttacks catalog
date: 2026-10-23
falsepositives:
  - Authorized activity matching this broad hunt; baseline and investigate
    before alerting.
level: low
logsource:
  category: application
  product: openattacks_audit
  definition: Custom normalized audit schema; map EventType, Actor, Asset, Action,
    Target and CorrelationId from the required source logs first.
detection:
  selection:
    EventType:
      - agent.config.write
      - agent.approval.change
  condition: selection
KQL
Draft KQLDownload KQL
// SCHEMA TEMPLATE: create/map this custom table before use; not a built-in Sentinel table.
// OpenAttacksAudit_CL: TimeGenerated(datetime), EventType/Actor/Asset/Action/Target/CorrelationId(string).
// Selects candidates only. Apply the stage hypothesis and correlation steps before alerting.
OpenAttacksAudit_CL
| where TimeGenerated > ago(7d)
| where EventType in ("agent.config.write", "agent.approval.change")
| project TimeGenerated, EventType, Actor, Asset, Action, Target, CorrelationId
| order by TimeGenerated desc
SPL
Draft SPLDownload SPL
sourcetype="openattacks:audit"
EventType IN ("agent.config.write", "agent.approval.change")
| table _time EventType Actor Asset Action Target CorrelationId
| sort - _time
Investigation steps
  1. Diff command, args, environment, origin, autoApprove and task settings against the previously approved version.
  2. Correlate the author and change with the next agent launch; inspect path canonicalization and trailing-dot variants where relevant.
02Attacker replaces command argumentsAgent trust / configuration changesCustom schema · Draft

Later changes keep the trusted key name but replace its command or arguments.

What to look for

A repository, dependency or agent changes MCP commands, automatic-task settings, tool approval or model-routing configuration before new execution.

Visibility: Defender-side logs where collected

Required logs

  • File changes and before/after content for MCP / IDE configuration
  • Repository audit / pull-request history
  • Agent startup and tool-invocation logs

Coverage limit. A file-write event alone cannot establish what changed. Legitimate setup also changes these files; obtain a diff and authorization context.

Custom-schema candidates, not out-of-box detectors. Map your application / cloud / platform logs to EventType, Actor, Asset, Action, Target and CorrelationId. KQL uses a custom OpenAttacksAudit_CL table; SPL uses openattacks:audit. EventType values are proposed normalization names, not native vendor event names. Correlation and environment-specific alert logic remain to be built.

Sigma
Draft SigmaDownload Sigma
title: Hunt - Agent trust / configuration changes
id: 2dfc8034-d66b-42a7-a699-a76b2ef872ac
status: experimental
description: A repository, dependency or agent changes MCP commands,
  automatic-task settings, tool approval or model-routing configuration before
  new execution.
author: MagicSword OpenAttacks catalog
date: 2026-10-23
falsepositives:
  - Authorized activity matching this broad hunt; baseline and investigate
    before alerting.
level: low
logsource:
  category: application
  product: openattacks_audit
  definition: Custom normalized audit schema; map EventType, Actor, Asset, Action,
    Target and CorrelationId from the required source logs first.
detection:
  selection:
    EventType:
      - agent.config.write
      - agent.approval.change
  condition: selection
KQL
Draft KQLDownload KQL
// SCHEMA TEMPLATE: create/map this custom table before use; not a built-in Sentinel table.
// OpenAttacksAudit_CL: TimeGenerated(datetime), EventType/Actor/Asset/Action/Target/CorrelationId(string).
// Selects candidates only. Apply the stage hypothesis and correlation steps before alerting.
OpenAttacksAudit_CL
| where TimeGenerated > ago(7d)
| where EventType in ("agent.config.write", "agent.approval.change")
| project TimeGenerated, EventType, Actor, Asset, Action, Target, CorrelationId
| order by TimeGenerated desc
SPL
Draft SPLDownload SPL
sourcetype="openattacks:audit"
EventType IN ("agent.config.write", "agent.approval.change")
| table _time EventType Actor Asset Action Target CorrelationId
| sort - _time
Investigation steps
  1. Diff command, args, environment, origin, autoApprove and task settings against the previously approved version.
  2. Correlate the author and change with the next agent launch; inspect path canonicalization and trailing-dot variants where relevant.
03Cursor reuses the previous trustAgent trust / configuration changesCustom schema · Draft

The client does not request new approval for the changed configuration.

What to look for

A repository, dependency or agent changes MCP commands, automatic-task settings, tool approval or model-routing configuration before new execution.

Compare the approved configuration digest with the changed version and the next approval decision. Missing approval logs alone do not prove a bypass.

Visibility: Defender-side logs where collected

Required logs

  • File changes and before/after content for MCP / IDE configuration
  • Repository audit / pull-request history
  • Agent startup and tool-invocation logs

Coverage limit. A file-write event alone cannot establish what changed. Legitimate setup also changes these files; obtain a diff and authorization context.

Custom-schema candidates, not out-of-box detectors. Map your application / cloud / platform logs to EventType, Actor, Asset, Action, Target and CorrelationId. KQL uses a custom OpenAttacksAudit_CL table; SPL uses openattacks:audit. EventType values are proposed normalization names, not native vendor event names. Correlation and environment-specific alert logic remain to be built.

Sigma
Draft SigmaDownload Sigma
title: Hunt - Agent trust / configuration changes
id: 2dfc8034-d66b-42a7-a699-a76b2ef872ac
status: experimental
description: A repository, dependency or agent changes MCP commands,
  automatic-task settings, tool approval or model-routing configuration before
  new execution.
author: MagicSword OpenAttacks catalog
date: 2026-10-23
falsepositives:
  - Authorized activity matching this broad hunt; baseline and investigate
    before alerting.
level: low
logsource:
  category: application
  product: openattacks_audit
  definition: Custom normalized audit schema; map EventType, Actor, Asset, Action,
    Target and CorrelationId from the required source logs first.
detection:
  selection:
    EventType:
      - agent.config.write
      - agent.approval.change
  condition: selection
KQL
Draft KQLDownload KQL
// SCHEMA TEMPLATE: create/map this custom table before use; not a built-in Sentinel table.
// OpenAttacksAudit_CL: TimeGenerated(datetime), EventType/Actor/Asset/Action/Target/CorrelationId(string).
// Selects candidates only. Apply the stage hypothesis and correlation steps before alerting.
OpenAttacksAudit_CL
| where TimeGenerated > ago(7d)
| where EventType in ("agent.config.write", "agent.approval.change")
| project TimeGenerated, EventType, Actor, Asset, Action, Target, CorrelationId
| order by TimeGenerated desc
SPL
Draft SPLDownload SPL
sourcetype="openattacks:audit"
EventType IN ("agent.config.write", "agent.approval.change")
| table _time EventType Actor Asset Action Target CorrelationId
| sort - _time
Investigation steps
  1. Diff command, args, environment, origin, autoApprove and task settings against the previously approved version.
  2. Correlate the author and change with the next agent launch; inspect path canonicalization and trailing-dot variants where relevant.
04Command runs on project reopenUnexpected agent tool useCustom schema · Draft

The replacement command executes on open or synchronization, enabling persistent code execution.

What to look for

Untrusted content or a changed tool definition precedes a file read, command, or remote call outside the user's intended task.

Visibility: Defender-side logs where collected

Required logs

  • Agent tool-call audit records with session / tool / destination
  • Tool-definition and approval changes
  • Endpoint process, file-access and network evidence where available

Coverage limit. Process logs cannot recover model intent. Remote connectors and in-process interpreters may produce no local child process. Prompt content alone is not a reliable signature.

Custom-schema candidates, not out-of-box detectors. Map your application / cloud / platform logs to EventType, Actor, Asset, Action, Target and CorrelationId. KQL uses a custom OpenAttacksAudit_CL table; SPL uses openattacks:audit. EventType values are proposed normalization names, not native vendor event names. Correlation and environment-specific alert logic remain to be built.

Sigma
Draft SigmaDownload Sigma
title: Hunt - Unexpected agent tool use
id: c709e384-0e11-479e-ab4d-3a06e2431e4b
status: experimental
description: Untrusted content or a changed tool definition precedes a file
  read, command, or remote call outside the user's intended task.
author: MagicSword OpenAttacks catalog
date: 2026-10-23
falsepositives:
  - Authorized activity matching this broad hunt; baseline and investigate
    before alerting.
level: low
logsource:
  category: application
  product: openattacks_audit
  definition: Custom normalized audit schema; map EventType, Actor, Asset, Action,
    Target and CorrelationId from the required source logs first.
detection:
  selection:
    EventType:
      - agent.tool.call
      - agent.tool.definition.change
  condition: selection
KQL
Draft KQLDownload KQL
// SCHEMA TEMPLATE: create/map this custom table before use; not a built-in Sentinel table.
// OpenAttacksAudit_CL: TimeGenerated(datetime), EventType/Actor/Asset/Action/Target/CorrelationId(string).
// Selects candidates only. Apply the stage hypothesis and correlation steps before alerting.
OpenAttacksAudit_CL
| where TimeGenerated > ago(7d)
| where EventType in ("agent.tool.call", "agent.tool.definition.change")
| project TimeGenerated, EventType, Actor, Asset, Action, Target, CorrelationId
| order by TimeGenerated desc
SPL
Draft SPLDownload SPL
sourcetype="openattacks:audit"
EventType IN ("agent.tool.call", "agent.tool.definition.change")
| table _time EventType Actor Asset Action Target CorrelationId
| sort - _time
Investigation steps
  1. Join input provenance, tool descriptions and calls by session ID and compare the action to the approved task.
  2. Inspect child processes and destinations; record whether execution was in-process, local, or through a remote SaaS connector.

Test this behavior

Download Node lab
macOS · ARM64 runner checkedLinux · ARM64 runner checkedWindows · pending
Local comparisonBounded analogue

Does approval remain valid after a mock configuration changes?

Compare fixed mock configurations under name-only and content-bound approval rules.

Mock MCP configuration
Synthetic data · run-owned artifacts
See mapped attack stage
Open lab instructions

Use this OpenAttacks checkout or the downloaded lab. Node.js 22.22+ is the only runtime dependency; no website install is required. Run commands from the folder containing simulations/lab.mjs.

1. Prepare the clean comparison

  • Node.js 22.22 or newer.
  • Use only synthetic data in the prepared disposable lab.
Terminal · OpenAttacks lab
npm run simulate -- prepare mcp-config-change --clean
npm run simulate -- prepare mcp-config-change

2. Inspect the fixed comparison

This helper compares mock configuration records. It does not start an agent or activate an MCP command. Inspect the returned record before verifying and cleaning up.

3. Compare what happened

Close the target session and its server, replace the example path with the exact returned recordPath, and repeat for each condition. Compare helper observations with the independent provider trace. A refusal or absent extra action is a valid result; detection stays unknown without sensor observations.

Terminal · replace example paths first
npm run simulate -- verify "/exact/run/record.json"

4. Keep the evidence, clean up

Retain approved evidence outside the temporary run, then clean up the exact inactive record. Unexpected files, changed artifacts or an active server lock stop cleanup for inspection.

Terminal · replace example paths first
npm run simulate -- cleanup "/exact/run/record.json"
Technical detailsTooling, impact & MITRE ATLAS

Attack context

AI's role
Agent / MCP as target
Initial access
Write access to shared repo with .cursor MCP config

Tooling as reported

AI products, models and artifacts

Targets and reported impact

Reported scale / exposure
Patched Cursor 1.3 (2025-07-29)

Source defensive notes

Upgrade Cursor; treat .cursor/** as code; code owners on MCP configs

MITRE ATLAS

AI-specific catalog annotations based on the reported behavior; these are not MITRE case-study assignments.

AML.T0081Modify AI Agent Configuration

A shared MCP configuration is changed after approval. Source

AML.T0109AI Supply Chain Rug Pull

An initially benign trusted configuration is replaced with malicious behavior. Source

Sources & research credit

2 sources

Research by Andrey Charikov, Roman Zaikin, Oded Vanunu · Check Point Research

  1. research.checkpoint.com
  2. tenable.com
Record & downloads
Source record name
Cursor MCPoison persistent MCP trust bypass (CVE-2025-54136)
Entry ID
cursor-mcpoison-cve-2025-54136
Catalog review
October 20, 2026
Category
attacks-on-ai
AI involvement confidence
confirmed