CVE-2026-120752

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

Published Nov 2, 2026 CVSS 4.0 · 7.7 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

A stack-based buffer overflow exists in the PyMuPDF library within the JM_set_annot_callout_line() function. The vulnerability is triggered when an attacker supplies four or more callout points to the Page.add_freetext_annot() API. The copy operation writes the extra points into a fixed three-element array, corrupting adjacent stack data. As a result, an attacker can crash the process or potentially execute arbitrary code if the overflow is exploited successfully.

Affected Systems

All PyMuPDF releases before version 2.0, including the 1.25.3 line, are affected. The vendor is PyMuPDF.

Risk and Exploitability

The vulnerability carries a CVSS score of 7.7, indicating high severity. The vulnerability is not listed in the CISA KEV catalog. Exploitation requires that an attacker control the callout argument to Page.add_freetext_annot(); this typically occurs in environments where the library is used to process untrusted input. If the attacker can supply a malicious callout, the overflow could cause a denial of service or remote code execution in the process executing the library.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade PyMuPDF to version 2.0 or later, which removes the vulnerable function code.
  • Adjust any scripts or applications that call Page.add_freetext_annot() to enforce a maximum of three callout points, or otherwise sanitize input before passing it to the API.
  • If an upgrade is not feasible, consider sandboxing the library or running it with restricted privileges to limit the impact of a potential stack overflow and to contain crashes or code execution.

Generated by OpenCVE AI on November 3, 2026 at 13:31 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title PyMuPDF 1.25.3 before 2.0 Stack Buffer Overflow via add_freetext_annot() Callout
Weaknesses CWE-121
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 7.7, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}

Subscriptions

No data.

Weaknesses

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Nov 7, 2026, 2:27 AM
Reserved
Nov 2, 2026, 9:08 PM
Status
Awaiting Analysis
Published
Nov 2, 2026, 11:17 PM
Modified
Nov 7, 2026, 3:17 AM
Severity
Important
Public date
Nov 2, 2026, 10:16 PM