Skip to main content
← Vulnerabilities

PyMuPDF 1.25.3 before 2.0 Stack Buffer Overflow via add_freetext_annot() Callout

Only affects PyMuPDF 1.25.3 through 1.28.2 when add_freetext_annot() gets a callout with four or more points. The vendor rating is not given in the facts. Fixed in 2.0.

Written by anthropic/claude-haiku-5.5 from the sources below. Verify against them.

7.7HighCNA
Exploited
No known exploitation
Fix
Fixed in 2.0
Who is exposed
Specific setups only

Do first: Check whether your setup matches what the bug needs. The callout argument passed to Page.add_freetext_annot() has four or more points Affects released versions up to and including 1.28.2

Published
Last modified
Published
Not listed in CISA KEV
16/100 · provisional
Specific setups only
Fix
Fixed in 2.0
None on Exploit-DB, Metasploit or GitHub

Summary

PyMuPDF, a Python library for working with PDF files, is affected in versions before 2.0 (from 1.25.3 onward). An attacker who controls the callout input to the add_freetext_annot() function can overflow a stack buffer, which could crash the program or allow arbitrary code execution.

Read the original description

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.

What to do

  • Check whether your setup matches what the bug needs.

    The callout argument passed to Page.add_freetext_annot() has four or more points Affects released versions up to and including 1.28.2
  • Upgrade to a fixed version: 2.0.

Timeline

  1. CVE published
  2. First seen by cve.now

Affected versions

  • PyMuPDF PyMuPDF

    From 1.25.3 · fixed in 2.0

Evidence 7

  1. Patch
  2. Report
  3. Report
  4. Repository
  5. Repository
Show all 7 sourcesShow fewer sources
  1. Repository
  2. Link

Corrections

None so far.

Something wrong on this page? Report an error. Every fix is listed here.

FAQ

Questions about CVE-2026-120752

What does this mean?

Passing a callout with four or more points to Page.add_freetext_annot() writes past a stack buffer onto the stack frame. The overflow can crash the process, and the stated impact includes arbitrary code execution.Source: github.com, github.com

Am I affected, and how do I check?

Affects PyMuPDF releases from 1.25.3 up to and including 1.28.2, when the callout argument passed to Page.add_freetext_annot() has four or more points. Check the installed PyMuPDF version and whether code passes such callouts to that method.Source: github.com, github.com

What should I do about it?

Upgrade to PyMuPDF 2.0, which contains the fix.Source: github.com, github.com

Is it being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.Source: cve.now feed data