Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessInfluence callout argument in target app
-
DeliverySupply four or more callout points
-
ExploitCall Page.add_freetext_annot()
-
ExecutionOverflow fixed 3-element stack array in JM_set_annot_callout_line()
-
ImpactCrash 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
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
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.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
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
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.
Apply vendor patch.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
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.
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
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
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
EUVD-2026-115640
GHSA-x2mr-6hpr-g257
NVD
CVE.org
EPSS
Exploit-DB