Cursor IDE: Arbitrary Data Exfiltration Via Mermaid (CVE-2025-54132)
Cursor's Mermaid diagram renderer allowed arbitrary data exfiltration, likely by fetching remote resources referenced in a diagram. An attacker could craft a diagram that causes the victim's editor to send data to an attacker-controlled server.
embracethered.com
Published on embracethered.com
Cursor is a popular AI code editor. In this post I want to share how I found an interesting data exfiltration issue, the demo exploits built and how it got fixed.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the Mermaid renderer allowed external resource loading (such as images or links) without restricting which hosts could be contacted.
What the attacker needed
Victim opens a crafted Mermaid diagram
The fix
It was fixed, according to the text, though the specific change is not described.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Mermaid is a tool that turns simple text into diagrams inside apps. Cursor, an AI code editor, displays these diagrams. The bug meant a malicious diagram could make the editor contact an outside server, leaking information without the user noticing.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.