---
id: "CVE-2026-120752"
kind: "vulnerability"
aliases: ["CVE-2026-120752"]
title: "PyMuPDF: callout points overflow stack, letting crafted input run code"
severity: "high"
cvss: 7.7
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["package", "pymupdf", "python"]
not_affected_if: ["no-untrusted-callout-input", "pymupdf-2.0-or-later"]
published_at: "2026-11-02T23:17:20+00:00"
first_seen_at: "2026-11-02T23:35:57+00:00"
updated_at: "2026-11-02T23:36:36+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-120752", "first_seen_at": "2026-11-02T23:35:57+00:00"}]
---

# PyMuPDF: callout points overflow stack, letting crafted input run code

PyMuPDF 1.25.3 before 2.0 has a stack-based buffer overflow in JM_set_annot_callout_line(), which copies a caller-supplied number of callout points into a fixed three-element array. An attacker who controls the callout argument to Page.add_freetext_annot() can crash the process or execute code.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed PyMuPDF version with `pip show PyMuPDF` and look for `1.25.3` or any version before `2.0`.
- Search code for calls to `Page.add_freetext_annot()` that pass callout points from untrusted input.

## Fix

- Move to PyMuPDF `2.0` or later, per the sources.

## Timeline

- 2026-11-02T23:35:57+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-120752

## Documents

- [advisory] Third-party advisory: www.vulncheck.com https://www.vulncheck.com/advisories/pymupdf-1.25.3-before-2.0-stack-buffer-overflow-via-add-freetext-annot-callout
- [fix] Patch: github.com https://github.com/pymupdf/PyMuPDF/commit/d4298ead84ceeae1c9065c81cd9a275a1b092f5e
- [fix] Release notes: github.com https://github.com/pymupdf/PyMuPDF/releases/tag/2.0

## From the sources

PyMuPDF 1.25.3 before 2.0 contains a stack-based buffer overflow vulnerability in JM_set_annot_callout_line() that copies a caller-supplied number of callout points into a fixed three-element stack array. Attackers who control the callout argument passed to Page.add_freetext_annot() can supply four or more points to overwrite the stack frame, crashing the process or executing code.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
