Description
fpdf2 is a PDF creation library for Python. From 2.5.0 until 2.8.8, fpdf2's SVGObject.build_xref() passes nested SVG <use> references to GraphicsContext.add_item(), whose default clone=True deep-copy behavior copies the complete referenced graphics tree during FPDF.image() processing. Repeating references at each nesting level makes the in-memory object count and processing work grow exponentially, allowing a small user-controlled SVG to consume excessive CPU and memory, raise MemoryError, fail PDF generation jobs, and reduce or exhaust worker capacity. ResourceAccessPolicy does not prevent the issue because the references are inline and require no external resource, XML entity, local file, or permissive network setting. This issue is fixed in version 2.8.8.
Published: 2026-10-22
Score: 6.5 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Denial of Service via CPU and memory exhaustion
Action: Patch Now
AI Analysis

Impact

f pdf2 is a Python PDF creation library that supports embedding SVG images. Between versions 2.5.0 and 2.8.8, the library's SVGObject.build_xref() function forwards nested <use> references to GraphicsContext.add_item() with clone=true, causing a deep‑copy of an entire referenced graphics tree every time the image is rendered by FPDF.image(). Each level of nesting amplifies the amount of data duplicated in memory, allowing an attacker with control over the SVG to trigger exponential growth in CPU effort and RAM usage. The result is a MemoryError or a dramatic slowdown, which can break PDF generation jobs and deplete worker capacity.

Affected Systems

Affected product is the fpdf2 library, distributed from the py‑pdf organization, in versions 2.5.0 through 2.8.8 inclusive. The issue is fixed in release 2.8.8, so any deployment using an earlier version is vulnerable.

Risk and Exploitability

With no EPSS score reported and the vulnerability not listed in the CISA KEV catalog, the exploitation probability is unclear, yet the exploit path does not require external resources; any party able to supply a malicious SVG to an application that uses FPDF.image() can provoke the denial of service. The CVSS score of 6.5 indicates moderate severity, meaning that while the vulnerability does not give direct code execution, the impact on availability can be significant in shared services or batch jobs. The lack of external dependencies makes the attack an easy local or remote vector if the application exposes SVG uploading functionality.

Generated by OpenCVE AI on October 22, 2026 at 18:34 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade fpdf2 to version 2.8.8 or newer
  • Validate or sanitize SVG inputs to restrict nesting depth or disallow <use> references before calling FPDF.image()
  • If an upgrade cannot occur immediately, disable SVG handling in FPDF.image() or enforce strict size limits on user‑supplied SVG files

Generated by OpenCVE AI on October 22, 2026 at 18:34 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-wqw6-wpr3-45rh fpdf2: Exponential SVG '<use>' expansion causes CPU and memory exhaustion in 'FPDF.image()'
History

Thu, 29 Oct 2026 03:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Mon, 26 Oct 2026 19:45:00 +0000

Type Values Removed Values Added
First Time appeared Py-pdf
Py-pdf fpdf2
Vendors & Products Py-pdf
Py-pdf fpdf2

Thu, 22 Oct 2026 17:45:00 +0000

Type Values Removed Values Added
Description fpdf2 is a PDF creation library for Python. From 2.5.0 until 2.8.8, fpdf2's SVGObject.build_xref() passes nested SVG <use> references to GraphicsContext.add_item(), whose default clone=True deep-copy behavior copies the complete referenced graphics tree during FPDF.image() processing. Repeating references at each nesting level makes the in-memory object count and processing work grow exponentially, allowing a small user-controlled SVG to consume excessive CPU and memory, raise MemoryError, fail PDF generation jobs, and reduce or exhaust worker capacity. ResourceAccessPolicy does not prevent the issue because the references are inline and require no external resource, XML entity, local file, or permissive network setting. This issue is fixed in version 2.8.8.
Title fpdf2: Exponential SVG '<use>' expansion causes CPU and memory exhaustion in 'FPDF.image()'
Weaknesses CWE-400
CWE-770
References
Metrics cvssV3_1

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


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-29T02:22:14.998Z

Reserved: 2026-10-21T20:34:25.599Z

Link: CVE-2026-114610

cve-icon Vulnrichment

Updated: 2026-10-29T02:22:10.535Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-10-22T18:17:28.227

Modified: 2026-10-29T04:18:24.587

Link: CVE-2026-114610

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-26T19:26:13Z

Weaknesses
  • CWE-400

    Uncontrolled Resource Consumption

  • CWE-770

    Allocation of Resources Without Limits or Throttling