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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| PyMuPDF | PyMuPDF | 1.25.3 – < 2.0 | 2.0 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | pymupdf | No fix yet | — |
| Debian 13 | pymupdf | No fix yet | — |
| Debian 12 | pymupdf | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | pymupdf | No fix yet | — |
| Ubuntu 26.04 LTS | pymupdf | No fix yet | — |
| Ubuntu 24.04 LTS | pymupdf | No fix yet | — |
| Ubuntu 22.04 LTS | pymupdf | No fix yet | — |
| Ubuntu 20.04 LTS | pymupdf | No fix yet | — |
References
- GitHub Issue #5112 issue-tracking
- GitHub Issue #5173 issue-tracking technical-description
- Patch Commit patch
- https://github.com/pymupdf/PyMuPDF/blob/1.28.2/src/extra.i#L787-L797 technical-description
- PyMuPDF 2.0 Release Notes release-notes
- https://github.com/pymupdf/PyMuPDF product
- VulnCheck Advisory: PyMuPDF 1.25.3 before 2.0 Stack Buffer Overflow via add_freetext_annot() Callout third-party-advisory