{"id":63948,"date":"2025-08-10T06:39:17","date_gmt":"2025-08-10T06:39:17","guid":{"rendered":""},"modified":"2025-10-24T08:38:50","modified_gmt":"2025-10-24T14:38:50","slug":"cve-2025-54135-critical-remote-code-execution-vulnerability-in-cursor-code-editor","status":"publish","type":"post","link":"https:\/\/www.ameeba.com\/blog\/cve-2025-54135-critical-remote-code-execution-vulnerability-in-cursor-code-editor\/","title":{"rendered":"<strong>CVE-2025-54135: Critical Remote Code Execution Vulnerability in Cursor Code Editor<\/strong>"},"content":{"rendered":"<p><strong>Overview<\/strong><\/p>\n<p>The vulnerability CVE-2025-54135 has been recently discovered in Cursor, an AI-based code editor. The vulnerability allows a potential attacker to write in-workspace files without requiring user approval, thereby leading to a possible Remote Code Execution (RCE). This <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-33075-a-critical-windows-installer-vulnerability-that-leads-to-privilege-elevation\/\"  data-wpil-monitor-id=\"72377\">vulnerability affects versions below 1.3.9 of Cursor and can lead<\/a> to significant security risks including system compromise or data leakage. Given the increasing popularity of AI-based code editors among developers, this <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-58280-object-heap-address-exposure-vulnerability-in-ark-ets\/\"  data-wpil-monitor-id=\"87262\">vulnerability could have widespread implications if not addressed<\/a> promptly.<\/p>\n<p><strong>Vulnerability Summary<\/strong><\/p>\n<p>CVE ID: CVE-2025-54135<br \/>\nSeverity: High (8.5 CVSS Score)<br \/>\nAttack Vector: Network<br \/>\nPrivileges Required: None<br \/>\nUser Interaction: None<br \/>\nImpact: <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-27050-memory-corruption-vulnerability-leading-to-potential-system-compromise-and-data-leakage\/\"  data-wpil-monitor-id=\"74891\">Potential system compromise or data<\/a> leakage<\/p>\n<p><strong>Affected Products<\/strong><\/p><div id=\"ameeb-2286294489\" class=\"ameeb-content-2 ameeb-entity-placement\"><div style=\"border-left: 4px solid #555; padding-left: 20px; margin: 48px 0; font-family: Roboto, sans-serif; color: #ffffff; line-height: 1.6; max-width: 700px;\">\r\n  <h2 style=\"margin-top: 0; font-size: 20px; font-weight: 600; display: flex; align-items: center;\">\r\n    <a href=\"https:\/\/www.ameeba.com\/chat\" style=\"display: inline-flex; align-items: center; margin-right: 8px;\">\r\n      <img decoding=\"async\" src=\"https:\/\/www.ameeba.com\/blog\/wp-content\/uploads\/2025\/10\/Best-App-icon-Ameeba.png\" alt=\"Ameeba Chat Icon\" style=\"width: 40px; height: 40px;\" \/>\r\n    <\/a>\r\n    A new way to communicate\r\n  <\/h2>\r\n\r\n  <p style=\"margin-bottom: 12px;\">\r\n    Ameeba Chat is built on encrypted identity, not personal profiles.\r\n  <\/p>\r\n\r\n  <p style=\"margin-bottom: 16px;\">\r\n    Message, call, share files, and coordinate with identities kept separate.\r\n  <\/p>\r\n\r\n  <ul style=\"list-style: none; padding-left: 0; margin-bottom: 20px;\">\r\n    <li>\u2022 Encrypted identity<\/li>\r\n    <li>\u2022 Ameeba Chat authenticates access<\/li>\r\n    <li>\u2022 Aliases and categories<\/li>\r\n    <li>\u2022 End-to-end encrypted chat, calls, and files<\/li>\r\n    <li>\u2022 Secure notes for sensitive information<\/li>\r\n  <\/ul>\r\n\r\n  <p style=\"font-style: italic; font-weight: 600; margin-bottom: 24px;\">\r\n    Private communication, rethought.\r\n  <\/p>\r\n\r\n  <div style=\"display: flex; flex-wrap: wrap; gap: 12px;\">\r\n    <a href=\"https:\/\/www.ameeba.com\/chat\/download\" style=\"background-color: #ffffff; color: #000000; padding: 10px 20px; text-decoration: none; border-radius: 6px; font-weight: 500;\">Download Ameeba Chat<\/a>\r\n    <a href=\"https:\/\/www.ameeba.com\/chat\" style=\"border: 1px solid #ffffff; color: #ffffff; padding: 10px 20px; text-decoration: none; border-radius: 6px; font-weight: 500;\">Learn More<\/a>\r\n  <\/div>\r\n<\/div>\r\n<\/div>\n<p>Product | Affected Versions<\/p>\n<p>Cursor Code Editor | <1.3.9\n\n<strong>How the Exploit Works<\/strong><\/p>\n<p>The exploit works by taking advantage of a loophole in the <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-43596-insecure-file-system-permissions-vulnerability-in-msp360-backup-8-0\/\"  data-wpil-monitor-id=\"91410\">file permission<\/a> settings of Cursor. The <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-47168-use-after-free-vulnerability-in-microsoft-office-word-allowing-unauthorized-code-execution\/\"  data-wpil-monitor-id=\"73114\">code editor allows<\/a> writing in-workspace files without requiring user approval. If the file is a dotfile, editing it requires approval but creating a new one doesn&#8217;t. Therefore, if sensitive MCP files such as .cursor\/mcp.json do not already exist in the workspace, an attacker can chain a indirect prompt <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-50240-sql-injection-vulnerability-in-nbcio-boot-v1-0-3\/\"  data-wpil-monitor-id=\"71944\">injection vulnerability<\/a> to hijack the context to write to the settings file and trigger Remote Code Execution (RCE) on the victim&#8217;s system without user approval.<\/p>\n<p><strong>Conceptual Example Code<\/strong><\/p>\n<p>Here is a conceptual example of how the <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-51390-command-injection-vulnerability-in-totolink-n600r\/\"  data-wpil-monitor-id=\"73776\">vulnerability might be exploited using a shell command:<\/a><\/p><div id=\"ameeb-2365548312\" class=\"ameeb-content ameeb-entity-placement\"><div class=\"poptin-embedded\" data-id=\"f6b387694f681\"><\/div>\r\n\r\n\r\n\r\n\r\n\r\n<\/div>\n<pre><code class=\"\" data-line=\"\"># Create a new .cursor\/mcp.json file\necho &#039;{ &quot;settings&quot;: { &quot;command&quot;: &quot;malicious_command_here&quot; } }&#039; &gt; .cursor\/mcp.json\n# Trigger the indirect prompt injection vulnerability\ncurl -X POST -H &quot;Content-Type: application\/json&quot; -d &#039;{&quot;filename&quot;:&quot;.cursor\/mcp.json&quot;,&quot;content&quot;:&quot;malicious_content_here&quot;}&#039; http:\/\/target.example.com\/vulnerable\/endpoint<\/code><\/pre>\n<p>The above <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-55345-arbitrary-file-overwrite-and-remote-code-execution-vulnerability-in-codex-cli\/\"  data-wpil-monitor-id=\"76779\">code first creates a new .cursor\/mcp.json file<\/a> with a malicious command. Then, it triggers the indirect prompt <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-26186-sql-injection-vulnerability-in-opensis-v-9-1\/\"  data-wpil-monitor-id=\"71984\">injection vulnerability<\/a> by sending a POST request to a vulnerable endpoint on the target&#8217;s system, which subsequently writes the malicious content to the settings file leading to RCE.<\/p>\n<p><strong>Remediation<\/strong><\/p>\n<p>The vendor has released a patch that fixes this <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-43588-out-of-bounds-write-vulnerability-in-substance3d-sampler-versions-5-0-and-earlier\/\"  data-wpil-monitor-id=\"73509\">vulnerability in version<\/a> 1.3.9 of Cursor. All users are strongly advised to update to the patched version as soon as possible. As a temporary mitigation, a Web Application Firewall (WAF) or Intrusion Detection System (IDS) can be used to filter out malicious requests.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview The vulnerability CVE-2025-54135 has been recently discovered in Cursor, an AI-based code editor. The vulnerability allows a potential attacker to write in-workspace files without requiring user approval, thereby leading to a possible Remote Code Execution (RCE). This vulnerability affects versions below 1.3.9 of Cursor and can lead to significant security risks including system compromise [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"footnotes":""},"categories":[1],"tags":[],"vendor":[],"product":[],"attack_vector":[80],"asset_type":[],"severity":[],"exploit_status":[],"class_list":["post-63948","post","type-post","status-publish","format-standard","hentry","category-uncategorized","attack_vector-rce"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/posts\/63948","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/comments?post=63948"}],"version-history":[{"count":10,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/posts\/63948\/revisions"}],"predecessor-version":[{"id":84516,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/posts\/63948\/revisions\/84516"}],"wp:attachment":[{"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/media?parent=63948"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/categories?post=63948"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/tags?post=63948"},{"taxonomy":"vendor","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/vendor?post=63948"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/product?post=63948"},{"taxonomy":"attack_vector","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/attack_vector?post=63948"},{"taxonomy":"asset_type","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/asset_type?post=63948"},{"taxonomy":"severity","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/severity?post=63948"},{"taxonomy":"exploit_status","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/exploit_status?post=63948"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}