Skip to main content

PyMuPDF EUVDEUVD-2026-115640

| CVE-2026-120752 HIGH
Stack-based Buffer Overflow (CWE-121)
2026-11-02 VulnCheck GHSA-x2mr-6hpr-g257
7.7
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Influence callout argument in target app
  2. Delivery
    Supply four or more callout points
  3. Exploit
    Call Page.add_freetext_annot()
  4. Execution
    Overflow fixed 3-element stack array in JM_set_annot_callout_line()
  5. Impact
    Crash process or execute code

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Stack buffer bounds checking
MITRE ATT&CK

1 technique across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the vulnerable code path to be reached through Page.add_freetext_annot() with an attacker-controllable 'callout' argument supplying four or more points, which overflows the three-element stack array in JM_set_annot_callout_line(). The key limiting factor is that the application must route untrusted input into this specific callout parameter - most applications either do not create callout free-text annotations or hardcode their points, so the attack surface is not exposed by default. Affected only in PyMuPDF versions 1.25.3 up to (but not including) 2.0; updating to 2.0 (which adds the count>3 bounds check) removes the condition.

Impact

The input CVSS 4.0 vector (CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H, base 7.7, HIGH) reflects a memory-corruption flaw with full confidentiality/integrity/availability impact to the vulnerable system, but two signals temper it: AT:P (a specific attack requirement must hold) and PR:L (some privilege/application access is required), meaning this is not a trivially reachable network bug. No EPSS score was provided and the CVE is NOT in CISA KEV, so there is no evidence of active exploitation; the vuln.today Decision label is 'this_week', i.e. prompt but not emergency. A public PoC reference exists (issue #5112 and the vendor's own regression test test_5112, which triggers the overflow with 100 callout points); it is not verified as a working code-execution exploit, and it demonstrates a crash rather than confirmed RCE. The most important caveat is reachability: the AV:N in the input is debatable because exploitation requires an application to pass an attacker-controlled 'callout' argument into Page.add_freetext_annot() - this is a library API misuse surface, not a network-exposed PDF parser, so in practice the attacker must already be able to influence that specific Python argument. Net: a genuine stack buffer overflow worth patching this week, but real-world exposure is gated on an uncommon data flow rather than being broadly remotely reachable, so for most deployments this is lower real risk than the 7.7 suggests.

Exploit ScenarioDerived

An application uses PyMuPDF to build free-text annotations and lets untrusted input flow into the 'callout' argument of Page.add_freetext_annot(). The attacker supplies four or more callout points, overflowing the fixed three-element stack array in JM_set_annot_callout_line() and corrupting the stack frame, crashing the worker process or potentially achieving code execution. A public reproducer (test_5112 / issue #5112) demonstrates the crash using 100 points.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 02, 2026

A stack-based buffer overflow in PyMuPDF's JM_set_annot_callout_line() lets code that controls the 'callout' argument of Page.add_freetext_annot() pass four or more points into a fixed three-element stack array, corrupting the stack frame and potentially crashing the interpreter or achieving code execution in the process that imports the library. The flaw is present in PyMuPDF 1.25.3 up to but not including 2.0, and is fixed in the 2.0 release by an added count>3 bounds check that raises a 'bad seq of points' RuntimeError. The supplied CVSS 4.0 vector scores it 7.7, while the independent assessment rates it CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H, reflecting that low privileges and a specific precondition (the hosting application must route untrusted data into the callout parameter) are required; there is no CISA KEV entry and no public exploit identified at time of analysis, though the upstream fix commit ships a regression test that reproduces the overflow with a 100-point callout.

RemediationAI

Upgrade PyMuPDF to 2.0 or later as released at https://github.com/pymupdf/PyMuPDF/releases/tag/2.0; the fix commit d4298ead84ceeae1c9065c81cd9a275a1b092f5e rejects callout sequences longer than three points with a RuntimeError('bad seq of points') and also tightens pixel colour and clipping bounds checks in the same module. Where upgrading immediately is not possible, applications embedding PyMuPDF should validate and truncate the callout argument before it reaches Page.add_freetext_annot(), rejecting any sequence of four or more points at the application boundary; because the library is invoked in-process, the only reliable control is to stop untrusted data reaching that parameter, and note that this validation will also block any legitimate workflow that depended on longer callout lines, which the upstream fix now treats as invalid. Processes that accept untrusted documents or API payloads and build callout annotations from them should be treated as the priority remediation targets; deployments that never create free-text callout annotations or hardcode their points do not exercise the vulnerable path. No vendor workaround short of input validation or the 2.0 upgrade is documented in the available references.

Affected VersionsENISA

PyMuPDF 1.25.3 <2.0

Affected Packages

euvd pymupdf fix: 2.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

PyMuPDF is a Python binding over the MuPDF C rendering/PDF engine, generated with SWIG; the vulnerable helper JM_set_annot_callout_line() lives in the SWIG interface file src/extra.i and is the glue behind the Python-level Page.add_freetext_annot(callout=...) API. A free-text annotation's callout line is expressed as a short sequence of points, and the helper copies the caller-supplied count of points into a fixed three-element fz_point stack array without first checking the count, a classic CWE-121 stack-based buffer overflow. Because count is derived from a Python sequence length, a list of four or more tuples writes past the array and past the local frame, giving memory corruption whose practical outcome ranges from an interpreter crash to control-flow hijack, depending on the build (stack canaries, ASLR, and whether the extension is compiled with hardening flags). The upstream commit d4298ead84ceeae1c9065c81cd9a275a1b092f5e adds a count > sizeof(points)/sizeof(points[0]) guard that throws std::runtime_error(MSG_BAD_ARG_POINTS) and, in the same change, hardens two neighbouring routines: set_pixel() now rejects colour sequences longer than the destination buffer and ll_JM_color_count() replaces an assert(n <= sizeof(oldpix)) with a runtime range_error, indicating the same class of unchecked-length assumption was reviewed across the module. The trigger is a direct API call with an oversized point sequence; no parsing of a malicious PDF file is required, which is why the callout parameter itself is the attack surface.

Know when Python gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 7.7 HIGH
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
vuln.today AI 7.8 HIGH

Trigger needs an application to feed attacker-controlled points into the callout API (non-default local data flow), so AV:L/PR:L; the overflow itself is trivial (AC:L) and yields memory corruption with full C/I/A impact.

3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

A stack-based buffer overflow in PyMuPDF versions 1.25.3 through 1.9.x (fixed in 2.0) could allow an attacker who controls the 'callout' argument to crash or execute code within any application that imports the library. Development teams using PyMuPDF for PDF annotation processing are at risk, potentially leading to service disruptions or data compromise.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.4%
Top 69% exploitable
Prevalence
High
very popular Python PDF library, heavy adoption in document pipelines
Social Media
3
Sightings
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

A stack-based buffer overflow occurs when a program writes more data to a buffer located on the stack than it was allocated to hold.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy