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.
- 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
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- Published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- A 0-100 score for how much a CVE matters across the industry: exploitation, exposure, how widely the software is used, severity and whether a fix exists.What do these mean? →
- 16/100 · provisional
- How many real-world setups can hit the bug, from the vendor's advisory and CISA data. It does not know your setup.What do these mean? →
- Specific setups only
- Fix
- Fixed in 2.0
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- 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.2Upgrade to a fixed version: 2.0.
Timeline
- CVE published
- First seen by cve.now
Affected versions
- PyMuPDF PyMuPDF
From 1.25.3 · fixed in 2.0
Evidence 7
- Patch
- Report
- Report
- Repository
- Repository
Show all 7 sourcesShow fewer sources
- Repository
- Link
Corrections
None so far.
Something wrong on this page? Report an error. Every fix is listed here.
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