---
id: "CVE-2026-114610"
kind: "vulnerability"
aliases: ["CVE-2026-114610"]
title: "fpdf2 Python PDF library: nested SVG references cause exponential memory use"
severity: "medium"
cvss: 6.5
epss: 0.00305
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["document-generation", "fpdf2", "package", "python", "self-hosted"]
not_affected_if: ["fpdf2-below-2.5.0", "no-svg-images", "static-svg-assets"]
published_at: "2026-10-22T18:17:28+00:00"
first_seen_at: "2026-10-23T21:57:31+00:00"
updated_at: "2026-10-25T03:47:21+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-114610", "first_seen_at": "2026-10-23T21:57:31+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-114610", "first_seen_at": "2026-10-24T07:15:51+00:00"}]
---

# fpdf2 Python PDF library: nested SVG references cause exponential memory use

fpdf2, a Python PDF creation library, deep-copies nested SVG <use> references when rendering images, so the work grows exponentially with nesting depth. A small user-supplied SVG can consume excessive CPU and memory, raise MemoryError, and fail or stall PDF generation jobs.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Run `pip show fpdf2` or `python -c "import fpdf; print(fpdf.__version__)"` and compare against `2.8.8`
- Search dependency lockfiles (requirements.txt, poetry.lock, uv.lock) for `fpdf2` pinned below `2.8.8`

## Fix

- Upgrade the fpdf2 package to `2.8.8` or later with `pip install --upgrade "fpdf2>=2.8.8"`
- Until upgraded, reject or limit user-supplied SVG input passed to FPDF.image()

## Timeline

- 2026-10-23T21:57:31+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-114610
- 2026-10-24T07:15:51+00:00 epss https://api.first.org/data/v1/epss?cve=CVE-2026-114610

## From the sources

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.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
